Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 89e7ad2339117000b3ffb81952d59fa58778c614
https://github.com/WebKit/WebKit/commit/89e7ad2339117000b3ffb81952d59fa58778c614
Author: Simon Fraser <[email protected]>
Date: 2024-12-19 (Thu, 19 Dec 2024)
Changed paths:
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
Log Message:
-----------
Avoid churning Style::Colors via colorResolvingCurrentColor()
https://bugs.webkit.org/show_bug.cgi?id=284933
rdar://141729996
Reviewed by Sam Weinig.
~Style::Color shows up on profiles under
`RenderStyle::unresolvedColorForProperty()` for painting-heavy tasks
where we often fetch colors to ask about whether something should paint.
`RenderStyle::unresolvedColorForProperty` currently returns a `Style::Color` by
value, but we can return by
reference if we handle `CSSPropertyColor` explicitly. `RenderStyle::color()`
and `visitedLinkColor()` return
`WebCore::Color` so their `Style::Color` is always a `ResolvedColor`, thus
there's no need to hit the `resolveColor()`
code path.
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::unresolvedColorForProperty const):
(WebCore::RenderStyle::colorResolvingCurrentColor const):
* Source/WebCore/rendering/style/RenderStyle.h:
Canonical link: https://commits.webkit.org/288099@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes