mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 1535040 - Exclude some SVG frames from DL building fast-path r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D23810 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
d735d8aa70
commit
c33cbad71c
@ -3853,7 +3853,10 @@ void nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
const bool differentAGR = buildingForChild.IsAnimatedGeometryRoot();
|
||||
|
||||
if (!awayFromCommonPath) {
|
||||
if (!awayFromCommonPath &&
|
||||
// Some SVG frames might change opacity without invalidating the frame,
|
||||
// so exclude them from the fast-path.
|
||||
!child->IsFrameOfType(nsIFrame::eSVG)) {
|
||||
// The shortcut is available for the child for next time.
|
||||
child->AddStateBits(NS_FRAME_SIMPLE_DISPLAYLIST);
|
||||
}
|
||||
|
5
layout/reftests/bugs/1535040-1-ref.html
Normal file
5
layout/reftests/bugs/1535040-1-ref.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<svg width="400" height="300">
|
||||
<rect id="rect" width="100" height="100" fill="green" x="0" y="0"/>
|
||||
</svg>
|
||||
</html>
|
19
layout/reftests/bugs/1535040-1.html
Normal file
19
layout/reftests/bugs/1535040-1.html
Normal file
@ -0,0 +1,19 @@
|
||||
<html class="reftest-wait">
|
||||
<svg width="400" height="300">
|
||||
<text id="text" opacity="1" x="0" y="150" fill="black">
|
||||
This text should disappear
|
||||
</text>
|
||||
<rect id="rect" width="100" height="100" fill="green" x="0" y="0"/>
|
||||
</svg>
|
||||
|
||||
<script>
|
||||
function doTest() {
|
||||
var elt = document.getElementById("text");
|
||||
elt.setAttribute("opacity", 0);
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
setTimeout(doTest, 5000);
|
||||
</script>
|
||||
</html>
|
@ -2104,3 +2104,4 @@ pref(layout.css.supports-selector.enabled,true) == 1499386.html 1499386-ref.html
|
||||
pref(layout.css.supports-selector.enabled,false) != 1499386.html 1499386-ref.html
|
||||
== 1509425-1.html 1509425-1-ref.html
|
||||
== 1511570.html 1511570-ref.html
|
||||
== 1535040-1.html 1535040-1-ref.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user