Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=218496 Patch by Rob Buis <rbuis@igalia.com> on 2021-02-10 Reviewed by Darin Adler. Source/WebCore: Use event loop to set title to avoid calling WebFrameLoaderClient within HTMLTitleElement::insertedIntoAncestor. * dom/Document.cpp: (WebCore::Document::updateTitle): * dom/Document.h: (WebCore::Document::titleWithDirection const): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setTitle): * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::print): * page/ChromeClient.h: Source/WebKit: Add title parameter to PrintFrame message. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::printFrame): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::print): * WebProcess/WebCoreSupport/WebChromeClient.h: Source/WebKitLegacy/mac: Adjust to API change. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::print): Source/WebKitLegacy/win: Adjust to API change. * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::print): * WebCoreSupport/WebChromeClient.h: Tools: Adapt unit tests to wait for title change tasks to be processed. * TestWebKitAPI/Tests/WebKit/PageLoadState.cpp: (TestWebKitAPI::didChangeTitle): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm: (TEST): * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: (testWebViewAuthenticationFailure): (testWebViewAuthenticationNoCredential): (testWebViewAuthenticationSuccess): (testWebViewAuthenticationEmptyRealm): * TestWebKitAPI/Tests/WebKitGLib/TestBackForwardList.cpp: (testBackForwardListNavigation): * TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp: (testWebViewTitle): * TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp: (testLoadFailedWithTLSErrors): * TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp: (testWebKitSettingsJavaScriptMarkup): * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp: (testWebViewTitleChange): LayoutTests: Adapt tests to make sure pending title change tasks are processed before the test is done. * TestExpectations: * fast/dom/title-text-property-2.html: * fast/dom/title-text-property-assigning-empty-string.html: * fast/dom/title-text-property.html: * http/tests/globalhistory/history-delegate-basic-title-expected.txt: * http/tests/globalhistory/history-delegate-basic-title.html: * http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt: * http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html: * http/tests/loading/redirect-with-no-location-crash-expected.txt: * http/tests/loading/redirect-with-no-location-crash.html: * platform/mac-wk2/TestExpectations: * platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt: Copied from LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt. * platform/wk2/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt: * platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt: Canonical link: https://commits.webkit.org/233952@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
9e03d9d
commit 0ee3e32
Showing
43 changed files
with
246 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
LayoutTests/fast/dom/title-text-property-assigning-empty-string.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function runTests() { | ||
function startTest() { | ||
if (window.testRunner) { | ||
testRunner.waitUntilDone(); | ||
testRunner.dumpAsText(); | ||
testRunner.dumpTitleChanges(); | ||
} | ||
|
||
document.title = 'New non-empty title'; | ||
internals.queueTask("DOMManipulation", () => endTest()) | ||
} | ||
|
||
function endTest() { | ||
document.title = ''; | ||
internals.queueTask("DOMManipulation", () => testRunner.notifyDone()) | ||
} | ||
</script> | ||
</head> | ||
<body onload='runTests();'> | ||
<body onload='startTest();'> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
LayoutTests/http/tests/globalhistory/history-delegate-basic-title-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
WebView navigated to url "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" with title "" with HTTP equivalent method "GET". The navigation was successful and was not a client redirect. | ||
WebView updated the title for history URL "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" to "Test Title 1". | ||
WebView updated the title for history URL "http://127.0.0.1:8000/globalhistory/history-delegate-basic-title.html" to "Test Title 2". | ||
This test sees if the history delegate is notified of title changes. |
11 changes: 8 additions & 3 deletions
11
LayoutTests/http/tests/globalhistory/history-delegate-basic-title.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
<html> | ||
<head> | ||
<script> | ||
if (window.testRunner) | ||
if (window.testRunner) { | ||
testRunner.waitUntilDone(); | ||
testRunner.dumpAsText(); | ||
} | ||
</script> | ||
<title>Test Title 1</title> | ||
</head> | ||
<body> | ||
<body onload="runTest()"> | ||
This test sees if the history delegate is notified of title changes. | ||
</body> | ||
<script> | ||
function runTest() { | ||
document.title = "Test Title 2"; | ||
internals.queueTask("DOMManipulation", () => testRunner.notifyDone()); | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
LayoutTests/http/tests/loading/redirect-with-no-location-crash-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...platform/win/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
main frame - didStartProvisionalLoadForFrame | ||
main frame - didCommitLoadForFrame | ||
frame "<!--frame1-->" - didStartProvisionalLoadForFrame | ||
main frame - didFinishDocumentLoadForFrame | ||
http://127.0.0.1:8000/loading/resources/basic-auth-testing.php?username=webkit&password=rocks - didReceiveAuthenticationChallenge - Responding with webkit:rocks | ||
frame "<!--frame1-->" - didCommitLoadForFrame | ||
frame "<!--frame1-->" - didFinishDocumentLoadForFrame | ||
frame "<!--frame1-->" - didHandleOnloadEventsForFrame | ||
frame "<!--frame1-->" - willPerformClientRedirectToURL: http://127.0.0.1:8000/a//b/non-existent-file.html | ||
main frame - didHandleOnloadEventsForFrame | ||
frame "<!--frame1-->" - didFinishLoadForFrame | ||
main frame - didFinishLoadForFrame | ||
frame "<!--frame1-->" - didStartProvisionalLoadForFrame | ||
frame "<!--frame1-->" - didCancelClientRedirectForFrame | ||
frame "<!--frame1-->" - didCommitLoadForFrame | ||
frame "<!--frame1-->" - didFinishDocumentLoadForFrame | ||
frame "<!--frame1-->" - didHandleOnloadEventsForFrame | ||
frame "<!--frame1-->" - didFinishLoadForFrame | ||
frame "<!--frame1-->" - didReceiveTitle: 404 Not Found | ||
PASS did not cause assertion failure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
LayoutTests/platform/wk2/http/tests/loading/redirect-with-no-location-crash-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.