Changeset 244331 in webkit
- Timestamp:
- Apr 16, 2019 9:28:28 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244330 r244331 1 2019-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 1 16 2019-04-16 Caitlin Potter <caitp@igalia.com> 2 17 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r244321 r244331 593 593 if (!m_stateMachine.committedFirstRealDocumentLoad()) 594 594 m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit); 595 596 m_client.dispatchDidExplicitOpen(m_frame.document() ? m_frame.document()->url() : URL());597 595 598 596 // Prevent window.open(url) -- eg window.open("about:blank") -- from blowing away results -
trunk/Source/WebCore/loader/FrameLoaderClient.h
r244321 r244331 182 182 virtual void dispatchDidFinishDocumentLoad() = 0; 183 183 virtual void dispatchDidFinishLoad() = 0; 184 virtual void dispatchDidExplicitOpen(const URL&) { }185 184 #if ENABLE(DATA_DETECTION) 186 185 virtual void dispatchDidFinishDataDetection(NSArray *detectionResults) = 0; -
trunk/Source/WebKit/ChangeLog
r244326 r244331 1 2019-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 1 16 2019-04-15 Joseph Pecoraro <pecoraro@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/PageLoadState.cpp
r244321 r244331 247 247 } 248 248 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 258 249 void PageLoadState::didStartProvisionalLoad(const Transaction::Token& token, const String& url, const String& unreachableURL) 259 250 { -
trunk/Source/WebKit/UIProcess/PageLoadState.h
r244321 r244331 144 144 145 145 void didStartProvisionalLoad(const Transaction::Token&, const String& url, const String& unreachableURL); 146 void didExplicitOpen(const Transaction::Token&, const String& url);147 146 void didReceiveServerRedirectForProvisionalLoad(const Transaction::Token&, const String& url); 148 147 void didFailProvisionalLoad(const Transaction::Token&); -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r244321 r244331 3923 3923 } 3924 3924 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 3942 3925 void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData) 3943 3926 { -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r244321 r244331 1592 1592 void didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t sameDocumentNavigationType, URL&&, const UserData&); 1593 1593 void didChangeMainDocument(uint64_t frameID); 1594 void didExplicitOpenForFrame(uint64_t frameID, URL&&);1595 1594 1596 1595 void didReceiveTitleForFrame(uint64_t frameID, const String&, const UserData&); -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r244321 r244331 141 141 DidDetectXSSForFrame(uint64_t frameID, WebKit::UserData userData) 142 142 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); 145 144 DidDestroyNavigation(uint64_t navigationID) 146 145 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r244321 r244331 459 459 } 460 460 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 471 461 void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() 472 462 { -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
r244321 r244331 117 117 void dispatchDidFinishDocumentLoad() final; 118 118 void dispatchDidFinishLoad() final; 119 void dispatchDidExplicitOpen(const URL&) final;120 119 121 120 void dispatchDidReachLayoutMilestone(OptionSet<WebCore::LayoutMilestone>) final; -
trunk/Tools/ChangeLog
r244322 r244331 1 2019-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 1 16 2019-04-15 Aakash Jain <aakash_jain@apple.com> 2 17 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r244321 r244331 189 189 467C565321B5ED130057516D /* GetSessionCookie.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 467C565121B5ECDF0057516D /* GetSessionCookie.html */; }; 190 190 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 */; };192 191 46918EFC2237283C00468DFE /* DeviceOrientation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46918EFB2237283500468DFE /* DeviceOrientation.mm */; }; 193 192 46A911592108E6780078D40D /* CustomUserAgent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 46A911582108E66B0078D40D /* CustomUserAgent.mm */; }; … … 1245 1244 CEA6CF2819CCF69D0064F5A7 /* open-and-close-window.html in Copy Resources */, 1246 1245 7CCB99231D3B4A46003922F6 /* open-multiple-external-url.html in Copy Resources */, 1247 468BC45522653A1000A36C96 /* open-window-then-write-to-it.html in Copy Resources */,1248 1246 290A9BB91735F63800D71BBC /* OpenNewWindow.html in Copy Resources */, 1249 1247 83148B09202AC78D00BADE99 /* override-builtins-test.html in Copy Resources */, … … 1579 1577 467C565121B5ECDF0057516D /* GetSessionCookie.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = GetSessionCookie.html; sourceTree = "<group>"; }; 1580 1578 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>"; };1582 1579 46918EFB2237283500468DFE /* DeviceOrientation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceOrientation.mm; sourceTree = "<group>"; }; 1583 1580 46A911582108E66B0078D40D /* CustomUserAgent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomUserAgent.mm; sourceTree = "<group>"; }; … … 3422 3419 4A410F4D19AF7BEF002EBAB6 /* ondevicechange.html */, 3423 3420 CEA6CF2719CCF69D0064F5A7 /* open-and-close-window.html */, 3424 468BC454226539C800A36C96 /* open-window-then-write-to-it.html */,3425 3421 83148B08202AC76800BADE99 /* override-builtins-test.html */, 3426 3422 0EBBCC651FFF9DCE00FA42AB /* pop-up-check.html */, -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm
r244321 r244331 283 283 openWindowFeatures = nullptr; 284 284 } 285 286 @interface OpenWindowThenDocumentOpenUIDelegate : NSObject <WKUIDelegate>287 @end288 289 @implementation OpenWindowThenDocumentOpenUIDelegate290 291 - (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures292 {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 @end299 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.