Changeset 231367 in webkit


Ignore:
Timestamp:
May 4, 2018 11:44:47 AM (6 years ago)
Author:
Chris Dumez
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

Location:
trunk
Files:
2 deleted
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r231364 r231367  
     12018-05-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r231331.
     4
     5        Caused a few tests to assert
     6
     7        Reverted changeset:
     8
     9        "Stop using an iframe's id as fallback if its name attribute
     10        is not set"
     11        https://bugs.webkit.org/show_bug.cgi?id=11388
     12        https://trac.webkit.org/changeset/231331
     13
    1142018-05-04  Ryan Haddad  <ryanhaddad@apple.com>
    215
  • trunk/LayoutTests/fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt

    r231331 r231367  
    44
    55--------
    6 Frame: '<!--framePath //<!--frame0-->-->'
     6Frame: 'frame'
    77--------
    88FAIL should have invoked error callback, but invoked success callback.
  • trunk/LayoutTests/fast/dom/Geolocation/srcdoc-watchPosition-expected.txt

    r231331 r231367  
    44
    55--------
    6 Frame: '<!--framePath //<!--frame0-->-->'
     6Frame: 'frame'
    77--------
    88FAIL should have invoked error callback, but invoked success callback.
  • trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-in-noscroll-iframe-crash.html

    r231331 r231367  
    1515
    1616    function setupTopLevel() {
    17         var scrollTarget = iframeTarget.contentDocument.getElementById('might_scroll');
     17        var scrollTarget = window.frames['target'].document.getElementById('might_scroll');
    1818
    19         iframeTarget.contentWindow.registerAction(function () {
     19        window.frames['target'].window.registerAction(function () {
    2020            iframeTarget.remove();
    2121            setTimeout(finish, 0);
    2222        });
    2323
    24         iframeTarget.contentWindow.run();
     24        window.frames['target'].window.run();
    2525    }
    2626</script>   
  • trunk/LayoutTests/fast/dom/Window/window-special-properties-expected.txt

    r231331 r231367  
    4343Iframe by name (unique): single WINDOW
    4444Iframe by name (multiple): single WINDOW
    45 Iframe by id (unique): single IFRAME(id)
    46 Iframe by id (multiple): collection(2) IFRAME(id) IFRAME(id)
     45Iframe by id (unique): single WINDOW
     46Iframe by id (multiple): single WINDOW
    4747Iframe by id/name mixed: single WINDOW
    4848
     
    5454Span by id/name mixed: collection(2) SPAN(id) SPAN(id)
    5555
    56 Mixed by id: collection(7) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) IFRAME(id) SPAN(id)
     56Mixed by id: single WINDOW
    5757Mixed by name: single WINDOW
    5858Mixed by id (no iframe): collection(6) IMG(id) FORM(id) APPLET(id) EMBED(id) OBJECT(id) SPAN(id)
  • trunk/LayoutTests/fast/frames/iframe-no-name-expected.txt

    r231331 r231367  
    44
    55
    6 PASS frames[0].name is ""
     6PASS frames[0].name is "id"
    77PASS frames[1].name is "name"
    88PASS frames[2].name is "name"
  • trunk/LayoutTests/fast/frames/iframe-no-name.html

    r231331 r231367  
    1212<script>
    1313description("Checks that the id of an iframe does not set the contentWindow's name if the iframe's name is not set.");
    14 shouldBeEqualToString("frames[0].name", "");
     14shouldBeEqualToString("frames[0].name", "id");
    1515shouldBeEqualToString("frames[1].name", "name");
    1616shouldBeEqualToString("frames[2].name", "name");
  • trunk/LayoutTests/fast/layers/prevent-hit-test-during-layout.html

    r231331 r231367  
    3434   
    3535    function runTest() {
    36         fixedDiv = fixedFrame.contentDocument.getElementById('fixedDiv');
     36        fixedDiv = window.frames['fixedFrame'].document.getElementById('fixedDiv');
    3737        target = document.getElementById('target');
    3838
  • trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt

    r231331 r231367  
    1717
    1818--------
    19 Frame: '<!--framePath //<!--frame0-->/<!--frame0-->-->'
     19Frame: 'f'
    2020--------
    2121Successful write into iframe
  • trunk/LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt

    r231331 r231367  
    11main frame - didStartProvisionalLoadForFrame
    22main frame - didCommitLoadForFrame
    3 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
     3frame "frame" - didStartProvisionalLoadForFrame
    44main frame - didFinishDocumentLoadForFrame
    55http://127.0.0.1:8000/loading/resources/basic-auth-testing.php?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks
    6 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    7 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    8 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
    9 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6frame "frame" - didCommitLoadForFrame
     7frame "frame" - didFinishDocumentLoadForFrame
     8frame "frame" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
     9frame "frame" - didHandleOnloadEventsForFrame
    1010main frame - didHandleOnloadEventsForFrame
    11 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
     11frame "frame" - didFinishLoadForFrame
    1212main frame - didFinishLoadForFrame
    13 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    14 frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
    15 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    16 frame "<!--framePath //<!--frame0-->-->" - didReceiveTitle: 404 Not Found
    17 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    18 frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
     13frame "frame" - didStartProvisionalLoadForFrame
     14frame "frame" - didCancelClientRedirectForFrame
     15frame "frame" - didCommitLoadForFrame
     16frame "frame" - didReceiveTitle: 404 Not Found
     17frame "frame" - didFinishDocumentLoadForFrame
     18frame "frame" - didFailLoadWithError
    1919PASS did not cause assertion failure.
  • trunk/LayoutTests/http/tests/quicklook/csp-header-ignored-expected.txt

    r231331 r231367  
    55
    66--------
    7 Frame: '<!--framePath //<!--frame0-->-->'
     7Frame: 'frame'
    88--------
    99PASS
  • trunk/LayoutTests/http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html

    r231331 r231367  
    3434    getSelection().removeAllRanges();
    3535    setTimeout(() => {
    36         destinationFrame.contentWindow.postMessage({type: 'paste'}, '*');
     36        destinationFrame.postMessage({type: 'paste'}, '*');
    3737    }, 0);
    3838}
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script-expected.txt

    r231331 r231367  
    33
    44--------
    5 Frame: '<!--framePath //<!--frame0-->-->'
     5Frame: 'frame'
    66--------
    77
  • trunk/LayoutTests/http/tests/security/cross-origin-reified-window-property-access.html

    r231331 r231367  
    2727function runTest()
    2828{
    29     crossOriginWindow = crossOriginFrame.contentWindow;
    30     sameOriginWindow = sameOriginFrame.contentWindow;
     29    crossOriginWindow = crossOriginFrame.window;
     30    sameOriginWindow = sameOriginFrame.window;
    3131
    3232    shouldThrowOrReturnUndefined('crossOriginWindow.document');
  • 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

    r231331 r231367  
    1111
    1212--------
    13 Frame: '<!--framePath //<!--frame0-->-->'
     13Frame: 'TheIframeThatRequestsStorageAccess'
    1414--------
    1515After the top frame navigates the sub frame, the sub frame should no longer have access to first-party cookies.
  • 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

    r231331 r231367  
    1111
    1212--------
    13 Frame: '<!--framePath //<!--frame0-->-->'
     13Frame: 'theIframe'
    1414--------
    1515
  • trunk/LayoutTests/http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html

    r231331 r231367  
    1616    if (event.data === "getUserMedia done") {
    1717        didGetUserMedia = true;
    18         frame1.contentWindow.postMessage("check filtering", "*");
     18        frame1.postMessage("check filtering", "*");
    1919        return;
    2020    }
  • trunk/LayoutTests/http/wpt/beacon/keepalive-after-navigation-expected.txt

    r231331 r231367  
    1 frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
     1frame "testFrame" - has 1 onunload handler(s)
    22
    33PASS Test that beacon sent from unload event handler is properly received
  • trunk/LayoutTests/http/wpt/cache-storage/cache-remove-twice.html

    r231331 r231367  
    2525        return new Promise((resolve, reject) => {
    2626            window.addEventListener("message", test.step_func((event) => {
    27                 return Promise.all([self.caches.open(cacheName), cacheFrame.contentWindow.caches.open(cacheName) ]).then(() => {
    28                     return Promise.all([self.caches.delete(cacheName), cacheFrame.contentWindow.caches.delete(cacheName)]);
     27                return Promise.all([self.caches.open(cacheName), cacheFrame.window.caches.open(cacheName) ]).then(() => {
     28                    return Promise.all([self.caches.delete(cacheName), cacheFrame.window.caches.delete(cacheName)]);
    2929                }).then(resolve, reject);
    3030            }));
  • trunk/LayoutTests/platform/ios/http/tests/quicklook/csp-header-ignored-expected.txt

    r231331 r231367  
    44
    55--------
    6 Frame: '<!--framePath //<!--frame0-->-->'
     6Frame: 'frame'
    77--------
    88PASS
  • trunk/LayoutTests/platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt

    r231331 r231367  
    22main frame - didCommitLoadForFrame
    33main frame - didFinishDocumentLoadForFrame
    4 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
     4frame "frame" - didStartProvisionalLoadForFrame
    55127.0.0.1:8000 - didReceiveAuthenticationChallenge - Responding with webkit:rocks
    6 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    7 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    8 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
    9 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
     6frame "frame" - didCommitLoadForFrame
     7frame "frame" - didFinishDocumentLoadForFrame
     8frame "frame" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html
     9frame "frame" - didHandleOnloadEventsForFrame
    1010main frame - didHandleOnloadEventsForFrame
    11 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame
     11frame "frame" - didFinishLoadForFrame
    1212main frame - didFinishLoadForFrame
    13 frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
    14 frame "<!--framePath //<!--frame0-->-->" - didCancelClientRedirectForFrame
    15 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    16 frame "<!--framePath //<!--frame0-->-->" - didReceiveTitle: 404 Not Found
    17 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    18 frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
     13frame "frame" - didStartProvisionalLoadForFrame
     14frame "frame" - didCancelClientRedirectForFrame
     15frame "frame" - didCommitLoadForFrame
     16frame "frame" - didReceiveTitle: 404 Not Found
     17frame "frame" - didFinishDocumentLoadForFrame
     18frame "frame" - didFailLoadWithError
    1919PASS did not cause assertion failure.
  • trunk/Source/WebCore/ChangeLog

    r231366 r231367  
     12018-05-04  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r231331.
     4
     5        Caused a few tests to assert
     6
     7        Reverted changeset:
     8
     9        "Stop using an iframe's id as fallback if its name attribute
     10        is not set"
     11        https://bugs.webkit.org/show_bug.cgi?id=11388
     12        https://trac.webkit.org/changeset/231331
     13
    1142018-05-04  Youenn Fablet  <youenn@apple.com>
    215
  • trunk/Source/WebCore/html/HTMLFrameElementBase.cpp

    r231331 r231367  
    9797        return;
    9898
    99     parentFrame->loader().subframeLoader().requestFrame(*this, m_URL, getNameAttribute(), lockHistory, lockBackForwardList);
     99    parentFrame->loader().subframeLoader().requestFrame(*this, m_URL, m_frameName, lockHistory, lockBackForwardList);
    100100}
    101101
     
    106106    else if (name == srcAttr && !hasAttributeWithoutSynchronization(srcdocAttr))
    107107        setLocation(stripLeadingAndTrailingHTMLSpaces(value));
    108     else if (name == marginwidthAttr) {
     108    else if (name == idAttr) {
     109        HTMLFrameOwnerElement::parseAttribute(name, value);
     110        // Falling back to using the 'id' attribute is not standard but some content relies on this behavior.
     111        if (!hasAttributeWithoutSynchronization(nameAttr))
     112            m_frameName = value;
     113    } else if (name == nameAttr) {
     114        m_frameName = value;
     115        // FIXME: If we are already attached, this doesn't actually change the frame's name.
     116        // FIXME: If we are already attached, this doesn't check for frame name
     117        // conflicts and generate a unique frame name.
     118    } else if (name == marginwidthAttr) {
    109119        m_marginWidth = value.toInt();
    110120        // FIXME: If we are already attached, this has no effect.
     
    123133}
    124134
     135void HTMLFrameElementBase::setNameAndOpenURL()
     136{
     137    m_frameName = getNameAttribute();
     138    // Falling back to using the 'id' attribute is not standard but some content relies on this behavior.
     139    if (m_frameName.isNull())
     140        m_frameName = getIdAttribute();
     141    openURL();
     142}
     143
    125144Node::InsertedIntoAncestorResult HTMLFrameElementBase::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
    126145{
     
    145164    if (!renderer())
    146165        invalidateStyleAndRenderersForSubtree();
    147     openURL();
     166    setNameAndOpenURL();
    148167}
    149168
  • trunk/Source/WebCore/html/HTMLFrameElementBase.h

    r231331 r231367  
    7171    bool isFrameElementBase() const final { return true; }
    7272
     73    void setNameAndOpenURL();
    7374    void openURL(LockHistory = LockHistory::Yes, LockBackForwardList = LockBackForwardList::Yes);
    7475
    7576    AtomicString m_URL;
     77    AtomicString m_frameName;
    7678
    7779    ScrollbarMode m_scrolling;
Note: See TracChangeset for help on using the changeset viewer.