mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1402476. ExpectedOwnerForChild should not return a first-letter frame for a text child. r=emilio
The expected owner is the DOM parent. The first-letter then does some reparenting of the text style later.
This commit is contained in:
parent
18b234fd09
commit
4a228305f6
@ -84,6 +84,12 @@ ExpectedOwnerForChild(const nsIFrame& aFrame)
|
||||
return parent->IsLineFrame() ? parent->GetParent() : parent;
|
||||
}
|
||||
|
||||
if (parent->IsLetterFrame()) {
|
||||
// Things never have ::first-letter as their expected parent. Go
|
||||
// on up to the ::first-letter's parent.
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
parent = FirstContinuationOrPartOfIBSplit(parent);
|
||||
|
||||
// We've handled already anon boxes and bullet frames, so now we're looking at
|
||||
|
13
layout/base/crashtests/1402476.html
Normal file
13
layout/base/crashtests/1402476.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html class="reftest-wait">
|
||||
<script>
|
||||
a = document.createElement("style")
|
||||
a.appendChild(document.createTextNode("*:first-letter { }"))
|
||||
document.documentElement.appendChild(a)
|
||||
a.style.display = "contents"
|
||||
requestIdleCallback(() => {
|
||||
a.appendChild(document.createElement("x"));
|
||||
a.lastChild.offsetWidth;
|
||||
document.documentElement.className = "";
|
||||
})
|
||||
</script>
|
||||
</html>
|
@ -505,3 +505,4 @@ load 1400438-1.html
|
||||
load 1400599-1.html
|
||||
load 1401739.html
|
||||
load 1401840.html
|
||||
load 1402476.html
|
||||
|
Loading…
Reference in New Issue
Block a user