[webkit-changes] [WebKit/WebKit] 38b829: DocumentMarkerLineStyle should encode the marker c...
Aditya Keerthi
noreply at github.com
Tue Feb 21 23:18:49 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 38b829c238b8b749bd68bf25b5715acb90bde295
https://github.com/WebKit/WebKit/commit/38b829c238b8b749bd68bf25b5715acb90bde295
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-02-21 (Tue, 21 Feb 2023)
Changed paths:
M Source/WebCore/platform/graphics/GraphicsTypes.h
M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
M Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm
M Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListItemType.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
M Source/WebCore/rendering/RenderTheme.cpp
M Source/WebCore/rendering/RenderTheme.h
M Source/WebCore/rendering/RenderThemeCocoa.h
M Source/WebCore/rendering/RenderThemeCocoa.mm
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Log Message:
-----------
DocumentMarkerLineStyle should encode the marker color
https://bugs.webkit.org/show_bug.cgi?id=252669
rdar://105729542
Reviewed by Wenson Hsieh.
Currently, document marker colors are determined at the GraphicsContext level.
To support the use of system colors for marker colors, the colors must be
resolved earlier, in the web process.
* Source/WebCore/platform/graphics/GraphicsTypes.h:
Add a `color` member to `DocumentMarkerLineStyle`, representing the marker
color. Drop the `shouldUseDarkAppearance` bit, as the `color` already takes
light/dark mode into account.
* Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawDotsForDocumentMarker):
* Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:
(WebCore::GraphicsContextCG::drawDotsForDocumentMarker):
(WebCore::grammarColor): Deleted.
(WebCore::colorForMarkerLineStyle): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListItemBuffer.cpp:
(WebCore::DisplayList::ItemHandle::destroy):
* Source/WebCore/platform/graphics/displaylists/DisplayListItemType.cpp:
(WebCore::DisplayList::isInlineItem):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawDotsForDocumentMarker::apply const):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
`DrawDotsForDocumentMarker` can no longer be an inline item, since `Color` can
have out-of-line components.
(WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker):
(WebCore::DisplayList::DrawDotsForDocumentMarker::style const):
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::RenderTheme::documentMarkerLineColor const):
* Source/WebCore/rendering/RenderTheme.h:
* Source/WebCore/rendering/RenderThemeCocoa.h:
* Source/WebCore/rendering/RenderThemeCocoa.mm:
(WebCore::grammarColor):
(WebCore::RenderThemeCocoa::documentMarkerLineColor const):
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter<TextBoxPath>::paintPlatformDocumentMarker):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
Canonical link: https://commits.webkit.org/260658@main
More information about the webkit-changes
mailing list