mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 488390. Get special siblings correctly even when bidi is involved. r+sr=roc
This commit is contained in:
parent
2dd00a24df
commit
2b4145319a
18
layout/base/crashtests/488390-1.xhtml
Normal file
18
layout/base/crashtests/488390-1.xhtml
Normal file
@ -0,0 +1,18 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
|
||||
function boom()
|
||||
{
|
||||
document.getElementById("select").removeAttribute("multiple");
|
||||
// Trigger a reflow
|
||||
document.body.style.width = 0;
|
||||
// And flush layout
|
||||
document.body.offsetWidth;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="boom();"><span>‮text text text text text‬<span><dir/></span><span><tr><select id="select" multiple="multiple"/></tr></span></span></body>
|
||||
</html>
|
@ -198,3 +198,4 @@ load 468645-3.xhtml
|
||||
load 471594-1.xhtml
|
||||
load 479114-1.html
|
||||
load 477333-1.xhtml
|
||||
load 488390-1.xhtml
|
||||
|
@ -1634,8 +1634,8 @@ nsLayoutUtils::GetNextContinuationOrSpecialSibling(nsIFrame *aFrame)
|
||||
|
||||
if ((aFrame->GetStateBits() & NS_FRAME_IS_SPECIAL) != 0) {
|
||||
// We only store the "special sibling" annotation with the first
|
||||
// frame in the flow. Walk back to find that frame now.
|
||||
aFrame = aFrame->GetFirstInFlow();
|
||||
// frame in the continuation chain. Walk back to find that frame now.
|
||||
aFrame = aFrame->GetFirstContinuation();
|
||||
|
||||
void* value = aFrame->GetProperty(nsGkAtoms::IBSplitSpecialSibling);
|
||||
return static_cast<nsIFrame*>(value);
|
||||
|
4
layout/reftests/bugs/488390-1-ref.html
Normal file
4
layout/reftests/bugs/488390-1-ref.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>ab</body>
|
||||
</html>
|
22
layout/reftests/bugs/488390-1.html
Normal file
22
layout/reftests/bugs/488390-1.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function boom()
|
||||
{
|
||||
var s = document.getElementById("s");
|
||||
s.parentNode.removeChild(s);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();">
|
||||
<!-- Need the bidi control chars to trigger non-fluid continuations, and
|
||||
need the span right around the div so that the prevSibling of the node
|
||||
whose frame we try to get doesn't have a frame map entry (so that we
|
||||
don't have a useful hint). -->
|
||||
<span>‮a‬b
|
||||
<span><div></div></span>
|
||||
<span id="s">This text should be gone</span>
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
@ -1207,3 +1207,4 @@ fails == 472020-2.xul 472020-2-ref.xul
|
||||
== 486052-2g.html 486052-2-ref.html
|
||||
== 486848-1.xul 486848-1-ref.xul
|
||||
== 487539-1.html about:blank
|
||||
== 488390-1.html 488390-1-ref.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user