Changeset 229108 in webkit
- Timestamp:
- Feb 28, 2018 3:58:22 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229107 r229108 1 2018-02-28 Chris Dumez <cdumez@apple.com> 2 3 html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183168 5 <rdar://problem/37951341> 6 7 Reviewed by Alex Christensen. 8 9 Add layout test coverage. 10 11 * TestExpectations: 12 * http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006-expected.txt: Added. 13 * http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006.html: Added. 14 * http/wpt/html/browsers/browsing-the-web/navigating-across-documents/click.html: Added. 15 * http/wpt/html/browsers/browsing-the-web/navigating-across-documents/href.html: Added. 16 1 17 2018-02-28 Alicia Boya García <aboya@igalia.com> 2 18 -
trunk/LayoutTests/TestExpectations
r229082 r229108 289 289 # This is a resources folder. 290 290 http/tests/workers/service/other_resources [ Skip ] 291 292 # These are resource files. 293 http/wpt/html/browsers/browsing-the-web/navigating-across-documents/click.html 294 http/wpt/html/browsers/browsing-the-web/navigating-across-documents/href.html 291 295 292 296 # We fail this reftest -
trunk/Source/WebCore/ChangeLog
r229106 r229108 1 2018-02-28 Chris Dumez <cdumez@apple.com> 2 3 html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183168 5 <rdar://problem/37951341> 6 7 Reviewed by Alex Christensen. 8 9 The test has an anchor element with both a 'click' event handler which submits a form 10 and an href attribute. When clicking the link, as per specification, things happen in 11 this order: 12 1. We fire the click event at the anchor, which will execute the event handler and submit the form. 13 Submitting the form *schedules* a navigation to 'click.html'. 14 2. We execute the anchor activation code which *navigates* to 'href.html'. The navigation to 15 'href' is supposed to cancel the pending navigation to 'click.html' and we should navigate 16 to 'href.html', which is what the test asserts. 17 18 The issue for us is that we do not cancel pending navigations until after the navigation 19 policy decision is made, when the provisional loads actually starts, in FrameLoader::provisionalLoadStarted(). 20 Because the policy decision for the navigation can now be made asynchronously, the NavigationScheduler 21 timer can now fire while the decision is made and we'll submit the form, thus navigating to 22 'click.html'. 23 24 To address the issue, we now cancel any pending navigations in FrameLoader::loadWithDocumentLoader(), 25 *before* doing the policy check for the navigation. 26 27 Test: http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006.html 28 29 * loader/FrameLoader.cpp: 30 (WebCore::FrameLoader::loadWithDocumentLoader): 31 1 32 2018-02-28 John Wilander <wilander@apple.com> 2 33 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r229100 r229108 1531 1531 } 1532 1532 1533 m_frame.navigationScheduler().cancel(true); 1534 1533 1535 policyChecker().checkNavigationPolicy(ResourceRequest(loader->request()), false /* didReceiveRedirectResponse */, loader, formState, [this, allowNavigationToInvalidURL] (const ResourceRequest& request, FormState* formState, bool shouldContinue) { 1534 1536 continueLoadAfterNavigationPolicy(request, formState, shouldContinue, allowNavigationToInvalidURL);
Note: See TracChangeset
for help on using the changeset viewer.