New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion in WebCore::calculateAdjustedInnerBorder() #6138
Assertion in WebCore::calculateAdjustedInnerBorder() #6138
Conversation
EWS run on previous version of this PR (hash 1406ffa) |
1406ffa
to
e984cbc
Compare
EWS run on previous version of this PR (hash e984cbc) |
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x600 | ||
RenderBlock {HTML} at (0,0) size 800x600 | ||
RenderBody {BODY} at (8,8) size 784x584 | ||
RenderBlock {DIV} at (0,0) size 300x243 [bgcolor=#B8860B] [border: none (100px solid #FF0000) (43px solid #000000) none] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't create new render tree dump based tests, they are annoying to maintain as they are very sensitive to unrelated changes.
Instead this should likely be a reftest where you add an -expected.html file that the test result gets pixel-compared against. For non-visual things a text based test (testRunner.dumpAsText()) can be used.
e984cbc
to
e0711e8
Compare
EWS run on previous version of this PR (hash e0711e8) |
<html> | ||
<head> | ||
<link rel="help" href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius"> | ||
<style> | ||
.class4 { | ||
/* bug happens when width < border-bottom-left-radius + border-bottom-right-radius (horizontal) with vertical axis of the elipse values set to 0 */ | ||
border-bottom: solid; | ||
width: 200px; | ||
height: 200px; | ||
background-color: darkgoldenrod; | ||
border-right: 100px solid red; | ||
border-bottom-width: 43px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="class4"></div> | ||
</body> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to add -ref.html except for WPT tests.
e0711e8
to
f3ae352
Compare
EWS run on current version of this PR (hash f3ae352) |
https://bugs.webkit.org/show_bug.cgi?id=247569 rdar://99885016 Reviewed by Antti Koivisto. The adjusting function calculateAdjustedInnerBorder assumes it will be called only when: [1]: the radii of one of the vertex of the edge we are painting is zero. In BorderPainter::paintBorderSides(...), when borderWillArcInnerEdge(...) evaluates to true, a path would be used for calling paintOneBorderSide(...) which would result in calculateAdjustedInnerBorder being called when [1] does not hold for the test added here. borderWillArcInnerEdge return trues if one of the radius it receives isZero(), however isZero() checks that both height and width of the radius are zero, while one of them being zero would already invalidate rendering the border as rounded, as described by https://w3c.github.io/csswg-drafts/css-backgrounds/#border-radii Therefore, we propose changing borderWillArcInnerEdge to use isEmpty(), that checks that the height or width of the radius is zero. * LayoutTests/css3/calc/inner-border-radius-longer-than-width.html: Added. * LayoutTests/css3/calc/inner-border-radius-longer-than-width-expected.html: Added. This test would trigger the following assertion on calculateAdjustedInnerBorder(): 'ASSERT(!(newRadii.bottomLeft().width() && newRadii.bottomRight().width()));' * Source/WebCore/rendering/style/BorderData.h: (WebCore::BorderData::hasBorderRadius const): * Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp: (WebCore::Display::BorderPainter::borderWillArcInnerEdge): * Source/WebCore/rendering/BorderPainter.cpp: (WebCore::borderWillArcInnerEdge): borderWillArchInnerEdge() and hasBorderRadius() uses now isEmpty() instead of isZero(), since isEmpty() checks if either the height or width of the radius is zero. Canonical link: https://commits.webkit.org/256445@main
f3ae352
to
bdb44a7
Compare
Committed 256445@main (bdb44a7): https://commits.webkit.org/256445@main Reviewed commits have been landed. Closing PR #6138 and removing active labels. |
bdb44a7
f3ae352
π π§ͺ winπ§ͺ ios-wk2π§ͺ gtk-wk2π§ͺ api-iosπ§ͺ mac-wk1π§ͺ mac-AS-debug-wk2