Bug 1523562 [wpt PR 14913] - [PE] Fix layer under-invalidation when visiblity status...
commit78c7e0e5a835f3821eec5856eb50668500e33185
authorXianzhu Wang <wangxianzhu@chromium.org>
Thu, 31 Jan 2019 18:57:50 +0000 (31 18:57 +0000)
committerJames Graham <james@hoppipolla.co.uk>
Thu, 7 Feb 2019 21:50:40 +0000 (7 21:50 +0000)
treef5578afabcb0aaac82f789e094d4de4f1f65de7a
parentaee8fb2f01ac113dca89b53e1300dc5ccb9cf4af
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
testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html [new file with mode: 0644]