Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7cfd2e7510a4db713120cefaf757ea3f8a249f2e
https://github.com/WebKit/WebKit/commit/7cfd2e7510a4db713120cefaf757ea3f8a249f2e
Author: Lily Spiniolas <[email protected]>
Date: 2025-05-10 (Sat, 10 May 2025)
Changed paths:
M Source/WebCore/html/TextFieldInputType.cpp
M Source/WebCore/html/shadow/TextControlInnerElements.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderTheme.cpp
M Source/WebCore/rendering/RenderTheme.h
M Source/WebCore/rendering/cocoa/RenderThemeCocoa.h
M Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm
Log Message:
-----------
[macOS] Improve support for textarea and textfields when vector-based
controls are enabled
https://bugs.webkit.org/show_bug.cgi?id=292627
rdar://150787309
Reviewed by Megan Gardner, Aditya Keerthi, and Wenson Hsieh.
Added paint methods for textareas and textfields. Added method to adjust styles
for the inner elements of text-based controls.
Removed unused variable 'webkitTextfieldDecorationContainerName'.
Calls to `paintTextArea` and `paintTextField` have been moved from
`RenderTheme::paintBorderOnly` to `RenderTheme::paint`, and
`RenderTheme::paintBorderOnly` now simply returns true for
textareas and textfields. When `RenderTheme::paintBorderOnly`
returns true, the CSS background is painted for a control. The
method is only called when `RenderTheme::paint` returns true.
Since neither `paintTextArea` nor `paintTextField` do any
painting and simply return true in the cases where the base
implementation is used or the Cocoa implementation is used
& vector-based controls for Mac/Mac Catalyst are disabled,
there is no change in behavior in these two cases.
The purpose of moving these calls is that, if the controls
end up being painted using the vector-based implementations
for Mac/Mac Catalyst, the background can just be painted there
instead of having to paint the CSS background since we know
what color the background will be. We know the background color
will be the same as the UA style because if any other background
style was applied, the control would have devolved and theme
painting for the control would have been skipped entirely.
* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createContainer):
* Source/WebCore/html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerContainer::resolveCustomStyle):
(WebCore::TextControlInnerTextElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
* Source/WebCore/rendering/RenderTheme.h:
(WebCore::RenderTheme::adjustTextControlInnerContainerStyle const):
(WebCore::RenderTheme::adjustTextControlInnerPlaceholderStyle const):
(WebCore::RenderTheme::adjustTextControlInnerTextStyle const):
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.h:
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm:
(WebCore::RenderThemeCocoa::adjustTextControlInnerContainerStyle const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerPlaceholderStyle const):
(WebCore::RenderThemeCocoa::adjustTextControlInnerTextStyle const):
Canonical link: https://commits.webkit.org/294757@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