| Differences between
and this patch
- a/Source/WebCore/ChangeLog +17 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2018-03-05  Chris Dumez  <cdumez@apple.com>
2
3
        fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
4
        https://bugs.webkit.org/show_bug.cgi?id=183337
5
6
        Reviewed by Ryosuke Niwa.
7
8
        Make sure we call checkCompleted() before calling checkLoadComplete() in
9
        FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
10
        to ignore the navigation, so that we properly recognize that the load is
11
        done. This matches what is already done in FrameLoader::receivedMainResourceError().
12
13
        Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html
14
15
        * loader/FrameLoader.cpp:
16
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
17
1
2018-03-05  Andy Estes  <aestes@apple.com>
18
2018-03-05  Andy Estes  <aestes@apple.com>
2
19
3
        [Mac] Fix the build
20
        [Mac] Fix the build
- a/Source/WebCore/loader/FrameLoader.cpp +1 lines
Lines 3159-3164 void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest& reque a/Source/WebCore/loader/FrameLoader.cpp_sec1
3159
            clientRedirectCancelledOrFinished(false);
3159
            clientRedirectCancelledOrFinished(false);
3160
3160
3161
        setPolicyDocumentLoader(nullptr);
3161
        setPolicyDocumentLoader(nullptr);
3162
        checkCompleted();
3162
        checkLoadComplete();
3163
        checkLoadComplete();
3163
3164
3164
        // If the navigation request came from the back/forward menu, and we punt on it, we have the 
3165
        // If the navigation request came from the back/forward menu, and we punt on it, we have the 
- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp -3 / +4 lines
Lines 1321-1329 WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNavigationAction(WKB a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp_sec1
1321
        injectedBundle.outputText(stringBuilder.toString());
1321
        injectedBundle.outputText(stringBuilder.toString());
1322
    }
1322
    }
1323
1323
1324
    if (injectedBundle.testRunner()->shouldDecideNavigationPolicyAfterDelay())
1325
        return WKBundlePagePolicyActionPassThrough;
1326
1327
    if (!injectedBundle.testRunner()->isPolicyDelegateEnabled()) {
1324
    if (!injectedBundle.testRunner()->isPolicyDelegateEnabled()) {
1328
        WKRetainPtr<WKStringRef> downloadAttributeRef(AdoptWK, WKBundleNavigationActionCopyDownloadAttribute(navigationAction));
1325
        WKRetainPtr<WKStringRef> downloadAttributeRef(AdoptWK, WKBundleNavigationActionCopyDownloadAttribute(navigationAction));
1329
        String downloadAttribute = toWTFString(downloadAttributeRef);
1326
        String downloadAttribute = toWTFString(downloadAttributeRef);
Lines 1353-1358 WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNavigationAction(WKB a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp_sec2
1353
1350
1354
    stringBuilder.append('\n');
1351
    stringBuilder.append('\n');
1355
    injectedBundle.outputText(stringBuilder.toString());
1352
    injectedBundle.outputText(stringBuilder.toString());
1353
1354
    if (injectedBundle.testRunner()->shouldDecideNavigationPolicyAfterDelay())
1355
        return WKBundlePagePolicyActionPassThrough;
1356
1356
    injectedBundle.testRunner()->notifyDone();
1357
    injectedBundle.testRunner()->notifyDone();
1357
1358
1358
    if (injectedBundle.testRunner()->isPolicyDelegatePermissive())
1359
    if (injectedBundle.testRunner()->isPolicyDelegatePermissive())
- a/LayoutTests/ChangeLog +12 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2018-03-05  Chris Dumez  <cdumez@apple.com>
2
3
        fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
4
        https://bugs.webkit.org/show_bug.cgi?id=183337
5
6
        Reviewed by Ryosuke Niwa.
7
8
        Add layout test coverage.
9
10
        * fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt: Added.
11
        * fast/loader/onload-policy-ignore-for-frame-async-delegates.html: Added.
12
1
2018-03-05  Ryan Haddad  <ryanhaddad@apple.com>
13
2018-03-05  Ryan Haddad  <ryanhaddad@apple.com>
2
14
3
        Unreviewed, add baseline for fast/text/combining-enclosing-keycap.html.
15
        Unreviewed, add baseline for fast/text/combining-enclosing-keycap.html.
- a/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt +5 lines
Line 0 a/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt_sec1
1
Policy delegate: attempt to load http://www.example.com/ with navigation type 'other'
2
Test for window.onload never fires if page contains an <iframe> with a bad scheme or whose load is cancelled by returning null from resource load delegate's willSendRequest. If the test passes, you should see the word "PASSED" below.
3
4
PASSED
5
- a/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates.html +30 lines
Line 0 a/LayoutTests/fast/loader/onload-policy-ignore-for-frame-async-delegates.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <title>Test for Bug 33533: window.onload never fires if page contains an &lt;iframe> with a bad scheme or whose load is cancelled by returning null from resource load delegate's willSendRequest</title>
5
    <script>
6
        if (window.testRunner) {
7
            testRunner.dumpAsText();
8
            testRunner.setCustomPolicyDelegate(true);
9
            if (testRunner.setShouldDecideNavigationPolicyAfterDelay)
10
                testRunner.setShouldDecideNavigationPolicyAfterDelay(true);
11
        }
12
13
        window.onload = function() {
14
            var result = document.getElementById("result");
15
            if (!window.testRunner) {
16
                result.innerText = "This test can only be run in DumpRenderTree.";
17
                return;
18
            }
19
            result.innerText = "PASSED";
20
        };
21
    </script>
22
</head>
23
<body>
24
    <p>Test for <a href="http://webkit.org/b/33533">window.onload never fires if page contains an
25
    &lt;iframe> with a bad scheme or whose load is cancelled by returning null from resource load
26
    delegate's willSendRequest</a>. If the test passes, you should see the word "PASSED" below.</p>
27
    <div id=result>FAILED</div>
28
    <iframe src="http://www.example.com/"></iframe>
29
</body>
30
</html>

Return to Bug 183337