Changeset 229133 in webkit


Ignore:
Timestamp:
Mar 1, 2018 9:05:23 AM (6 years ago)
Author:
Chris Dumez
Message:

imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183225
<rdar://problem/38003828>

Reviewed by Alex Christensen.

Source/WebCore:

Bypass navigation policy check when loading about:blank. This does not seem necessary and it would not
be Web-compatible for such policy check to happen synchronously. This is because an iframe without src
or src="about:blank" should load synchronously as per HTML specification.

Test: http/wpt/html/browsers/windows/browsing-context.html

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):

LayoutTests:

  • http/wpt/html/browsers/windows/browsing-context-expected.txt: Added.
  • http/wpt/html/browsers/windows/browsing-context.html: Added.

Add layout test coverage.

  • fast/loader/iframe-src-invalid-url-expected.txt:
  • fast/loader/policy-delegate-action-hit-test-zoomed-expected.txt:
  • loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt:
  • loader/navigation-policy/should-open-external-urls/subframe-click-target-top-expected.txt:

Rebaseline a few layout tests now that the log lines for the about:blank policy checks are
gone.

Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r229118 r229133  
     12018-03-01  Chris Dumez  <cdumez@apple.com>
     2
     3        imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html fails with async policy delegates
     4        https://bugs.webkit.org/show_bug.cgi?id=183225
     5        <rdar://problem/38003828>
     6
     7        Reviewed by Alex Christensen.
     8
     9        * http/wpt/html/browsers/windows/browsing-context-expected.txt: Added.
     10        * http/wpt/html/browsers/windows/browsing-context.html: Added.
     11        Add layout test coverage.
     12
     13        * fast/loader/iframe-src-invalid-url-expected.txt:
     14        * fast/loader/policy-delegate-action-hit-test-zoomed-expected.txt:
     15        * loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt:
     16        * loader/navigation-policy/should-open-external-urls/subframe-click-target-top-expected.txt:
     17        Rebaseline a few layout tests now that the log lines for the about:blank policy checks are
     18        gone.
     19
    1202018-02-28  Nan Wang  <n_wang@apple.com>
    221
  • trunk/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt

    r200799 r229133  
    11 - decidePolicyForNavigationAction
    22<NSURLRequest URL data:text/html,    <iframe id='iframe' src='<p>FAILURE</p>'></iframe>, main document URL iframe-src-invalid-url.html, http method GET> is main frame - no should open URLs externally - no
    3  - decidePolicyForNavigationAction
    4 <NSURLRequest URL about:blank, main document URL iframe-src-invalid-url.html, http method GET> is main frame - no should open URLs externally - no
    53Test passes if the second iframe navigates to about:blank.
    64
  • trunk/LayoutTests/fast/loader/policy-delegate-action-hit-test-zoomed-expected.txt

    r42741 r229133  
    1 Policy delegate: attempt to load about:blank with navigation type 'link clicked' originating from #text > A > BODY > HTML > #document
    21This is a test for rdar://problem/6755137 Action dictionary for policy decision is missing keys when full-page zoom is used.
    32
  • trunk/LayoutTests/loader/navigation-policy/should-open-external-urls/subframe-click-target-self-expected.txt

    r219170 r229133  
    1  - decidePolicyForNavigationAction
    2 <NSURLRequest URL about:blank, main document URL subframe-click-target-self.html, http method GET> is main frame - no should open URLs externally - no
    31 - decidePolicyForNavigationAction
    42<NSURLRequest URL resources/iframe-click-notify-done-target-self.html, main document URL subframe-click-target-self.html, http method GET> is main frame - no should open URLs externally - no
  • trunk/LayoutTests/loader/navigation-policy/should-open-external-urls/subframe-click-target-top-expected.txt

    r185111 r229133  
    1  - decidePolicyForNavigationAction
    2 <NSURLRequest URL about:blank, main document URL subframe-click-target-top.html, http method GET> is main frame - no should open URLs externally - no
    31 - decidePolicyForNavigationAction
    42<NSURLRequest URL resources/iframe-click-notify-done-target-top.html, main document URL subframe-click-target-top.html, http method GET> is main frame - no should open URLs externally - no
  • trunk/Source/WebCore/ChangeLog

    r229132 r229133  
     12018-03-01  Chris Dumez  <cdumez@apple.com>
     2
     3        imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html fails with async policy delegates
     4        https://bugs.webkit.org/show_bug.cgi?id=183225
     5        <rdar://problem/38003828>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Bypass navigation policy check when loading about:blank. This does not seem necessary and it would not
     10        be Web-compatible for such policy check to happen synchronously. This is because an iframe without src
     11        or src="about:blank" should load synchronously as per HTML specification.
     12
     13        Test: http/wpt/html/browsers/windows/browsing-context.html
     14
     15        * loader/PolicyChecker.cpp:
     16        (WebCore::PolicyChecker::checkNavigationPolicy):
     17
    1182018-03-01  Christopher Reid  <chris.reid@sony.com>
    219
  • trunk/Source/WebCore/loader/PolicyChecker.cpp

    r228922 r229133  
    124124    loader->setLastCheckedRequest(ResourceRequest(request));
    125125
     126    if (request.url() == blankURL())
     127        return function(WTFMove(request), formState, true);
     128
    126129#if USE(QUICK_LOOK)
    127130    // Always allow QuickLook-generated URLs based on the protocol scheme.
Note: See TracChangeset for help on using the changeset viewer.