Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document.open() should remove the initial about:blank-ness of the document #4546

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented Sep 20, 2022

dc6d5ef

document.open() should remove the initial about:blank-ness of the document
https://bugs.webkit.org/show_bug.cgi?id=245445

Reviewed by Darin Adler and Youenn Fablet.

document.open() should remove the initial about:blank-ness of the document.
This aligns our behavior with Firefox and Chrome.

* LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/remove-initial-about-blankness.window-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::open):

Canonical link: https://commits.webkit.org/254747@main

b123149

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim   πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
  πŸ›  tv βœ… πŸ§ͺ mac-wk1
  πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge   πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2
  πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@cdumez cdumez self-assigned this Sep 20, 2022
@cdumez cdumez added Page Loading For bugs in page loading, including handling of network callbacks. WebKit Nightly Build labels Sep 20, 2022
@cdumez cdumez marked this pull request as ready for review September 21, 2022 14:45
@cdumez cdumez requested a review from rniwa as a code owner September 21, 2022 14:45
if (m_frame)
if (m_frame) {
// Calling window.open() counts as committing the first real document load.
WTFLogAlways("CHRIS: state was %u", (unsigned)m_frame->loader().stateMachine().stateForDebugging());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably do not want those logs

@@ -3043,8 +3043,16 @@ ExceptionOr<void> Document::open(Document* entryDocument)
if (ScriptableDocumentParser* parser = scriptableDocumentParser())
parser->setWasCreatedByScript(true);

if (m_frame)
if (m_frame) {
// Calling window.open() counts as committing the first real document load.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a pointer to the spec, either here or in commit message

@cdumez cdumez force-pushed the 245445_document_open_about_blank branch from 1bb4005 to b4022bc Compare September 21, 2022 15:44
if (m_frame) {
// Set document's is initial about:blank to false.
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document-open-steps (step 13)
if (m_frame->loader().stateMachine().committingFirstRealLoad())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like maybe it should be a FrameLoader function.

@cdumez cdumez force-pushed the 245445_document_open_about_blank branch from b4022bc to b123149 Compare September 21, 2022 20:00
@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2022
…ument

https://bugs.webkit.org/show_bug.cgi?id=245445

Reviewed by Darin Adler and Youenn Fablet.

document.open() should remove the initial about:blank-ness of the document.
This aligns our behavior with Firefox and Chrome.

* LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/remove-initial-about-blankness.window-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::open):

Canonical link: https://commits.webkit.org/254747@main
@webkit-commit-queue
Copy link
Collaborator

Committed 254747@main (dc6d5ef): https://commits.webkit.org/254747@main

Reviewed commits have been landed. Closing PR #4546 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit dc6d5ef into WebKit:main Sep 22, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Page Loading For bugs in page loading, including handling of network callbacks.
Projects
None yet
5 participants