mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 728111. Fix the block inside foreignObject to really be the absolute containing block for its kids. r=roc
This commit is contained in:
parent
c64eafbf1e
commit
d389408e85
@ -4952,8 +4952,10 @@ nsCSSFrameConstructor::ConstructSVGForeignObjectFrame(nsFrameConstructorState& a
|
||||
}
|
||||
|
||||
nsFrameItems childItems;
|
||||
// Claim to be relatively positioned so that we end up being the
|
||||
// We should be relatively positioned so that we end up being the
|
||||
// absolute containing block.
|
||||
const nsStyleDisplay* disp = innerPseudoStyle->GetStyleDisplay();
|
||||
NS_ASSERTION(disp->IsPositioned(), "How did this get to not be positioned?");
|
||||
rv = ConstructBlock(aState, innerPseudoStyle->GetStyleDisplay(), content,
|
||||
newFrame, newFrame, innerPseudoStyle,
|
||||
&blockFrame, childItems, true,
|
||||
|
10
layout/reftests/svg/foreignObject-dynamic-abspos-01-ref.html
Normal file
10
layout/reftests/svg/foreignObject-dynamic-abspos-01-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<div style="height: 100px">
|
||||
</div>
|
||||
<svg width="200" height="200" style="overflow: visible">
|
||||
<foreignObject width="200" height="200">
|
||||
<div id="x" style="position:absolute; top: 0; left: 0">
|
||||
This is a test
|
||||
</div>
|
||||
</foreignObject>
|
||||
</svg>
|
18
layout/reftests/svg/foreignObject-dynamic-abspos-01.html
Normal file
18
layout/reftests/svg/foreignObject-dynamic-abspos-01.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<div style="height: 100px">
|
||||
</div>
|
||||
<svg width="200" height="200" style="overflow: visible">
|
||||
<foreignObject width="200" height="200">
|
||||
<div id="x" style="position:absolute; top: 0; left: 0">
|
||||
This is a test
|
||||
</div>
|
||||
</foreignObject>
|
||||
<script>
|
||||
document.body.offsetWidth;
|
||||
var kid = document.getElementById("x");
|
||||
var parent = kid.parentNode;
|
||||
var nextSibling = kid.nextSibling;
|
||||
parent.removeChild(kid);
|
||||
parent.insertBefore(kid, nextSibling);
|
||||
</script>
|
||||
</svg>
|
@ -147,6 +147,7 @@ fails-if(Android) == filter-extref-differentOrigin-01.svg pass.svg # Bug 695385
|
||||
== foreignObject-start-hidden-01.svg pass.svg # followup from Bug 596765
|
||||
== foreignObject-start-hidden-02.svg pass.svg
|
||||
== foreignObject-style-change-01.svg pass.svg
|
||||
== foreignObject-dynamic-abspos-01.html foreignObject-dynamic-abspos-01-ref.html
|
||||
== getElementById-a-element-01.svg pass.svg
|
||||
fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated) == gradient-live-01a.svg gradient-live-01-ref.svg # bug 696674
|
||||
fails-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated) == gradient-live-01b.svg gradient-live-01-ref.svg # bug 696674
|
||||
|
@ -64,6 +64,7 @@ foreignObject {
|
||||
|
||||
*|*::-moz-svg-foreign-content {
|
||||
display: block !important;
|
||||
position: static !important;
|
||||
/* We need to be an absolute container */
|
||||
position: relative !important;
|
||||
text-indent: 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user