Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1bf94f1c0c462bef841fca9877c167bf4bc769b3
https://github.com/WebKit/WebKit/commit/1bf94f1c0c462bef841fca9877c167bf4bc769b3
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-04 (Fri, 04 Sep 2026)
Changed paths:
M Source/WebCore/html/canvas/CanvasStyle.cpp
Log Message:
-----------
[Canvas] parseColor() constructs CSSParserContext(HTMLStandardMode) twice
https://bugs.webkit.org/show_bug.cgi?id=323404
rdar://186639923
Reviewed by Tim Nguyen.
The ScriptExecutionContext overload of parseColor() constructed an
identical CSSParserContext(HTMLStandardMode) twice: once for the
parseColorRawSimple() fast path, and again for parseColorRawGeneral()
on the fall-through slow path. CSSParserContext is a heavy struct, so
this was a redundant build whenever the simple parse failed.
Hoist it into a single local reused by both calls, matching the sibling
CanvasBase overload which already binds the context once.
* Source/WebCore/html/canvas/CanvasStyle.cpp:
(WebCore::parseColor):
Canonical link: https://commits.webkit.org/320512@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications