RESOLVED FIXED 176498
REGRESSION (r215613): Incorrect corners clipping with border-radius
https://bugs.webkit.org/show_bug.cgi?id=176498
Summary REGRESSION (r215613): Incorrect corners clipping with border-radius
Sergii Ostroverkhov
Reported 2017-09-07 01:29:18 PDT
Created attachment 320104 [details] Corrupted corners Steps to Reproduce: 1. Open page: https://jsfiddle.net/5k1bcL3s/3/ 2. Click on Yes/No buttons 3. Observe the issue with corners (see screenshot enclosed) This issue occurs on specific widths of the browser window. Also is reproducible on iPhone with iOS 11. Please note, it works well on previous versions of Safari and iOS.
Attachments
Corrupted corners (8.55 KB, image/png)
2017-09-07 01:29 PDT, Sergii Ostroverkhov
no flags
Test case (taken from jsfiddle) (962 bytes, text/html)
2017-09-07 21:25 PDT, Wenson Hsieh
no flags
Patch (18.57 KB, patch)
2017-09-19 16:48 PDT, Wenson Hsieh
thorton: review+
Patch for landing (18.58 KB, patch)
2017-09-19 18:38 PDT, Wenson Hsieh
no flags
Radar WebKit Bug Importer
Comment 1 2017-09-07 17:53:39 PDT
Simon Fraser (smfr)
Comment 2 2017-09-07 19:13:11 PDT
Wenson Hsieh
Comment 3 2017-09-07 21:15:15 PDT
From an SVN bisection, this broke in http://trac.webkit.org/changeset/215613.
Wenson Hsieh
Comment 4 2017-09-07 21:25:21 PDT
Created attachment 320233 [details] Test case (taken from jsfiddle)
Wenson Hsieh
Comment 5 2017-09-19 10:10:46 PDT
Some logging in RenderBoxModelObject::paintBorder, before the early return if `innerBorder.contains(info.rect)`: 2017-09-19 10:06:18.267116-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: The paint rect is: {{9.0, 784.0}, {160.0, 32.0}} 2017-09-19 10:06:18.267340-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: The inner border rect is: {{9.0, 784.0}, {160.0, 32.0}} 2017-09-19 10:06:18.267486-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: The top left radius is: (6.0, 6.0) 2017-09-19 10:06:18.267621-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: The top right radius is: (6.0, 6.0) 2017-09-19 10:06:18.267756-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: The bottom left radius is: (6.0, 6.0) 2017-09-19 10:06:18.267888-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: The bottom right radius is: (6.0, 6.0) 2017-09-19 10:06:18.268018-0700 0xa4a5 Default 0x0 619 com.apple.WebKit.WebContent: (JavaScriptCore) <WK>: Does the inner border contain the paint rect? YES ...this doesn't look right to me. If the paint rect is the same as the border rect, but the border has non-zero radii, I don't see how the border rounded rect can fully contain the paint rect. Could there be a bug in the math checking whether a rounded rect contains a non-rounded rect?
Wenson Hsieh
Comment 6 2017-09-19 16:48:42 PDT
Tim Horton
Comment 7 2017-09-19 17:17:56 PDT
Comment on attachment 321265 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321265&action=review > Source/WebCore/platform/graphics/GeometryUtilities.cpp:178 > + // We can bail early if |xRy| + |yRx| <= RxRy do avoid additional multiplications, since that means the Manhattan distance I think that "do" is meant to be a "to"?
Wenson Hsieh
Comment 8 2017-09-19 18:22:39 PDT
Comment on attachment 321265 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321265&action=review From EWS results, accessibility/crash-table-recursive-layout.html appears to be failing; this was added very recently, and it doesn't seem related, but I'll double check. > Source/WebCore/ChangeLog:21 > + This function attempts to return early if the Manhattan distance if the transformed point is less than the Whoops, s/if the transformed/of the transformed/ >> Source/WebCore/platform/graphics/GeometryUtilities.cpp:178 >> + // We can bail early if |xRy| + |yRx| <= RxRy do avoid additional multiplications, since that means the Manhattan distance > > I think that "do" is meant to be a "to"? Ah, that's correct. Fixed.
Wenson Hsieh
Comment 9 2017-09-19 18:38:02 PDT
Created attachment 321273 [details] Patch for landing
WebKit Commit Bot
Comment 10 2017-09-19 19:20:32 PDT
Comment on attachment 321273 [details] Patch for landing Clearing flags on attachment: 321273 Committed r222245: <http://trac.webkit.org/changeset/222245>
Note You need to log in before you can comment on or make changes to this bug.