Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bdb44a70527586f1b1b746cfda75a2b0ae00c7f6
https://github.com/WebKit/WebKit/commit/bdb44a70527586f1b1b746cfda75a2b0ae00c7f6
Author: Vitor Roriz <[email protected]>
Date: 2022-11-08 (Tue, 08 Nov 2022)
Changed paths:
A LayoutTests/css3/calc/inner-border-radius-longer-than-width-expected.html
A LayoutTests/css3/calc/inner-border-radius-longer-than-width.html
M Source/WebCore/display/css/DisplayBoxDecorationPainter.cpp
M Source/WebCore/rendering/BorderPainter.cpp
M Source/WebCore/rendering/style/BorderData.h
Log Message:
-----------
Assertion in WebCore::calculateAdjustedInnerBorder()
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes