gecko-dev/testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html
Xianzhu Wang 78c7e0e5a8 Bug 1523562 [wpt PR 14913] - [PE] Fix layer under-invalidation when visiblity status changes, a=testonly
Automatic update from web-platform-tests
[PE] Fix layer under-invalidation when visiblity status changes

https://chromium-review.googlesource.com/c/chromium/src/+/1017917
added code to invalidate the paint layer when its
PaintedOutputInvisible() status changes. The problem was that the
function doesn't merely depend on the old style or the new style,
but PaintsWithTransparency() based on the new style and the current
compositing status, so PaintedOutputInvisible(old_style) was not
the actual old invisible status. This caused we missed repaint of
the layer in the following case:

frame 1:
  opacity 0 (we don't paint the layer)
frame 2:
  opacity 0 -> 1 (PaintedOutputInvisible(old_style) was wrong, so
                  we failed to detect the change of it)
  layout and compositing update [1]
  opacity 1 -> 0.9

[1] If we also do prepaint here, change of existence of the effect
    node will trigger repaint of the layer, so the issue reproduces
    only in the above sequence (tested in the new wpt test).

Now let PaintedOutputInvisible() only access the input style.

Bug: 922084
Change-Id: Iec98b0304275cff968ed8053776f7c9a77a9625c
Reviewed-on: https://chromium-review.googlesource.com/c/1416913
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624311}

--

wpt-commits: 0d7a7e23965ff8c14669800d6e3d1dc86eb8c2f3
wpt-pr: 14913
2019-02-07 21:50:40 +00:00

19 lines
710 B
HTML

<!doctype HTML>
<html class="reftest-wait">
<title>CSS Test: Test for re-paint after stacking context changes opacity twice</title>
<link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html">
<link rel="match" href="opacity-change-twice-stacking-context-ref.html">
<script src="/common/reftest-wait.js"></script>
<div id="target" style="width: 100px; height: 100px; z-index: 1; opacity: 0; background: blue; position: absolute">
</div>
<script>
onload = () => {
requestAnimationFrame(() => requestAnimationFrame(() => {
target.style.opacity = 1;
target.offsetHeight;
target.style.opacity = 0.9;
takeScreenshot();
}));
}
</script>
</html>