[webkit-changes] [WebKit/WebKit] acd851: [Outline] Add support for outline with border-radi...
alan
noreply at github.com
Sat Oct 8 11:05:03 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: acd85199c2bdd7af48d46daf78c834e75930b867
https://github.com/WebKit/WebKit/commit/acd85199c2bdd7af48d46daf78c834e75930b867
Author: Alan Bujtas <zalan at apple.com>
Date: 2022-10-08 (Sat, 08 Oct 2022)
Changed paths:
A LayoutTests/fast/inline/inline-outline-with-border-radius-expected.html
A LayoutTests/fast/inline/inline-outline-with-border-radius.html
M LayoutTests/fast/repaint/inline-outline-repaint.html
M Source/WebCore/platform/graphics/PathUtilities.cpp
M Source/WebCore/rendering/BorderPainter.cpp
M Source/WebCore/rendering/BorderPainter.h
M Source/WebCore/rendering/RenderInline.cpp
Log Message:
-----------
[Outline] Add support for outline with border-radius (inline edition)
https://bugs.webkit.org/show_bug.cgi?id=246192
Reviewed by Antti Koivisto.
1. Collect (line spanning) inline box rectangles (RenderInline::paintOutline)
2. Call pathWithShrinkWrappedRectsForOutline to have the joint inline box rectangles merged
3. Use regular outline painting if there's only one rect or the rectangles are completely disjoint (empty path), otherwise call strokePath (this matches focusring behavior).
* Source/WebCore/platform/graphics/PathUtilities.cpp:
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline): This can handle 0 border-radius cases as well.
* Source/WebCore/rendering/BorderPainter.cpp:
(WebCore::BorderPainter::paintOutline):
(WebCore::BorderPainter::paintOutlineForLine): Deleted.
* Source/WebCore/rendering/BorderPainter.h:
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutline): No need for the empty first/last rectangles.
*fast/repaint/inline-outline-repaint.html: Make sure the caret is not visible when taking the snapshot.
Canonical link: https://commits.webkit.org/255314@main
More information about the webkit-changes
mailing list