New issue
Advanced search Search tips

Issue 827516 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-04-16
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

Unexpected box-shadow afterglow

Reported by matthieu...@gmail.com, Mar 30 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Focus and leave inputs many times
2. Afterglow randomly appear

What is the expected behavior?
box-shadow should not leave an afterglow when the property is set to none

What went wrong?
A removed box-shadow leave an afterglow (sometimes), browser repaint is not consistent

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 10.0
Flash Version:
 
blink_afterglow_issue.jpg
109 KB View Download
Labels: -Pri-2 ReleaseBlock-Stable M-67 Needs-TestConfirmation Pri-1
NextAction: 2018-04-16
I'm not seeing any problem in M-66.

Can test team please check M-65 to see if this can be reproduced.

Will remove release block once we understand the situation.
I can confirm it's still an issue on canary (67)

It can be related to zoom level, I have a base zoom level of 125% on Windows
In theory I tested with that, although via a 125% windows DPI setting. Is your Display Properties zoom set to 100%?

Just trying to nail down what we should test with. Invalidation issues with zoom are not unusual right now.
see attachment

As I said, it's not consistent, sometimes you have to switch many times from an input to the other


boxshadow_issue_canary.jpg
290 KB View Download
Labels: Needs-Triage-M65
Labels: -Needs-TestConfirmation Triaged-ET
Unable to reproduce the issue on chrome reported version 65.0.3325.181 using windows-10 with steps mentioned below:
1) Launched chrome reported version and opened codepen: https://codepen.io/frlinw/pen/dmmVLm?editors=1100 given in comment#1
2) Focused and left the input field many times, didn't observed any break in glow after leaving input filed for manytimes

@Reporter: Please find the attached screen cast for your reference and let us know if we missed anything in reproducing the issue, provide your feedback on it which help in further triaging it.
827516.mp4
2.4 MB View Download
Labels: Needs-Feedback
Well, I confirmed the issue with a friend, so I can say I'm not the only one, It's the best I can do...
Screencast added too (Chrome 67.0.3386.0)
screencast_afterglow.mp4
637 KB View Download
Project Member

Comment 10 by sheriffbot@chromium.org, Apr 2 2018

Cc: viswa.karala@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
OK, we'll try some more to reproduce it.
Owner: schenney@chromium.org
Status: Assigned (was: Unconfirmed)
Owner: wangxianzhu@chromium.org
OK, I can reproduce this on Windows Canary. The really odd thing is that the blur that should not be there blinks with the cursor, despite not showing in DevTools as being repainted.

The only explanation I can think of for this is that a paint chunk for the blur is being associated with the caret and re-drawn as the caret redraws. But if I start with --disable-slimming-paint-v175 I get the same result.

Over to someone who might have a better theory of what's causing this.


I have ever seen in another bug (bug 816854) that some corrupted painting blinks with the cursor. At least that bug was not a paint invalidation issue. The phenomenon seems related to some inconsistent rasterization result of some paint operations affected by other paint operations (e.g. the caret). For bug 816854, the problem is that Skia sometimes modifies pixels that are far away from a filter effect when Skia rasterizes the filter. The solution was to add explicit bounds for the filter.

Not sure if this bug's situation is similar. Will investigate more.
This is a paint invalidation issue. Reduced test case attached. We fail to include antialiased shadow pixels into visual rect.
subpixel-shadow.html
273 bytes View Download

Comment 16 by pdr@chromium.org, Apr 10 2018

@schenney, the command-line flag for disabling SPV175 is: --disable-blink-features=SlimmingPaintV175
(adding this here because I keep having to look it up too)
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d526f29f2a8d8df3cab30b7ae407106574ce547

commit 2d526f29f2a8d8df3cab30b7ae407106574ce547
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Thu Apr 12 05:10:50 2018

[PE] Let visual rect cover sub-pixel visual effect outsets

If an overflowing visual effect has sub-pixel geometry and is painted
with anti-aliasing along pixel-snapped border box, the pixel-snapping
may cause the anti-aliased edge overflow the calculated visual rect.

Let LayoutBox::VisualRectOutsetForRasterEffects() return 1 if there are
any sub-pixel visual effect outsets to ensure the visual rect covers
all pixels.

Bug:  827516 
Change-Id: I48f8350fb2124d002333a4cc76486c63ca55f8c9
Reviewed-on: https://chromium-review.googlesource.com/1003492
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550014}
[add] https://crrev.com/2d526f29f2a8d8df3cab30b7ae407106574ce547/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move-expected.html
[add] https://crrev.com/2d526f29f2a8d8df3cab30b7ae407106574ce547/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move.html
[modify] https://crrev.com/2d526f29f2a8d8df3cab30b7ae407106574ce547/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/2d526f29f2a8d8df3cab30b7ae407106574ce547/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/2d526f29f2a8d8df3cab30b7ae407106574ce547/third_party/blink/renderer/core/layout/overflow_model.h

Project Member

Comment 18 by bugdroid1@chromium.org, Apr 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf

commit 2195c17ababe2e9f24c9e9fe7d5da2a9915349cf
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Thu Apr 12 16:13:23 2018

Revert "[PE] Let visual rect cover sub-pixel visual effect outsets"

This reverts commit 2d526f29f2a8d8df3cab30b7ae407106574ce547.

Reason for revert:  crbug.com/832020  

Bug:  832020 

Original change's description:
> [PE] Let visual rect cover sub-pixel visual effect outsets
> 
> If an overflowing visual effect has sub-pixel geometry and is painted
> with anti-aliasing along pixel-snapped border box, the pixel-snapping
> may cause the anti-aliased edge overflow the calculated visual rect.
> 
> Let LayoutBox::VisualRectOutsetForRasterEffects() return 1 if there are
> any sub-pixel visual effect outsets to ensure the visual rect covers
> all pixels.
> 
> Bug:  827516 
> Change-Id: I48f8350fb2124d002333a4cc76486c63ca55f8c9
> Reviewed-on: https://chromium-review.googlesource.com/1003492
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#550014}

TBR=wangxianzhu@chromium.org,fmalita@chromium.org,chrishtr@chromium.org

Change-Id: Iea3cfeb8e661dac43f27f85ab1eb2e7f00da8b73
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  827516 
Reviewed-on: https://chromium-review.googlesource.com/1010582
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550227}
[delete] https://crrev.com/210c995247166fa2cdd38ab71e1c5cfc38871894/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move-expected.html
[delete] https://crrev.com/210c995247166fa2cdd38ab71e1c5cfc38871894/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move.html
[modify] https://crrev.com/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf/third_party/blink/renderer/core/layout/overflow_model.h

Project Member

Comment 19 by bugdroid1@chromium.org, Apr 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19327a652bb7c8806ec437ba577f280c5962e12e

commit 19327a652bb7c8806ec437ba577f280c5962e12e
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Thu Apr 12 20:32:43 2018

Reland "[PE] Let visual rect cover sub-pixel visual effect outsets"

This is a reland of 2d526f29f2a8d8df3cab30b7ae407106574ce547

Was reverted because it caused  crbug.com/832020  which is a crash in
the following case:
  <div style="width: 0; height: 0; box-shadow: 0 5.5px"></div>
The div has zero size and visual effect outset on one side only,
so the overflow is still zero and doesn't create OverflowModel.

Original change's description:
> [PE] Let visual rect cover sub-pixel visual effect outsets
>
> If an overflowing visual effect has sub-pixel geometry and is painted
> with anti-aliasing along pixel-snapped border box, the pixel-snapping
> may cause the anti-aliased edge overflow the calculated visual rect.
>
> Let LayoutBox::VisualRectOutsetForRasterEffects() return 1 if there are
> any sub-pixel visual effect outsets to ensure the visual rect covers
> all pixels.
>
> Bug:  827516 
> Change-Id: I48f8350fb2124d002333a4cc76486c63ca55f8c9
> Reviewed-on: https://chromium-review.googlesource.com/1003492
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#550014}

Bug:  827516 ,  832020 
Change-Id: I4e7831d7d91cc541127670ac102ec0292ae50387
Reviewed-on: https://chromium-review.googlesource.com/1010583
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550334}
[add] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move-expected.html
[add] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move.html
[add] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-zero-size-box-crash.html
[modify] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/blink/renderer/core/layout/overflow_model.h

Status: Fixed (was: Assigned)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-67; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-67 label, otherwise remove Merge-TBD label. Thanks.
M67 branch #3396 was branched at chromium revision 550428, so CLs listed here already in M67. Pls double check and remove  Merge-TBD label. Thank you.
Labels: -Merge-TBD
Yes, it's in branch #3396.
The NextAction date has arrived: 2018-04-16
Project Member

Comment 25 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf

commit 2195c17ababe2e9f24c9e9fe7d5da2a9915349cf
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Thu Apr 12 16:13:23 2018

Revert "[PE] Let visual rect cover sub-pixel visual effect outsets"

This reverts commit 2d526f29f2a8d8df3cab30b7ae407106574ce547.

Reason for revert:  crbug.com/832020  

Bug:  832020 

Original change's description:
> [PE] Let visual rect cover sub-pixel visual effect outsets
> 
> If an overflowing visual effect has sub-pixel geometry and is painted
> with anti-aliasing along pixel-snapped border box, the pixel-snapping
> may cause the anti-aliased edge overflow the calculated visual rect.
> 
> Let LayoutBox::VisualRectOutsetForRasterEffects() return 1 if there are
> any sub-pixel visual effect outsets to ensure the visual rect covers
> all pixels.
> 
> Bug:  827516 
> Change-Id: I48f8350fb2124d002333a4cc76486c63ca55f8c9
> Reviewed-on: https://chromium-review.googlesource.com/1003492
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#550014}

TBR=wangxianzhu@chromium.org,fmalita@chromium.org,chrishtr@chromium.org

Change-Id: Iea3cfeb8e661dac43f27f85ab1eb2e7f00da8b73
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  827516 
Reviewed-on: https://chromium-review.googlesource.com/1010582
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550227}
[delete] https://crrev.com/210c995247166fa2cdd38ab71e1c5cfc38871894/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move-expected.html
[delete] https://crrev.com/210c995247166fa2cdd38ab71e1c5cfc38871894/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move.html
[modify] https://crrev.com/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/2195c17ababe2e9f24c9e9fe7d5da2a9915349cf/third_party/blink/renderer/core/layout/overflow_model.h

Project Member

Comment 26 by bugdroid1@chromium.org, Apr 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19327a652bb7c8806ec437ba577f280c5962e12e

commit 19327a652bb7c8806ec437ba577f280c5962e12e
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Thu Apr 12 20:32:43 2018

Reland "[PE] Let visual rect cover sub-pixel visual effect outsets"

This is a reland of 2d526f29f2a8d8df3cab30b7ae407106574ce547

Was reverted because it caused  crbug.com/832020  which is a crash in
the following case:
  <div style="width: 0; height: 0; box-shadow: 0 5.5px"></div>
The div has zero size and visual effect outset on one side only,
so the overflow is still zero and doesn't create OverflowModel.

Original change's description:
> [PE] Let visual rect cover sub-pixel visual effect outsets
>
> If an overflowing visual effect has sub-pixel geometry and is painted
> with anti-aliasing along pixel-snapped border box, the pixel-snapping
> may cause the anti-aliased edge overflow the calculated visual rect.
>
> Let LayoutBox::VisualRectOutsetForRasterEffects() return 1 if there are
> any sub-pixel visual effect outsets to ensure the visual rect covers
> all pixels.
>
> Bug:  827516 
> Change-Id: I48f8350fb2124d002333a4cc76486c63ca55f8c9
> Reviewed-on: https://chromium-review.googlesource.com/1003492
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#550014}

Bug:  827516 ,  832020 
Change-Id: I4e7831d7d91cc541127670ac102ec0292ae50387
Reviewed-on: https://chromium-review.googlesource.com/1010583
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550334}
[add] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move-expected.html
[add] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-move.html
[add] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/WebKit/LayoutTests/paint/invalidation/subpixel-shadow-zero-size-box-crash.html
[modify] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/blink/renderer/core/layout/layout_box.h
[modify] https://crrev.com/19327a652bb7c8806ec437ba577f280c5962e12e/third_party/blink/renderer/core/layout/overflow_model.h

Sign in to add a comment