Changeset 244331 in webkit


Ignore:
Timestamp:
Apr 16, 2019 9:28:28 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r244321.
https://bugs.webkit.org/show_bug.cgi?id=196968

Causing all WK2 Debug builds to exit early after Assertion
failures. (Requested by ShawnRoberts on #webkit).

Reverted changeset:

"URL set by document.open() is not communicated to the
UIProcess"
https://bugs.webkit.org/show_bug.cgi?id=196941
https://trac.webkit.org/changeset/244321

Location:
trunk
Files:
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244330 r244331  
     12019-04-16  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244321.
     4        https://bugs.webkit.org/show_bug.cgi?id=196968
     5
     6        Causing all WK2 Debug builds to exit early after Assertion
     7        failures. (Requested by ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "URL set by document.open() is not communicated to the
     12        UIProcess"
     13        https://bugs.webkit.org/show_bug.cgi?id=196941
     14        https://trac.webkit.org/changeset/244321
     15
    1162019-04-16  Caitlin Potter  <caitp@igalia.com>
    217
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r244321 r244331  
    593593    if (!m_stateMachine.committedFirstRealDocumentLoad())
    594594        m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit);
    595 
    596     m_client.dispatchDidExplicitOpen(m_frame.document() ? m_frame.document()->url() : URL());
    597595   
    598596    // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing away results
  • trunk/Source/WebCore/loader/FrameLoaderClient.h

    r244321 r244331  
    182182    virtual void dispatchDidFinishDocumentLoad() = 0;
    183183    virtual void dispatchDidFinishLoad() = 0;
    184     virtual void dispatchDidExplicitOpen(const URL&) { }
    185184#if ENABLE(DATA_DETECTION)
    186185    virtual void dispatchDidFinishDataDetection(NSArray *detectionResults) = 0;
  • trunk/Source/WebKit/ChangeLog

    r244326 r244331  
     12019-04-16  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244321.
     4        https://bugs.webkit.org/show_bug.cgi?id=196968
     5
     6        Causing all WK2 Debug builds to exit early after Assertion
     7        failures. (Requested by ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "URL set by document.open() is not communicated to the
     12        UIProcess"
     13        https://bugs.webkit.org/show_bug.cgi?id=196941
     14        https://trac.webkit.org/changeset/244321
     15
    1162019-04-15  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/PageLoadState.cpp

    r244321 r244331  
    247247}
    248248
    249 void PageLoadState::didExplicitOpen(const Transaction::Token& token, const String& url)
    250 {
    251     ASSERT_UNUSED(token, &token.m_pageLoadState == this);
    252 
    253     m_uncommittedState.state = State::Finished;
    254     m_uncommittedState.url = url;
    255     m_uncommittedState.provisionalURL = String();
    256 }
    257 
    258249void PageLoadState::didStartProvisionalLoad(const Transaction::Token& token, const String& url, const String& unreachableURL)
    259250{
  • trunk/Source/WebKit/UIProcess/PageLoadState.h

    r244321 r244331  
    144144
    145145    void didStartProvisionalLoad(const Transaction::Token&, const String& url, const String& unreachableURL);
    146     void didExplicitOpen(const Transaction::Token&, const String& url);
    147146    void didReceiveServerRedirectForProvisionalLoad(const Transaction::Token&, const String& url);
    148147    void didFailProvisionalLoad(const Transaction::Token&);
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r244321 r244331  
    39233923}
    39243924
    3925 void WebPageProxy::didExplicitOpenForFrame(uint64_t frameID, URL&& url)
    3926 {
    3927     auto* frame = m_process->webFrame(frameID);
    3928     MESSAGE_CHECK(m_process, frame);
    3929     MESSAGE_CHECK_URL(m_process, url);
    3930 
    3931     auto transaction = m_pageLoadState.transaction();
    3932 
    3933     if (frame->isMainFrame())
    3934         m_pageLoadState.didExplicitOpen(transaction, url);
    3935 
    3936     m_hasCommittedAnyProvisionalLoads = true;
    3937     m_process->didCommitProvisionalLoad();
    3938 
    3939     m_pageLoadState.commitChanges();
    3940 }
    3941 
    39423925void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData)
    39433926{
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r244321 r244331  
    15921592    void didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, URL&&, const UserData&);
    15931593    void didChangeMainDocument(uint64_t frameID);
    1594     void didExplicitOpenForFrame(uint64_t frameID, URL&&);
    15951594
    15961595    void didReceiveTitleForFrame(uint64_t frameID, const String&, const UserData&);
  • trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r244321 r244331  
    141141    DidDetectXSSForFrame(uint64_t frameID, WebKit::UserData userData)
    142142    DidSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t type, URL url, WebKit::UserData userData)
    143     DidChangeMainDocument(uint64_t frameID)
    144     DidExplicitOpenForFrame(uint64_t frameID, URL url)
     143    DidChangeMainDocument(uint64_t frameID);
    145144    DidDestroyNavigation(uint64_t navigationID)
    146145
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r244321 r244331  
    459459}
    460460
    461 void WebFrameLoaderClient::dispatchDidExplicitOpen(const URL& url)
    462 {
    463     auto* webPage = m_frame->page();
    464     if (!webPage)
    465         return;
    466 
    467     // Notify the UIProcess.
    468     webPage->send(Messages::WebPageProxy::DidExplicitOpenForFrame(m_frame->frameID(), url));
    469 }
    470 
    471461void WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
    472462{
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h

    r244321 r244331  
    117117    void dispatchDidFinishDocumentLoad() final;
    118118    void dispatchDidFinishLoad() final;
    119     void dispatchDidExplicitOpen(const URL&) final;
    120119
    121120    void dispatchDidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone>) final;
  • trunk/Tools/ChangeLog

    r244322 r244331  
     12019-04-16  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r244321.
     4        https://bugs.webkit.org/show_bug.cgi?id=196968
     5
     6        Causing all WK2 Debug builds to exit early after Assertion
     7        failures. (Requested by ShawnRoberts on #webkit).
     8
     9        Reverted changeset:
     10
     11        "URL set by document.open() is not communicated to the
     12        UIProcess"
     13        https://bugs.webkit.org/show_bug.cgi?id=196941
     14        https://trac.webkit.org/changeset/244321
     15
    1162019-04-15  Aakash Jain  <aakash_jain@apple.com>
    217
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r244321 r244331  
    189189                467C565321B5ED130057516D /* GetSessionCookie.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 467C565121B5ECDF0057516D /* GetSessionCookie.html */; };
    190190                467C565421B5ED130057516D /* SetSessionCookie.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 467C565221B5ECDF0057516D /* SetSessionCookie.html */; };
    191                 468BC45522653A1000A36C96 /* open-window-then-write-to-it.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 468BC454226539C800A36C96 /* open-window-then-write-to-it.html */; };
    192191                46918EFC2237283C00468DFE /* DeviceOrientation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46918EFB2237283500468DFE /* DeviceOrientation.mm */; };
    193192                46A911592108E6780078D40D /* CustomUserAgent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A911582108E66B0078D40D /* CustomUserAgent.mm */; };
     
    12451244                                CEA6CF2819CCF69D0064F5A7 /* open-and-close-window.html in Copy Resources */,
    12461245                                7CCB99231D3B4A46003922F6 /* open-multiple-external-url.html in Copy Resources */,
    1247                                 468BC45522653A1000A36C96 /* open-window-then-write-to-it.html in Copy Resources */,
    12481246                                290A9BB91735F63800D71BBC /* OpenNewWindow.html in Copy Resources */,
    12491247                                83148B09202AC78D00BADE99 /* override-builtins-test.html in Copy Resources */,
     
    15791577                467C565121B5ECDF0057516D /* GetSessionCookie.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = GetSessionCookie.html; sourceTree = "<group>"; };
    15801578                467C565221B5ECDF0057516D /* SetSessionCookie.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = SetSessionCookie.html; sourceTree = "<group>"; };
    1581                 468BC454226539C800A36C96 /* open-window-then-write-to-it.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "open-window-then-write-to-it.html"; sourceTree = "<group>"; };
    15821579                46918EFB2237283500468DFE /* DeviceOrientation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceOrientation.mm; sourceTree = "<group>"; };
    15831580                46A911582108E66B0078D40D /* CustomUserAgent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomUserAgent.mm; sourceTree = "<group>"; };
     
    34223419                                4A410F4D19AF7BEF002EBAB6 /* ondevicechange.html */,
    34233420                                CEA6CF2719CCF69D0064F5A7 /* open-and-close-window.html */,
    3424                                 468BC454226539C800A36C96 /* open-window-then-write-to-it.html */,
    34253421                                83148B08202AC76800BADE99 /* override-builtins-test.html */,
    34263422                                0EBBCC651FFF9DCE00FA42AB /* pop-up-check.html */,
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm

    r244321 r244331  
    283283    openWindowFeatures = nullptr;
    284284}
    285 
    286 @interface OpenWindowThenDocumentOpenUIDelegate : NSObject <WKUIDelegate>
    287 @end
    288 
    289 @implementation OpenWindowThenDocumentOpenUIDelegate
    290 
    291 - (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures
    292 {
    293     openedWebView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration]);
    294     [openedWebView setUIDelegate:sharedUIDelegate.get()];
    295     return openedWebView.get();
    296 }
    297 
    298 @end
    299 
    300 TEST(WebKit, OpenWindowThenDocumentOpen)
    301 {
    302     resetToConsistentState();
    303 
    304     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
    305 
    306     auto uiDelegate = adoptNS([[OpenWindowThenDocumentOpenUIDelegate alloc] init]);
    307     [webView setUIDelegate:uiDelegate.get()];
    308     [webView configuration].preferences.javaScriptCanOpenWindowsAutomatically = YES;
    309 
    310     NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"open-window-then-write-to-it" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
    311     [webView loadRequest:request];
    312 
    313     while (!openedWebView)
    314         TestWebKitAPI::Util::sleep(0.1);
    315 
    316     // Both WebViews should have the same URL because of document.open().
    317     while (![[[openedWebView URL] absoluteString] isEqualToString:[[webView URL] absoluteString]])
    318         TestWebKitAPI::Util::sleep(0.1);
    319 }
Note: See TracChangeset for help on using the changeset viewer.