Changeset 228299 in webkit


Ignore:
Timestamp:
Feb 8, 2018 3:49:16 PM (6 years ago)
Author:
Chris Dumez
Message:

Form submission after navigation fails when decidePolicyForNavigationAction is async
https://bugs.webkit.org/show_bug.cgi?id=182412
<rdar://problem/35181099>

Reviewed by Alex Christensen.

Source/WebCore:

When the form is submitted and schedules the load in an iframe that is already loading,
FrameLoader::stopLoading() is called as expected. However, because policy checks can
now be asynchronous, stopLoading() also needs to stop pending policy checks. Otherwise,
continueLoadAfterNavigationPolicy() gets called for a cancelled load and we're in trouble
because the FrameLoader was reused for another load since then.

Test: http/tests/navigation/sync-form-submit-iframe.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::stopLoading):

LayoutTests:

Import layout test coverage from Alex's earlier patch.

  • http/tests/navigation/resources/a.html: Added.
  • http/tests/navigation/resources/b.html: Added.
  • http/tests/navigation/sync-form-submit-iframe-expected.txt: Added.
  • http/tests/navigation/sync-form-submit-iframe.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r228295 r228299  
     12018-02-08  Chris Dumez  <cdumez@apple.com>
     2
     3        Form submission after navigation fails when decidePolicyForNavigationAction is async
     4        https://bugs.webkit.org/show_bug.cgi?id=182412
     5        <rdar://problem/35181099>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Import layout test coverage from Alex's earlier patch.
     10
     11        * http/tests/navigation/resources/a.html: Added.
     12        * http/tests/navigation/resources/b.html: Added.
     13        * http/tests/navigation/sync-form-submit-iframe-expected.txt: Added.
     14        * http/tests/navigation/sync-form-submit-iframe.html: Added.
     15
    1162018-02-08  Per Arne Vollan  <pvollan@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r228289 r228299  
     12018-02-08  Chris Dumez  <cdumez@apple.com>
     2
     3        Form submission after navigation fails when decidePolicyForNavigationAction is async
     4        https://bugs.webkit.org/show_bug.cgi?id=182412
     5        <rdar://problem/35181099>
     6
     7        Reviewed by Alex Christensen.
     8
     9        When the form is submitted and schedules the load in an iframe that is already loading,
     10        FrameLoader::stopLoading() is called as expected. However, because policy checks can
     11        now be asynchronous, stopLoading() also needs to stop pending policy checks. Otherwise,
     12        continueLoadAfterNavigationPolicy() gets called for a cancelled load and we're in trouble
     13        because the FrameLoader was reused for another load since then.
     14
     15        Test: http/tests/navigation/sync-form-submit-iframe.html
     16
     17        * loader/FrameLoader.cpp:
     18        (WebCore::FrameLoader::stopLoading):
     19
    1202018-02-08  Zalan Bujtas  <zalan@apple.com>
    221
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r228231 r228299  
    489489    }
    490490
     491    policyChecker().stopCheck();
     492
    491493    // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache.
    492494    m_frame.navigationScheduler().cancel();
Note: See TracChangeset for help on using the changeset viewer.