-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Improve <input type=color alpha> performance on macOS #39814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve <input type=color alpha> performance on macOS #39814
Conversation
EWS run on previous version of this PR (hash af481d7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look quite right. Maybe you want a shouldBe
-like function here to clearly state that empty string is the expectation? Other logged values may benefit from shouldBe
, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really want to state the expectations as they can differ per platform, as they do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even this one, empty innerHTML
?
That said, color components differing per platform (and I'm sure also per configuration) is only more of a reason to have expectations. Possibly, saying that the numbers should be within a certain range. Currently, you are asking everyone who sees the test fail to investigate for themselves whether the different number means failing or passing, and that's rather hard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They only differ between macOS and everywhere else at this point. And only macOS has a deeper subtree. Anyone touching the shadow tree for this component would know why this test regressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hear your explanations, but I still really dislike tests that just dump results, as existing ones that do so are a constant nuisance.
The |
af481d7
to
cebe08f
Compare
EWS run on current version of this PR (hash cebe08f) |
Safe-Merge-Queue: Build #48499. |
https://bugs.webkit.org/show_bug.cgi?id=286803 rdar://143955048 Reviewed by Aditya Keerthi. Using data: URLs here resulted in annoying flickering when moving the alpha slider quickly. Using SVG directly in the shadow tree ran into https://bugs.webkit.org/show_bug.cgi?id=287472 so therefore we use a div element with a polygon clip-path. This results in additional render layers, but websites will likely not have a lot of these controls so that seems okay. * LayoutTests/fast/forms/color/color-input-swatch-expected.txt: * LayoutTests/fast/forms/color/color-input-swatch.html: * LayoutTests/platform/mac/fast/forms/color/color-input-swatch-expected.txt: * LayoutTests/platform/mac/fast/forms/color/input-appearance-color-expected.txt: * Source/WebCore/html/ColorInputType.cpp: (WebCore::ColorInputType::createShadowSubtree): (WebCore::ColorInputType::updateColorSwatch): * Source/WebCore/rendering/RenderTheme.h: (WebCore::RenderTheme::createColorWellSwatchSubtree): * Source/WebCore/rendering/mac/RenderThemeMac.h: * Source/WebCore/rendering/mac/RenderThemeMac.mm: (WebCore::RenderThemeMac::createColorWellSwatchSubtree): (WebCore::RenderThemeMac::setColorWellSwatchBackground): Canonical link: https://commits.webkit.org/290228@main
Committed 290228@main (c670903): https://commits.webkit.org/290228@main Reviewed commits have been landed. Closing PR #39814 and removing active labels. |
cebe08f
to
c670903
Compare
c670903
cebe08f
🛠 mac-AS-debug🛠 🧪 unsafe-merge