Title: [231367] trunk
Revision
231367
Author
cdu...@apple.com
Date
2018-05-04 11:44:47 -0700 (Fri, 04 May 2018)

Log Message

Unreviewed, rolling out r231331.

Caused a few tests to assert

Reverted changeset:

"Stop using an iframe's id as fallback if its name attribute
is not set"
https://bugs.webkit.org/show_bug.cgi?id=11388
https://trac.webkit.org/changeset/231331

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (231366 => 231367)


--- trunk/LayoutTests/ChangeLog	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/ChangeLog	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,3 +1,16 @@
+2018-05-04  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, rolling out r231331.
+
+        Caused a few tests to assert
+
+        Reverted changeset:
+
+        "Stop using an iframe's id as fallback if its name attribute
+        is not set"
+        https://bugs.webkit.org/show_bug.cgi?id=11388
+        https://trac.webkit.org/changeset/231331
+
 2018-05-04  Ryan Haddad  <ryanhad...@apple.com>
 
         Mark http/tests/contentextensions/make-https.html as flaky.

Modified: trunk/LayoutTests/fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt (231366 => 231367)


--- trunk/LayoutTests/fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -3,7 +3,7 @@
 
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'frame'
 --------
 FAIL should have invoked error callback, but invoked success callback.
 

Modified: trunk/LayoutTests/fast/dom/Geolocation/srcdoc-watchPosition-expected.txt (231366 => 231367)


--- trunk/LayoutTests/fast/dom/Geolocation/srcdoc-watchPosition-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/dom/Geolocation/srcdoc-watchPosition-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -3,7 +3,7 @@
 
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'frame'
 --------
 FAIL should have invoked error callback, but invoked success callback.
 

Modified: trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash.html (231366 => 231367)


--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -14,15 +14,15 @@
     }
 
     function setupTopLevel() {
-        var scrollTarget = iframeTarget.contentDocument.getElementById('might_scroll');
+        var scrollTarget = window.frames['target'].document.getElementById('might_scroll');
 
-        iframeTarget.contentWindow.registerAction(function () {
+        window.frames['target'].window.registerAction(function () {
             iframeTarget.remove();
             setTimeout(finish, 0);
         });
 
-        iframeTarget.contentWindow.run();
+        window.frames['target'].window.run();
     }
 </script>    
 </body>
-</html>
+</html>
\ No newline at end of file

Deleted: trunk/LayoutTests/fast/dom/Window/named-getter-frame-id-expected.txt (231366 => 231367)


--- trunk/LayoutTests/fast/dom/Window/named-getter-frame-id-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/dom/Window/named-getter-frame-id-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,12 +0,0 @@
-Tests that looking up a frame by id returns the iframe element and not its contentWindow.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS testFrame is document.getElementById('testFrame')
-PASS testFrame.name is ""
-PASS testFrame.id is "testFrame"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/fast/dom/Window/named-getter-frame-id.html (231366 => 231367)


--- trunk/LayoutTests/fast/dom/Window/named-getter-frame-id.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/dom/Window/named-getter-frame-id.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src=""
-<iframe id="testFrame"></iframe>
-<script>
-description("Tests that looking up a frame by id returns the iframe element and not its contentWindow.");
-_onload_ = function() {
-    shouldBe("testFrame", "document.getElementById('testFrame')");
-    shouldBeEqualToString("testFrame.name", "");
-    shouldBeEqualToString("testFrame.id", "testFrame");
-}
-</script>
-</body>
-</html>

Modified: trunk/LayoutTests/fast/dom/Window/window-special-properties-expected.txt (231366 => 231367)


--- trunk/LayoutTests/fast/dom/Window/window-special-properties-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/dom/Window/window-special-properties-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -42,8 +42,8 @@
 Nonexistent iframe name: undefined
 Iframe by name (unique): single WINDOW
 Iframe by name (multiple): single WINDOW
-Iframe by id (unique): single IFRAME(id)
-Iframe by id (multiple): collection(2) IFRAME(id) IFRAME(id)
+Iframe by id (unique): single WINDOW
+Iframe by id (multiple): single WINDOW
 Iframe by id/name mixed: single WINDOW
 
 Nonexistent span name: undefined
@@ -53,7 +53,7 @@
 Span by id (multiple): collection(2) SPAN(id) SPAN(id)
 Span by id/name mixed: collection(2) SPAN(id) SPAN(id)
 
-Mixed by id: collection(7) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) IFRAME(id) SPAN(id)
+Mixed by id: single WINDOW
 Mixed by name: single WINDOW
 Mixed by id (no iframe): collection(6) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) SPAN(id)
 Mixed by name (no iframe): collection(5) IMG(name) FORM(name) APPLET(name) EMBED(name) OBJECT(name)

Modified: trunk/LayoutTests/fast/frames/iframe-no-name-expected.txt (231366 => 231367)


--- trunk/LayoutTests/fast/frames/iframe-no-name-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/frames/iframe-no-name-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -3,7 +3,7 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS frames[0].name is ""
+PASS frames[0].name is "id"
 PASS frames[1].name is "name"
 PASS frames[2].name is "name"
 PASS frames[3].name is "name"

Modified: trunk/LayoutTests/fast/frames/iframe-no-name.html (231366 => 231367)


--- trunk/LayoutTests/fast/frames/iframe-no-name.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/frames/iframe-no-name.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -11,7 +11,7 @@
 <iframe name="name" id="id"></iframe>
 <script>
 description("Checks that the id of an iframe does not set the contentWindow's name if the iframe's name is not set.");
-shouldBeEqualToString("frames[0].name", "");
+shouldBeEqualToString("frames[0].name", "id");
 shouldBeEqualToString("frames[1].name", "name");
 shouldBeEqualToString("frames[2].name", "name");
 shouldBeEqualToString("frames[3].name", "name");

Modified: trunk/LayoutTests/fast/layers/prevent-hit-test-during-layout.html (231366 => 231367)


--- trunk/LayoutTests/fast/layers/prevent-hit-test-during-layout.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/layers/prevent-hit-test-during-layout.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -33,7 +33,7 @@
     }
     
     function runTest() {
-        fixedDiv = fixedFrame.contentDocument.getElementById('fixedDiv');
+        fixedDiv = window.frames['fixedFrame'].document.getElementById('fixedDiv');
         target = document.getElementById('target');
 
         setTimeout(function() {
@@ -53,4 +53,4 @@
     </div>
     <script src=""
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt (231366 => 231367)


--- trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -16,6 +16,6 @@
 
 
 --------
-Frame: '<!--framePath //<!--frame0-->/<!--frame0-->-->'
+Frame: 'f'
 --------
 Successful write into iframe

Modified: trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt (231366 => 231367)


--- trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,19 +1,19 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+frame "frame" - didStartProvisionalLoadForFrame
 main frame - didFinishDocumentLoadForFrame
 http://127.0.0.1:8000/loading/resources/basic-auth-testing.php?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks
-frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html 
-frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+frame "frame" - didCommitLoadForFrame
+frame "frame" - didFinishDocumentLoadForFrame
+frame "frame" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html 
+frame "frame" - didHandleOnloadEventsForFrame
 main frame - didHandleOnloadEventsForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
+frame "frame" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
-frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didReceiveTitle: 404 Not Found
-frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
+frame "frame" - didStartProvisionalLoadForFrame
+frame "frame" - didCancelClientRedirectForFrame
+frame "frame" - didCommitLoadForFrame
+frame "frame" - didReceiveTitle: 404 Not Found
+frame "frame" - didFinishDocumentLoadForFrame
+frame "frame" - didFailLoadWithError
 PASS did not cause assertion failure.

Modified: trunk/LayoutTests/http/tests/quicklook/csp-header-ignored-expected.txt (231366 => 231367)


--- trunk/LayoutTests/http/tests/quicklook/csp-header-ignored-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/quicklook/csp-header-ignored-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -4,6 +4,6 @@
 
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'frame'
 --------
 PASS

Modified: trunk/LayoutTests/http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html (231366 => 231367)


--- trunk/LayoutTests/http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -33,7 +33,7 @@
     document.execCommand('copy');
     getSelection().removeAllRanges();
     setTimeout(() => {
-        destinationFrame.contentWindow.postMessage({type: 'paste'}, '*');
+        destinationFrame.postMessage({type: 'paste'}, '*');
     }, 0);
 }
 

Modified: trunk/LayoutTests/http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script-expected.txt (231366 => 231367)


--- trunk/LayoutTests/http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -2,6 +2,6 @@
 
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'frame'
 --------
 

Modified: trunk/LayoutTests/http/tests/security/cross-origin-reified-window-property-access.html (231366 => 231367)


--- trunk/LayoutTests/http/tests/security/cross-origin-reified-window-property-access.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/security/cross-origin-reified-window-property-access.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -26,8 +26,8 @@
 
 function runTest()
 {
-    crossOriginWindow = crossOriginFrame.contentWindow;
-    sameOriginWindow = sameOriginFrame.contentWindow;
+    crossOriginWindow = crossOriginFrame.window;
+    sameOriginWindow = sameOriginFrame.window;
 
     shouldThrowOrReturnUndefined('crossOriginWindow.document');
     shouldThrowOrReturnUndefined('crossOriginWindow.name');

Modified: trunk/LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt (231366 => 231367)


--- trunk/LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-and-try-access-from-right-frame-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -10,7 +10,7 @@
   
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'TheIframeThatRequestsStorageAccess'
 --------
 After the top frame navigates the sub frame, the sub frame should no longer have access to first-party cookies.
 Did not receive cookie named 'firstPartyCookie'.

Modified: trunk/LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-but-try-access-from-wrong-frame-expected.txt (231366 => 231367)


--- trunk/LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-but-try-access-from-wrong-frame-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/storageAccess/request-and-grant-storage-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-non-recent-user-interaction-but-try-access-from-wrong-frame-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -10,7 +10,7 @@
   
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'theIframe'
 --------
 
 

Modified: trunk/LayoutTests/http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html (231366 => 231367)


--- trunk/LayoutTests/http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -15,7 +15,7 @@
     }
     if (event.data ="" "getUserMedia done") {
         didGetUserMedia = true;
-        frame1.contentWindow.postMessage("check filtering", "*");
+        frame1.postMessage("check filtering", "*");
         return;
     }
     check1.innerHTML = "";

Modified: trunk/LayoutTests/http/wpt/beacon/keepalive-after-navigation-expected.txt (231366 => 231367)


--- trunk/LayoutTests/http/wpt/beacon/keepalive-after-navigation-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/wpt/beacon/keepalive-after-navigation-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,4 +1,4 @@
-frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
+frame "testFrame" - has 1 onunload handler(s)
 
 PASS Test that beacon sent from unload event handler is properly received 
 

Modified: trunk/LayoutTests/http/wpt/cache-storage/cache-remove-twice.html (231366 => 231367)


--- trunk/LayoutTests/http/wpt/cache-storage/cache-remove-twice.html	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/http/wpt/cache-storage/cache-remove-twice.html	2018-05-04 18:44:47 UTC (rev 231367)
@@ -24,8 +24,8 @@
         var cacheName = "test-remove-twice";
         return new Promise((resolve, reject) => {
             window.addEventListener("message", test.step_func((event) => {
-                return Promise.all([self.caches.open(cacheName), cacheFrame.contentWindow.caches.open(cacheName) ]).then(() => {
-                    return Promise.all([self.caches.delete(cacheName), cacheFrame.contentWindow.caches.delete(cacheName)]);
+                return Promise.all([self.caches.open(cacheName), cacheFrame.window.caches.open(cacheName) ]).then(() => {
+                    return Promise.all([self.caches.delete(cacheName), cacheFrame.window.caches.delete(cacheName)]);
                 }).then(resolve, reject);
 	    }));
 	});

Modified: trunk/LayoutTests/platform/ios/http/tests/quicklook/csp-header-ignored-expected.txt (231366 => 231367)


--- trunk/LayoutTests/platform/ios/http/tests/quicklook/csp-header-ignored-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/platform/ios/http/tests/quicklook/csp-header-ignored-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -3,6 +3,6 @@
 
 
 --------
-Frame: '<!--framePath //<!--frame0-->-->'
+Frame: 'frame'
 --------
 PASS

Modified: trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt (231366 => 231367)


--- trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,19 +1,19 @@
 main frame - didStartProvisionalLoadForFrame
 main frame - didCommitLoadForFrame
 main frame - didFinishDocumentLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
+frame "frame" - didStartProvisionalLoadForFrame
 127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with webkit:rocks
-frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html 
-frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
+frame "frame" - didCommitLoadForFrame
+frame "frame" - didFinishDocumentLoadForFrame
+frame "frame" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html 
+frame "frame" - didHandleOnloadEventsForFrame
 main frame - didHandleOnloadEventsForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
+frame "frame" - didFinishLoadForFrame
 main frame - didFinishLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
-frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didReceiveTitle: 404 Not Found
-frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
-frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
+frame "frame" - didStartProvisionalLoadForFrame
+frame "frame" - didCancelClientRedirectForFrame
+frame "frame" - didCommitLoadForFrame
+frame "frame" - didReceiveTitle: 404 Not Found
+frame "frame" - didFinishDocumentLoadForFrame
+frame "frame" - didFailLoadWithError
 PASS did not cause assertion failure.

Modified: trunk/Source/WebCore/ChangeLog (231366 => 231367)


--- trunk/Source/WebCore/ChangeLog	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/Source/WebCore/ChangeLog	2018-05-04 18:44:47 UTC (rev 231367)
@@ -1,3 +1,16 @@
+2018-05-04  Chris Dumez  <cdu...@apple.com>
+
+        Unreviewed, rolling out r231331.
+
+        Caused a few tests to assert
+
+        Reverted changeset:
+
+        "Stop using an iframe's id as fallback if its name attribute
+        is not set"
+        https://bugs.webkit.org/show_bug.cgi?id=11388
+        https://trac.webkit.org/changeset/231331
+
 2018-05-04  Youenn Fablet  <you...@apple.com>
 
         Use more references in updateTracksOfType

Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (231366 => 231367)


--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp	2018-05-04 18:44:47 UTC (rev 231367)
@@ -96,7 +96,7 @@
     if (!parentFrame)
         return;
 
-    parentFrame->loader().subframeLoader().requestFrame(*this, m_URL, getNameAttribute(), lockHistory, lockBackForwardList);
+    parentFrame->loader().subframeLoader().requestFrame(*this, m_URL, m_frameName, lockHistory, lockBackForwardList);
 }
 
 void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -105,7 +105,17 @@
         setLocation("about:srcdoc");
     else if (name == srcAttr && !hasAttributeWithoutSynchronization(srcdocAttr))
         setLocation(stripLeadingAndTrailingHTMLSpaces(value));
-    else if (name == marginwidthAttr) {
+    else if (name == idAttr) {
+        HTMLFrameOwnerElement::parseAttribute(name, value);
+        // Falling back to using the 'id' attribute is not standard but some content relies on this behavior.
+        if (!hasAttributeWithoutSynchronization(nameAttr))
+            m_frameName = value;
+    } else if (name == nameAttr) {
+        m_frameName = value;
+        // FIXME: If we are already attached, this doesn't actually change the frame's name.
+        // FIXME: If we are already attached, this doesn't check for frame name
+        // conflicts and generate a unique frame name.
+    } else if (name == marginwidthAttr) {
         m_marginWidth = value.toInt();
         // FIXME: If we are already attached, this has no effect.
     } else if (name == marginheightAttr) {
@@ -122,6 +132,15 @@
         HTMLFrameOwnerElement::parseAttribute(name, value);
 }
 
+void HTMLFrameElementBase::setNameAndOpenURL()
+{
+    m_frameName = getNameAttribute();
+    // Falling back to using the 'id' attribute is not standard but some content relies on this behavior.
+    if (m_frameName.isNull())
+        m_frameName = getIdAttribute();
+    openURL();
+}
+
 Node::InsertedIntoAncestorResult HTMLFrameElementBase::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     HTMLFrameOwnerElement::insertedIntoAncestor(insertionType, parentOfInsertedTree);
@@ -144,7 +163,7 @@
 
     if (!renderer())
         invalidateStyleAndRenderersForSubtree();
-    openURL();
+    setNameAndOpenURL();
 }
 
 void HTMLFrameElementBase::didAttachRenderers()

Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.h (231366 => 231367)


--- trunk/Source/WebCore/html/HTMLFrameElementBase.h	2018-05-04 18:37:19 UTC (rev 231366)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.h	2018-05-04 18:44:47 UTC (rev 231367)
@@ -70,9 +70,11 @@
 
     bool isFrameElementBase() const final { return true; }
 
+    void setNameAndOpenURL();
     void openURL(LockHistory = LockHistory::Yes, LockBackForwardList = LockBackForwardList::Yes);
 
     AtomicString m_URL;
+    AtomicString m_frameName;
 
     ScrollbarMode m_scrolling;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to