зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1308848 - Not request style of comment node when checking valid sibling. r=bz
MozReview-Commit-ID: 6Sq8C2LUkpT --HG-- extra : rebase_source : 2db641f09e66b7e5f1e6d48deb5bfb5fa9026948
This commit is contained in:
Родитель
493a6507b2
Коммит
5c2af0823d
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<table><tbody></tbody><tfoot></tfoot></table>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
let parent = document.querySelector("table");
|
||||
let comment = document.createComment("hello");
|
||||
let footer = document.querySelector("tfoot");
|
||||
parent.insertBefore(comment, footer);
|
||||
</script>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<table><tbody></tbody><tfoot></tfoot></table>
|
||||
<script>
|
||||
document.body.offsetTop;
|
||||
let parent = document.querySelector("table");
|
||||
let pi = document.createProcessingInstruction('xml-stylesheet', 'href="test.css"');
|
||||
let footer = document.querySelector("tfoot");
|
||||
parent.insertBefore(pi, footer);
|
||||
</script>
|
|
@ -480,3 +480,5 @@ load 1297835.html
|
|||
load 1288608.html
|
||||
load 1299736-1.html
|
||||
load 1308793.svg
|
||||
load 1308848-1.html
|
||||
load 1308848-2.html
|
||||
|
|
|
@ -6564,6 +6564,12 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
|||
NS_NOTREACHED("Shouldn't happen");
|
||||
return false;
|
||||
}
|
||||
if (aContent->IsNodeOfType(nsINode::eCOMMENT) ||
|
||||
aContent->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
|
||||
// Comments and processing instructions never have frames, so we
|
||||
// should not try to generate style contexts for them.
|
||||
return false;
|
||||
}
|
||||
// XXXbz when this code is killed, the state argument to
|
||||
// ResolveStyleContext can be made non-optional.
|
||||
RefPtr<nsStyleContext> styleContext =
|
||||
|
|
Загрузка…
Ссылка в новой задаче