Closed Bug 1429411 Opened 6 years ago Closed 6 years ago

Inset box-shadows still render incorrectly in some cases

Categories

(Core :: Graphics: WebRender, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox58 --- unaffected
firefox59 --- unaffected
firefox60 --- disabled

People

(Reporter: mstange, Assigned: ethlin)

References

Details

(Keywords: correctness)

Attachments

(2 files)

Attached file testcase
In this testcase, the shadow is too light at the top and left edges of the box. If the height of the box is reduced to something smaller than 120px, the shadow starts rendering correctly.
Assignee: nobody → howareyou322
Priority: -- → P1
Assignee: howareyou322 → ethlin
Thanks Ethan!

You can use the tool at http://tests.themasta.com/box-shadow-playground/#transparent_red_inset_3_10_200_200_12x13_8x12_9x11_12x12_4_12_7_0
to check if there are more undiscovered box-shadow bugs.
(In reply to Markus Stange [:mstange] from comment #2)
> Thanks Ethan!
> 
> You can use the tool at
> http://tests.themasta.com/box-shadow-playground/
> #transparent_red_inset_3_10_200_200_12x13_8x12_9x11_12x12_4_12_7_0
> to check if there are more undiscovered box-shadow bugs.

Okay, I will check each combination on the website.
Depends on: 1429806
Comment on attachment 8942032 [details]
Bug 1429411 - Add a reftest for the inset box shadow problem.

https://reviewboard.mozilla.org/r/212240/#review218130

I'll be moving this patch to the wr update bug. But it would be good to add markus' original test case in this bug as a new reftest in gecko to catch this problem if it happens again in the future.
Attachment #8942032 - Flags: review?(bugmail) → review+
Actually I tried to add a reftest at first. But gecko seems to be lack of testcases which are really comparing box-shadow blur results because it's hard to generate the reference. So I didn't find a good example to follow. I guess that's why we have some bugs are about the correctness of box-shadow.
Today I tried to use a similar box-shadow as the reference since this problem is about offset. So the test html has a box-shadow with an offset and the reference's box shadow doesn't have the offset. The test can detect the problem and the try result looks good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=23ee5cf5be3ff74bb271ed93fcf389ee90078fd1&selectedJob=156309060
Attachment #8942032 - Flags: review+ → review?(bugmail)
Attachment #8942032 - Flags: review?(bugmail)
Comment on attachment 8942032 [details]
Bug 1429411 - Add a reftest for the inset box shadow problem.

https://reviewboard.mozilla.org/r/212240/#review218594

LGTM
Attachment #8942032 - Flags: review?(bugmail) → review+
(In reply to Ethan Lin[:ethlin] from comment #1)
> [1] https://github.com/servo/webrender/pull/2285

Thank you!

First tab (https://bugzilla.mozilla.org/attachment.cgi?id=8941412 from comment 0):
It's bad when it's just white on the top and left at 300% zoom.
It's good when it looks like non-WR, especially at 300% zoom.

Second tab (https://bugzilla.mozilla.org/attachment.cgi?id=8940252 from comment 1):
It's bad when it's just white on the right and bottom. There should be a thin grey line (which should be a shadow at 300% zoom).

mozregression --find-fix --bad 2018-01-15 --good 2018-01-26 --pref gfx.webrender.all:true startup.homepage_welcome_url:"https://bugzilla.mozilla.org/attachment.cgi?id=8941412|https://bugzilla.mozilla.org/attachment.cgi?id=8940252"
> 9:00.43 INFO: First good revision: 243b7c8aa2e705832288658bd4bfe544cf173262
> 9:00.43 INFO: Last bad revision: c2239403f21ae4c0df28d5457c69b51b966f65cc
> 9:00.43 INFO: Pushlog:
> https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c2239403f21ae4c0df28d5457c69b51b966f65cc&tochange=243b7c8aa2e705832288658bd4bfe544cf173262

As expected, fixed by:
> bb1da388dea0	Kartikaya Gupta — Bug 1429806 - Update webrender to commit eb9e1702df4b6dc036b649b3dd32ccc4bfbe43bf. r=jrmuizel


(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #10)
Would you push the reftest? Because ... :(
Blocks: 1423633
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/11230e686cee
Add a reftest for the inset box shadow problem. r=kats
https://hg.mozilla.org/mozilla-central/rev/11230e686cee
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
According to my build number I should have this patch on my Nightly.  However, the testcase still displays the same way as before the patch.
(In reply to Gary [:streetwolf] from comment #15)
> According to my build number I should have this patch on my Nightly. 
> However, the testcase still displays the same way as before the patch.

The actual fix landed on 2018-01-16 (with bug 1429806).

(from comment #11)
> First tab (https://bugzilla.mozilla.org/attachment.cgi?id=8941412 from  comment 0):
> It's bad when it's just white on the top and left at 300% zoom.
> It's good when it looks like non-WR, especially at 300% zoom.
> 
> Second tab (https://bugzilla.mozilla.org/attachment.cgi?id=8940252 from comment 1):
> It's bad when it's just white on the right and bottom. There should be a thin grey line (which should be a shadow at 300% zoom).

https://mozilla.github.io/mozregression/install.html

Before the fix:
mozregression --repo autoland --launch c2239403f21ae4c0df28d5457c69b51b966f65cc --pref gfx.webrender.all:true startup.homepage_welcome_url:"https://bugzilla.mozilla.org/attachment.cgi?id=8941412|https://bugzilla.mozilla.org/attachment.cgi?id=8940252"

After the fix:
mozregression --repo autoland --launch 243b7c8aa2e705832288658bd4bfe544cf173262 --pref gfx.webrender.all:true startup.homepage_welcome_url:"https://bugzilla.mozilla.org/attachment.cgi?id=8941412|https://bugzilla.mozilla.org/attachment.cgi?id=8940252"
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: