Dotted border rendering artifacts when setting elliptical shaped corner

RESOLVED FIXED in Firefox 51

Status

()

Core
Layout
--
minor
RESOLVED FIXED
7 months ago
3 months ago

People

(Reporter: Massamino, Assigned: arai)

Tracking

50 Branch
mozilla53
x86_64
Windows 10
Points:
---

Firefox Tracking Flags

(firefox50 wontfix, firefox51 fixed, firefox52 fixed, firefox53 fixed)

Details

Attachments

(4 attachments)

(Reporter)

Description

7 months ago
testcase
Created attachment 8812127 [details]
Right top border radius set to 40px 200px on 200px sized div

When setting top and bottom border width to a value and setting the side borders to 0 and than setting the top right border radius to 40px 200px, the rendering of the border goes wrong.

It shows an overshoot after half the height of the div.
(Reporter)

Updated

7 months ago
Blocks: 382721
(Reporter)

Comment 1

7 months ago
Created attachment 8812130 [details]
Image of rendering error

To see the result I get (dashed is ok)
Status: UNCONFIRMED → NEW
Has STR: --- → yes
status-firefox51: --- → affected
Ever confirmed: true
Component: General → Layout
Product: Firefox → Core
I reproduce with latest Aurora v51 (20161114004005) and latest Nightly v53 (20161117030212).
status-firefox53: --- → affected
(Assignee)

Comment 3

7 months ago
thanks.
I found that the DottedCornerFinder goes into wrong state after the dot size becomes almost 0.
Will try fixing.
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
(Assignee)

Comment 4

7 months ago
Created attachment 8812310 [details] [diff] [review]
Stop calculating circles around r=0 in DottedCornerFinder.

While calculating circle around r=0, it may fail to search correct circle (due to the restriction for avoid taking too long time), and in that case it returns wrong circle that is bigger than previous circle (note that we're calculating circles from wider side to narrow side),

So changed the code to detect that case and stop calculating.
it will now return circle with r=0, so that nsCSSBorderRenderer::DrawDottedCornerSlow will leave the loop.


I'll try creating reftest, but it may take some time, so I'd like to ask review for the code first.
Attachment #8812310 - Flags: review?(jmuizelaar)
(Assignee)

Comment 5

7 months ago
Created attachment 8812323 [details] [diff] [review]
Part 2: Add testcase.

Added testcase from comment #0.
Attachment #8812323 - Flags: review?(jmuizelaar)
Attachment #8812310 - Flags: review?(jmuizelaar) → review+
Attachment #8812323 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 6

7 months ago
Thank you for reviewing :)
status-firefox50: --- → affected
status-firefox52: --- → affected
(Assignee)

Comment 7

7 months ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/2405181a4bf97a0f8f8c3588ad373d98a21d159d
Bug 1318625 - Part 1: Stop calculating circles around r=0 in DottedCornerFinder. r=0 in DottedCornerFinder.,jrmuizel

https://hg.mozilla.org/integration/mozilla-inbound/rev/16c4898b35b2fbb4a3482e5162764d5b29ae3d18
Bug 1318625 - Part 2: Add testcase. r=jrmuizel

Comment 8

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2405181a4bf9
https://hg.mozilla.org/mozilla-central/rev/16c4898b35b2
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
status-firefox53: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
(Assignee)

Comment 9

7 months ago
Comment on attachment 8812310 [details] [diff] [review]
Stop calculating circles around r=0 in DottedCornerFinder.

same patch is applicable to mozilla-aurora and mozilla-beta

Approval Request Comment
> [Feature/regressing bug #]
bug 382721

> [User impact if declined]
unnecessary wrong dots are rendered with dotted border radius in some case.
(comment #0)

> [Describe test coverage new/current, TreeHerder]
tested on m-c

> [Risks and why]
low, just avoid rendering wrong dots

> [String/UUID change made/needed]
none
Attachment #8812310 - Flags: approval-mozilla-beta?
Attachment #8812310 - Flags: approval-mozilla-aurora?
Comment on attachment 8812310 [details] [diff] [review]
Stop calculating circles around r=0 in DottedCornerFinder.

Fix a rendering issue related to dotted border radius. Beta51+ and Aurora52+. Should be in 51 beta 3.
Attachment #8812310 - Flags: approval-mozilla-beta?
Attachment #8812310 - Flags: approval-mozilla-beta+
Attachment #8812310 - Flags: approval-mozilla-aurora?
Attachment #8812310 - Flags: approval-mozilla-aurora+

Comment 11

7 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/e3fb37a9876c
https://hg.mozilla.org/releases/mozilla-aurora/rev/c538edad135a
status-firefox52: affected → fixed

Comment 12

7 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/37a277bc5986
https://hg.mozilla.org/releases/mozilla-beta/rev/fa3e6456dd1e
status-firefox51: affected → fixed
status-firefox50: affected → wontfix
QA Whiteboard: [good first verify]

Comment 13

3 months ago
I have reproduced this bug with Firefox Nightly 53.0a1 (Build ID: 20161118030222) on 
Windows 8.1, 64-bit.

Verified as fixed with Latest Firefox beta 53.0b5 (Build ID: 20170320143328)
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
QA Whiteboard: [good first verify] → [good first verify] [bugday-20170322]
You need to log in before you can comment on or make changes to this bug.