Changeset 115796 in webkit


Ignore:
Timestamp:
May 1, 2012 10:54:44 PM (12 years ago)
Author:
eric@webkit.org
Message:

Add <iframe seamless> navigation code (and pass all the navigation tests)
https://bugs.webkit.org/show_bug.cgi?id=85340

Reviewed by Adam Barth.

Source/WebCore:

This code was primarily written by Adam Barth and then submitted to my
GitHub branch via a pull request:
https://github.com/eseidel/webkit/compare/master...seamless
https://github.com/eseidel/webkit/pull/2
https://github.com/eseidel/webkit/pull/3

I rewrote parts of it to use Docment::shouldDisplaySeamlesslyWithParent.

Other parts of the original change have already been committed to WebKit by Adam
as part of prep-work for making the loader seamless-ready.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::findFrameForNavigation):

LayoutTests:

Update results now that we pass all the navigation tests.

  • fast/frames/seamless/seamless-form-get-expected.txt:
  • fast/frames/seamless/seamless-form-get-named-expected.txt:
  • fast/frames/seamless/seamless-form-post-expected.txt:
  • fast/frames/seamless/seamless-form-post-named-expected.txt:
  • fast/frames/seamless/seamless-hyperlink-expected.txt:
  • fast/frames/seamless/seamless-hyperlink-named-expected.txt:
  • fast/frames/seamless/seamless-window-location-expected.txt:
  • fast/frames/seamless/seamless-window-location-href-expected.txt:
  • fast/frames/seamless/seamless-window-location-sandbox-expected.txt:
  • fast/frames/seamless/seamless-window-open-expected.txt:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r115795 r115796  
     12012-05-01  Eric Seidel  <eric@webkit.org>
     2
     3        Add <iframe seamless> navigation code (and pass all the navigation tests)
     4        https://bugs.webkit.org/show_bug.cgi?id=85340
     5
     6        Reviewed by Adam Barth.
     7
     8        Update results now that we pass all the navigation tests.
     9
     10        * fast/frames/seamless/seamless-form-get-expected.txt:
     11        * fast/frames/seamless/seamless-form-get-named-expected.txt:
     12        * fast/frames/seamless/seamless-form-post-expected.txt:
     13        * fast/frames/seamless/seamless-form-post-named-expected.txt:
     14        * fast/frames/seamless/seamless-hyperlink-expected.txt:
     15        * fast/frames/seamless/seamless-hyperlink-named-expected.txt:
     16        * fast/frames/seamless/seamless-window-location-expected.txt:
     17        * fast/frames/seamless/seamless-window-location-href-expected.txt:
     18        * fast/frames/seamless/seamless-window-location-sandbox-expected.txt:
     19        * fast/frames/seamless/seamless-window-open-expected.txt:
     20
    1212012-05-01  Kent Tamura  <tkent@chromium.org>
    222
  • trunk/LayoutTests/fast/frames/seamless/seamless-form-get-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4         window.onload=function() {
    5             frames[0].document.getElementsByTagName('form')[0].submit();
    6         }
    7    
    8    
    9 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    102
  • trunk/LayoutTests/fast/frames/seamless/seamless-form-get-named-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4         window.onload=function() {
    5             frames[0].document.getElementsByTagName('form')[0].submit();
    6         }
    7    
    8    
    9 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    102
  • trunk/LayoutTests/fast/frames/seamless/seamless-form-post-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4         window.onload=function() {
    5             frames[0].document.getElementsByTagName('form')[0].submit();
    6         }
    7    
    8    
    9 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    102
  • trunk/LayoutTests/fast/frames/seamless/seamless-form-post-named-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4         window.onload=function() {
    5             frames[0].document.getElementsByTagName('form')[0].submit();
    6         }
    7    
    8    
    9 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    102
  • trunk/LayoutTests/fast/frames/seamless/seamless-hyperlink-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4         window.onload = function() {
    5             frames[0].document.getElementsByTagName('a')[0].click();
    6         }
    7    
    8    
    9 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    102
  • trunk/LayoutTests/fast/frames/seamless/seamless-hyperlink-named-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4         window.onload=function() {
    5             frames[0].document.getElementsByTagName('a')[0].click();
    6         }
    7    
    8    
    9 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    102
  • trunk/LayoutTests/fast/frames/seamless/seamless-window-location-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4    
    5 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    62
  • trunk/LayoutTests/fast/frames/seamless/seamless-window-location-href-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4    
    5 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    62
  • trunk/LayoutTests/fast/frames/seamless/seamless-window-location-sandbox-expected.txt

    r115742 r115796  
     1CONSOLE MESSAGE: Unsafe JavaScript attempt to initiate a navigation change for frame with URL about:srcdoc from frame with URL about:srcdoc.
     2
    13This test should not cause any navigation.
    24
     
    911Frame: '<!--framePath //<!--frame0-->/<!--frame0-->-->'
    1012--------
    11 
     13PASS
  • trunk/LayoutTests/fast/frames/seamless/seamless-window-open-expected.txt

    r115742 r115796  
    1 FAIL frames[0].document.body.textContent should be DONE
    2 . Was Waiting...
    3    
    4    
    5 .
     1PASS frames[0].document.body.textContent is "DONE\n"
    62
  • trunk/Source/WebCore/ChangeLog

    r115792 r115796  
     12012-05-01  Eric Seidel  <eric@webkit.org>
     2
     3        Add <iframe seamless> navigation code (and pass all the navigation tests)
     4        https://bugs.webkit.org/show_bug.cgi?id=85340
     5
     6        Reviewed by Adam Barth.
     7
     8        This code was primarily written by Adam Barth and then submitted to my
     9        GitHub branch via a pull request:
     10        https://github.com/eseidel/webkit/compare/master...seamless
     11        https://github.com/eseidel/webkit/pull/2
     12        https://github.com/eseidel/webkit/pull/3
     13
     14        I rewrote parts of it to use Docment::shouldDisplaySeamlesslyWithParent.
     15
     16        Other parts of the original change have already been committed to WebKit by Adam
     17        as part of prep-work for making the loader seamless-ready.
     18
     19        * loader/FrameLoader.cpp:
     20        (WebCore::FrameLoader::findFrameForNavigation):
     21
    1222012-05-01  Vincent Scheib  <scheib@chromium.org>
    223
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r115774 r115796  
    29222922    Frame* frame = m_frame->tree()->find(name);
    29232923
     2924    // From http://www.whatwg.org/specs/web-apps/current-work/#seamlessLinks:
     2925    //
     2926    // If the source browsing context is the same as the browsing context
     2927    // being navigated, and this browsing context has its seamless browsing
     2928    // context flag set, and the browsing context being navigated was not
     2929    // chosen using an explicit self-navigation override, then find the
     2930    // nearest ancestor browsing context that does not have its seamless
     2931    // browsing context flag set, and continue these steps as if that
     2932    // browsing context was the one that was going to be navigated instead.
     2933    if (frame == m_frame && name != "_self" && m_frame->document()->shouldDisplaySeamlesslyWithParent()) {
     2934        for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->parent(true)) {
     2935            if (!ancestor->document()->shouldDisplaySeamlesslyWithParent()) {
     2936                frame = ancestor;
     2937                break;
     2938            }
     2939        }
     2940        ASSERT(frame != m_frame);
     2941    }
     2942
    29242943    if (activeDocument) {
    29252944        if (!activeDocument->canNavigate(frame))
Note: See TracChangeset for help on using the changeset viewer.