mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1062792. Don't add clipped out parts of a layer to the opaque region. r=roc
This commit is contained in:
parent
f7aebf9715
commit
919b8da6a8
@ -3593,7 +3593,13 @@ ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer
|
||||
data->mAnimatedGeometryRoot = animatedGeometryRootToCover;
|
||||
data->mFixedPosFrameForLayerData = e->mFixedPosFrameForLayerData;
|
||||
}
|
||||
data->mOpaqueRegion.Or(data->mOpaqueRegion, e->mOpaqueRegion);
|
||||
|
||||
nsIntRegion clippedOpaque = e->mOpaqueRegion;
|
||||
const nsIntRect* clipRect = e->mLayer->GetClipRect();
|
||||
if (clipRect) {
|
||||
clippedOpaque.AndWith(*clipRect);
|
||||
}
|
||||
data->mOpaqueRegion.Or(data->mOpaqueRegion, clippedOpaque);
|
||||
if (e->mHideAllLayersBelow) {
|
||||
hideAll = true;
|
||||
}
|
||||
|
20
layout/reftests/bugs/1062792-1-ref.html
Normal file
20
layout/reftests/bugs/1062792-1-ref.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait" style="overflow: hidden;">
|
||||
<head>
|
||||
<script>
|
||||
function scroll() {
|
||||
document.getElementById("thediv").scrollTop = 400;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="scroll();" style="overflow: hidden;">
|
||||
<div style="background: white; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
|
||||
<div style="background: yellow; height: 10%;"></div>
|
||||
<div style="overflow: scroll; height: 90%;"
|
||||
id="thediv">
|
||||
<div style="background: purple; height: 4000px;"><div style="height: 500px; width: 100px; background: orange;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
22
layout/reftests/bugs/1062792-1.html
Normal file
22
layout/reftests/bugs/1062792-1.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html reftest-async-scroll class="reftest-wait" style="overflow: hidden;">
|
||||
<head>
|
||||
<script>
|
||||
function scroll() {
|
||||
document.getElementById("thediv").scrollTop = 400;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="scroll();" style="overflow: hidden;">
|
||||
<div style="background: white; position: absolute; top: 0; left: 0; bottom: 0; right: 0;">
|
||||
<div style="background: yellow; height: 10%;"></div>
|
||||
<div reftest-displayport-x="0" reftest-displayport-y="-300"
|
||||
reftest-displayport-w="800" reftest-displayport-h="2000"
|
||||
style="overflow: scroll; height: 90%;"
|
||||
id="thediv">
|
||||
<div style="background: purple; height: 4000px;"><div style="height: 500px; width: 100px; background: orange;"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1832,6 +1832,7 @@ test-pref(layout.css.grid.enabled,true) == 1053035-1-grid.html 1053035-1-ref.htm
|
||||
== 1059498-1.html 1059498-1-ref.html
|
||||
== 1059498-2.html 1059498-1-ref.html
|
||||
== 1059498-3.html 1059498-1-ref.html
|
||||
fails-if(Android) == 1062792-1.html 1062792-1-ref.html
|
||||
test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html
|
||||
== 1069716-1.html 1069716-1-ref.html
|
||||
== 1078262-1.html about:blank
|
||||
|
Loading…
Reference in New Issue
Block a user