Closed
Bug 1211363
Opened 9 years ago
Closed 9 years ago
box-shadow with border-radius is broken recently
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
WORKSFORME
mozilla44
Tracking | Status | |
---|---|---|
firefox41 | --- | unaffected |
firefox42 | --- | unaffected |
firefox43 | --- | unaffected |
firefox44 | + | fixed |
People
(Reporter: alfredkayser, Assigned: mchang)
References
Details
(Keywords: regression, Whiteboard: [gfx-noted])
Attachments
(8 files)
167 bytes,
text/html
|
Details | |
16.18 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
33.00 KB,
text/x-log
|
Details | |
33.78 KB,
text/x-log
|
Details | |
3.20 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
173 bytes,
text/html
|
Details | |
6.03 KB,
image/png
|
Details | |
8.33 KB,
image/png
|
Details |
See attachment for example.
Reporter | ||
Comment 1•9 years ago
|
||
In Firefox 41.0.1 and 42.0b3 it works correctly.
Reporter | ||
Comment 2•9 years ago
|
||
Narrowed range:
43.0a1 (2015-09-15): Good
43.0a1 (2015-09-18): Good
43.0a1 (2015-09-19): Bad
43.0a1 (2015-09-20): Bad
44.0a1 (2015-09-27): Bad
So, just somewhere before 2015-09-19 release.
Bugs 1097464, 1161913 and 1152298 are examples of checkins that could have caused this
Comment 3•9 years ago
|
||
Probably bug 1188075.
Comment 4•9 years ago
|
||
I don't think bug 1097464 caused this.
Reporter | ||
Comment 5•9 years ago
|
||
Bug 1188075 is the rootcause.
Comment 6•9 years ago
|
||
[Tracking Requested - why for this release]: correctness regression
status-firefox41:
--- → unaffected
status-firefox42:
--- → unaffected
status-firefox43:
--- → unaffected
status-firefox44:
--- → affected
tracking-firefox44:
--- → ?
Updated•9 years ago
|
Whiteboard: [gfx-noted]
Updated•9 years ago
|
Keywords: regression
Comment 7•9 years ago
|
||
Tracking since this is a recent regression.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → mchang
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•9 years ago
|
||
Thanks for the test case!
The main bug with this was that the border-radius was much larger than the inset blur radius. When we copied the min box shadow to the destination box shadow, we tried to only copy the part from the outer rect. We also miscalculated the margins we should copy to the destination since we didn't always take into account the actual blur extended size versus pre-calculating it based on the blur radius. I think this didn't work in all situations. I rewrote how we calculate the min rects and how we copy the blur to be the same as the outer blur.
When we copy the blur, we copy the whole blur by creating an extendDestBy and aSlice like with the outer blur. We then calculate the src inner and dest rects with these margins, just like the outer blur. This approach was a lot cleaner.
Attachment #8673455 -
Flags: review?(mstange)
Assignee | ||
Comment 9•9 years ago
|
||
Looking good reftest try - https://treeherder.mozilla.org/#/jobs?repo=try&revision=91f07b8c30f4
Comment 10•9 years ago
|
||
Comment on attachment 8673455 [details] [diff] [review]
Calculate min inset blur size with max border radius
Review of attachment 8673455 [details] [diff] [review]:
-----------------------------------------------------------------
r+ assuming this comes with a test
::: gfx/thebes/gfxBlur.cpp
@@ +808,5 @@
> }
>
> + // Create the inner rect to be the smallest possible size based on
> + // blur / spread / corner radii
> + IntMargin innerMargin = IntMargin(ceil(cornerHeight) + rectBufferSize.height,
You could remove " = IntMargin" if you want to.
::: layout/base/nsCSSRendering.cpp
@@ +5543,5 @@
> transformedSkipRect.RoundIn();
>
> for (size_t i = 0; i < 4; i++) {
> + aInnerClipRectRadii[i].width = std::floor(scale.width * aInnerClipRectRadii[i].width);
> + aInnerClipRectRadii[i].height = std::floor(scale.height * aInnerClipRectRadii[i].height);
Does this match what we did before your patches? Have we always used floor?
Attachment #8673455 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 11•9 years ago
|
||
Test case with floating point border radius from bug 1209649 on a build without the inset border patches with this bug. This is a reftest log with the == in reftest.list set to !=. They are equal, but we get a screenshot from what it looks like.
Assignee | ||
Comment 12•9 years ago
|
||
This is the reftest log with the patch in this bug. I just made the reftest != so we'd get a screenshot.
Assignee | ||
Comment 13•9 years ago
|
||
From irc: I talked with mstange about using floor and the data URIs are the same, so we'll go with floor. Will land after creating a test case.
Assignee | ||
Comment 14•9 years ago
|
||
Attachment #8674036 -
Flags: review?(mstange)
Assignee | ||
Comment 15•9 years ago
|
||
Successful try - https://treeherder.mozilla.org/#/jobs?repo=try&revision=cf48d9c26131
Updated•9 years ago
|
Attachment #8674036 -
Flags: review?(mstange) → review+
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8a422004b0e2
https://hg.mozilla.org/mozilla-central/rev/3df3d4856542
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Reporter | ||
Comment 18•9 years ago
|
||
I am sorry, but the problem is not fixed.
See attached example.
Reporter | ||
Comment 19•9 years ago
|
||
Reporter | ||
Updated•9 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 20•9 years ago
|
||
(In reply to Alfred Kayser from comment #18)
> Created attachment 8676197 [details]
> boxshadow2.html
>
> I am sorry, but the problem is not fixed.
> See attached example.
Might be a dupe of 1216200.
Assignee | ||
Comment 21•9 years ago
|
||
(In reply to Alfred Kayser from comment #18)
> Created attachment 8676197 [details]
> boxshadow2.html
>
> I am sorry, but the problem is not fixed.
> See attached example.
This test case is fixed with the patch in bug 1216200.
Reporter | ||
Comment 22•9 years ago
|
||
It is not just themes that suffer from this.
An example from the banking site from the largest bank in the Netherlands.
Assignee | ||
Comment 23•9 years ago
|
||
(In reply to Alfred Kayser from comment #22)
> Created attachment 8677916 [details]
> boxshadow3.png
>
> It is not just themes that suffer from this.
> An example from the banking site from the largest bank in the Netherlands.
Which site is this? I'll test again. Thanks for finding test cases. I found other banking sites had this problem as well, such as vanguard.com in the US. Vanguard was fixed by bug 1216200. It hasn't hit nightly yet, so try again tomorrow? Thanks!
Flags: needinfo?(alfredkayser)
Reporter | ||
Comment 24•9 years ago
|
||
The site is "https://bankieren.mijn.ing.nl/"
You need an account to login.
But on "https://www.ing.nl/particulier/index.html" (same bank), the search box also had this problem.
But with the currently nightly it is no longer an issue.
The fix from 1216200 does seems to have solved this issue.
Flags: needinfo?(alfredkayser)
Assignee | ||
Comment 25•9 years ago
|
||
From comment 24, resolving as WFM. Thanks for testing!
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•