Opacity randomly ignored
Reported by
teo8...@gmail.com,
Jan 15
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Example URL: https://jsfiddle.net/Ltzm6wn7/ Steps to reproduce the problem: 1. Go to https://jsfiddle.net/Ltzm6wn7/ 2. Click the button that says "Change color" 3. Wait for at least one second and repeat What is the expected behavior? The first time, the kitten should fade out (opacity goes to zero) revealing another kitten behind. Every time you click again, the first kitten should instantaneously reappear and then fade out again. The code is this (jQuery): button.on("click", function(){ $("#kitten2").css({opacity:1}); $("#kitten2").animate({opacity:0}, 1000); }) What went wrong? Usually it works the first time, then stops working, and upon retrying again and again, very few times randomly it works. When I say "it works" I mean the opacity of the topmost image actually changed, becoming opaque upon clicking and then animating to transparent. If you inspect element, you can see the value of opacity actually changing, but it has no effect on the rendering. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? Yes no idea, it certainly worked in the past Does this work in other browsers? Yes Chrome version: 71.0.3578.98 Channel: stable OS Version: Flash Version: This is huge, this renders opacity completely broken and animations with opacity (e.g. transitions, cross-fades) impossible.
,
Jan 15
Bisected to r552560 = 371ffcdbb5dca7fb1a0aeb53956905bb1d4f9fc5 = crrev.com/c/1017917 by wangxianzhu@chromium.org "[SPv175] Repaint non-composited layer on layer visibility change" Landed in 68.0.3403.0 Merged to 67.0.3396.19
,
Jan 15
This reminds me of another bug: https://bugs.chromium.org/p/chromium/issues/detail?id=861598 Is this the same bug, or is the fix to that one that broke this one? Or are they unrelated?
,
Jan 16
,
Jan 16
,
Jan 16
Able to reproduce the issue on reported version# 71.0.3578.98 and latest chrome# 73.0.3672.0 using Mac 10.12.6, Ubuntu 14.04 and Windows-10, hence providing Bisect Info Bisect Info: ================ Good build: 68.0.3402.0 Bad build: 68.0.3403.0 Note: Assigning to the author as per suspect provided in comment# 2 Change log: https://chromium.googlesource.com/chromium/src/+log/68.0.3402.0..68.0.3403.0?pretty=fuller&n=10000 Suspecting: https://chromium.googlesource.com/chromium/src/+/371ffcdbb5dca7fb1a0aeb53956905bb1d4f9fc5 from above change log Change-Id: I45d47d5eb8422df0fc991530ce41a4c2b7a86252 Reviewed-on: https://chromium-review.googlesource.com/1017917 @Xianzhu Wang: Please confirm the issue and help in re-assigning if it is not related to your change. Thanks!
,
Jan 16
(6 days ago)
Sorry for the regression. Adding "will-change: opacity" on the element can workaround the issue. Will look into it asap.
,
Jan 16
(6 days ago)
Reduced test case
,
Jan 18
(4 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/21fcd4bf8c2c578224fc4e6c310525f4b559728a commit 21fcd4bf8c2c578224fc4e6c310525f4b559728a Author: Xianzhu Wang <wangxianzhu@chromium.org> Date: Fri Jan 18 22:03:54 2019 [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} [modify] https://crrev.com/21fcd4bf8c2c578224fc4e6c310525f4b559728a/third_party/blink/renderer/core/paint/paint_layer.cc [modify] https://crrev.com/21fcd4bf8c2c578224fc4e6c310525f4b559728a/third_party/blink/renderer/core/paint/paint_layer_painter.cc [modify] https://crrev.com/21fcd4bf8c2c578224fc4e6c310525f4b559728a/third_party/blink/renderer/core/paint/paint_layer_painter.h [modify] https://crrev.com/21fcd4bf8c2c578224fc4e6c310525f4b559728a/third_party/blink/renderer/core/paint/paint_layer_painter_test.cc [add] https://crrev.com/21fcd4bf8c2c578224fc4e6c310525f4b559728a/third_party/blink/web_tests/external/wpt/css/CSS2/stacking-context/opacity-change-twice-stacking-context-ref.html [add] https://crrev.com/21fcd4bf8c2c578224fc4e6c310525f4b559728a/third_party/blink/web_tests/external/wpt/css/CSS2/stacking-context/opacity-change-twice-stacking-context.html
,
Jan 18
(4 days ago)
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by teo8...@gmail.com
, Jan 15