-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notify of appends to the right document when parsing into an already-…
…adopted node. nsContentSink used to decide that it was fine to not notify of silent appends to a document from the parser if the node was not on our document already. That's not ok, since if styling or layout have happened already on the document we're getting inserted into nobody notices them, which is wrong. Differential Revision: https://phabricator.services.mozilla.com/D25300 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1539742 gecko-commit: cf6cfe33476622c202fcbc34ef12f8ca1c039b8a gecko-integration-branch: central gecko-reviewers: bzbarsky
- Loading branch information
1 parent
81ae708
commit 3a4ed45
Showing
3 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!doctype html> | ||
<title>Test reference</title> | ||
<style> | ||
html, body { margin: 0 } | ||
</style> | ||
<iframe src="about:blank"></iframe> | ||
<div> | ||
PASS | ||
</div> |
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,19 @@ | ||
<!doctype html> | ||
<title>Appending from the parser after adopting in an XML document doesn't miss notifications</title> | ||
<link rel="match" href="adopt-while-parsing-001-ref.html"> | ||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1511329"> | ||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> | ||
<link rel="author" title="Mozilla" href="https://mozilla.org"> | ||
<style> | ||
html, body { margin: 0 } | ||
</style> | ||
<script> | ||
// If we don't get notified of the <div> insertion, the PASS text will never appear. | ||
function parsingInterrupted() { | ||
let frameDoc = document.querySelector("iframe").contentDocument; | ||
let root = frameDoc.documentElement; | ||
document.documentElement.appendChild(root); | ||
root.offsetTop; | ||
} | ||
</script> | ||
<iframe src="adopt-while-parsing.xhtml"></iframe> |
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,11 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<body> | ||
<script> | ||
window.parent.parsingInterrupted(); | ||
</script> | ||
<div> | ||
PASS | ||
</div> | ||
</body> | ||
</html> |