2D context stroke, fill color parsing spends time resolving script execution context#44998
Merged
webkit-commit-queue merged 1 commit intoMay 7, 2025
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 8752161) Details |
Collaborator
Safer C++ Build #34657 (8752161)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
8752161 to
81b639b
Compare
Collaborator
|
EWS run on previous version of this PR (hash 81b639b) Details |
81b639b to
f50c06e
Compare
Collaborator
|
EWS run on previous version of this PR (hash f50c06e) Details
|
f50c06e to
1851615
Compare
Collaborator
|
EWS run on previous version of this PR (hash 1851615) Details
|
1851615 to
4ad7efa
Compare
Collaborator
|
EWS run on current version of this PR (hash 4ad7efa) Details |
smfr
approved these changes
May 6, 2025
…ecution context https://bugs.webkit.org/show_bug.cgi?id=292604 rdar://150757978 Reviewed by Simon Fraser. General parsing CSS colors needs the CSS value pool from script execution context. The fast path does not need this, but 2D context code would resolve the context anyway. For significant number of strokeStyle/fillStyle assignments, this would result in significant amount of work. Simplify the fast/slow path invocation by exposing the specific fast path function. There's only few call sites and the previous functor based approach resulted in more complex and less efficient code. * Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.cpp: (WebCore::CSSPropertyParserHelpers::parseColorRaw): (WebCore::CSSPropertyParserHelpers::parseColorRawSlow): Deleted. * Source/WebCore/css/parser/CSSPropertyParserConsumer+Color.h: * Source/WebCore/css/parser/CSSPropertyParserConsumer+ColorInlines.h: (WebCore::CSSPropertyParserHelpers::parseColorRawFast): (WebCore::CSSPropertyParserHelpers::parseColorRaw): * Source/WebCore/html/ColorInputType.cpp: (WebCore::parseColorValue): (WebCore::colorParsingParameters): Deleted. * Source/WebCore/html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyleColorResolutionDelegate::currentColor const): (WebCore::parseColor): (WebCore::elementlessColorParsingParameters): Deleted. (WebCore::colorParsingParameters): Deleted. * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::setUnderPageBackgroundColorOverride): Canonical link: https://commits.webkit.org/294607@main
4ad7efa to
48f9487
Compare
Collaborator
|
Committed 294607@main (48f9487): https://commits.webkit.org/294607@main Reviewed commits have been landed. Closing PR #44998 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
48f9487
4ad7efa