mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 1319825 - Update the overflow areas of all descendants when we toggle opacity on a preserve-3d frame. r=tnikkel
This commit is contained in:
parent
3f864c48ae
commit
990efceefc
@ -1233,6 +1233,13 @@ RestyleManagerBase::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
||||
hint |= nsChangeHint_RepaintFrame;
|
||||
}
|
||||
|
||||
// Opacity disables preserve-3d, so if we toggle it, then we also need
|
||||
// to update the overflow areas of all potentially affected frames.
|
||||
if ((hint & nsChangeHint_UpdateUsesOpacity) &&
|
||||
frame->StyleDisplay()->mTransformStyle == NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D) {
|
||||
hint |= nsChangeHint_UpdateSubtreeOverflow;
|
||||
}
|
||||
|
||||
if (hint & nsChangeHint_UpdateBackgroundPosition) {
|
||||
// For most frame types, DLBI can detect background position changes,
|
||||
// so we only need to schedule a paint.
|
||||
|
29
layout/reftests/transform-3d/opacity-preserve3d-5-ref.html
Normal file
29
layout/reftests/transform-3d/opacity-preserve3d-5-ref.html
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.outer {
|
||||
transform-style: preserve-3d;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.inner {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background-color: green;
|
||||
position:relative;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="outer" class="outer">
|
||||
<div class="inner">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
36
layout/reftests/transform-3d/opacity-preserve3d-5.html
Normal file
36
layout/reftests/transform-3d/opacity-preserve3d-5.html
Normal file
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<style>
|
||||
.outer {
|
||||
transform-style: preserve-3d;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
.inner {
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
background-color: green;
|
||||
position:relative;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="outer" class="outer">
|
||||
<div class="inner">
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function doTest() {
|
||||
document.getElementById("outer").style.opacity = 0.7;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -77,6 +77,7 @@ fuzzy(1,2000) fails-if(webrender) == opacity-preserve3d-1.html opacity-preserve3
|
||||
fuzzy(1,15000) == opacity-preserve3d-2.html opacity-preserve3d-2-ref.html
|
||||
fuzzy(1,10000) == opacity-preserve3d-3.html opacity-preserve3d-3-ref.html
|
||||
fuzzy(1,10000) == opacity-preserve3d-4.html opacity-preserve3d-4-ref.html
|
||||
+== opacity-preserve3d-5.html opacity-preserve3d-5-ref.html
|
||||
fails-if(webrender) == snap-perspective-1.html snap-perspective-1-ref.html
|
||||
fails-if(webrender) == mask-layer-1.html mask-layer-ref.html
|
||||
fails-if(webrender) == mask-layer-2.html mask-layer-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user