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
[GPU Process] [FormControls] Add a ControlPart for TextField #7841
[GPU Process] [FormControls] Add a ControlPart for TextField #7841
Conversation
EWS run on previous version of this PR (hash e39b77e) |
e39b77e
to
3f35d9e
Compare
EWS run on previous version of this PR (hash 3f35d9e) |
3f35d9e
to
db60c5e
Compare
EWS run on previous version of this PR (hash db60c5e) |
@@ -43,6 +47,11 @@ | |||
{ | |||
} | |||
|
|||
bool ControlMac::userPrefersContrast() | |||
{ | |||
return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldIncreaseContrast]; |
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.
Which process does this run in? If it's in the GPU Process, we should feed it in from the web process.
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 will address this issue in a separate patch.
db60c5e
to
7950cc4
Compare
EWS run on previous version of this PR (hash 7950cc4) |
7950cc4
to
b89ef51
Compare
EWS run on current version of this PR (hash b89ef51) |
if (!is<HTMLInputElement>(renderer.generatingNode())) | ||
return false; | ||
|
||
const auto& input = downcast<HTMLInputElement>(*(renderer.generatingNode())); |
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.
dynamicDowncast
const auto* input = downcast<HTMLInputElement>(renderer.generatingNode()); | ||
if (!input) | ||
return false; |
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.
dynamicDowncast
https://bugs.webkit.org/show_bug.cgi?id=249573 rdar://103508637 Reviewed by Simon Fraser and Aditya Keerthi. NSTextFieldCell is used draw a border around the text field. CoreUI is used to draw a list button if the text field has a data list. * Source/WebCore/Headers.cmake: * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj: * Source/WebCore/PAL/pal/spi/mac/NSTextFieldCellSPI.h: Added. * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/controls/ControlFactory.h: * Source/WebCore/platform/graphics/controls/ControlPart.h: * Source/WebCore/platform/graphics/controls/ControlStyle.cpp: (WebCore::operator<<): * Source/WebCore/platform/graphics/controls/ControlStyle.h: * Source/WebCore/platform/graphics/controls/TextFieldPart.h: Copied from Source/WebCore/platform/graphics/controls/ControlFactory.h. (WebCore::TextFieldPart::create): (WebCore::TextFieldPart::TextFieldPart): * Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.h: * Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.mm: (WebCore::ControlFactoryMac::levelIndicatorCell const): (WebCore::ControlFactoryMac::textFieldCell const): (WebCore::ControlFactoryMac::createPlatformTextField): * Source/WebCore/platform/graphics/mac/controls/ControlMac.h: * Source/WebCore/platform/graphics/mac/controls/ControlMac.mm: (WebCore::ControlMac::userPrefersContrast): (WebCore::drawCellOrFocusRing): (WebCore::ControlMac::drawCell): (WebCore::ControlMac::drawListButton): (WebCore::ControlMac::draw): Deleted. * Source/WebCore/platform/graphics/mac/controls/MeterMac.mm: (WebCore::MeterMac::draw): * Source/WebCore/platform/graphics/mac/controls/TextFieldMac.h: Copied from Source/WebCore/platform/graphics/controls/ControlFactory.h. * Source/WebCore/platform/graphics/mac/controls/TextFieldMac.mm: Added. (WebCore::TextFieldMac::TextFieldMac): (WebCore::TextFieldMac::shouldPaintCustomTextField): (WebCore::TextFieldMac::draw): * Source/WebCore/platform/graphics/mac/controls/WebControlView.h: * Source/WebCore/platform/graphics/mac/controls/WebControlView.mm: (-[WebControlTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]): (-[WebControlTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]): (-[WebControlTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:maskOnly:]): * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::ensureControlPartForRenderer): (WebCore::RenderBox::ensureControlPartForBorderOnly): (WebCore::RenderBox::paintBoxDecorations): (WebCore::RenderBox::ensureControlPart): Deleted. * Source/WebCore/rendering/RenderBox.h: * Source/WebCore/rendering/RenderTheme.cpp: (WebCore::RenderTheme::createControlPart const): (WebCore::RenderTheme::extractControlStyleStatesForRenderer const): (WebCore::RenderTheme::hasListButton const): (WebCore::RenderTheme::hasListButtonPressed const): (WebCore::RenderTheme::createControlPartForRenderer const): Deleted. * Source/WebCore/rendering/RenderTheme.h: (WebCore::RenderTheme::canCreateControlPartForBorderOnly const): * Source/WebCore/rendering/RenderThemeMac.h: * Source/WebCore/rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::canPaint const): (WebCore::RenderThemeMac::canCreateControlPartForBorderOnly const): (WebCore::RenderThemeMac::meterSizeForBounds const): (WebCore::RenderThemeMac::shouldPaintCustomTextField const): Deleted. (WebCore::RenderThemeMac::paintTextField): Deleted. (WebCore::RenderThemeMac::textField const): Deleted. * Source/WebKit/Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<ControlPart>::decode): * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: Canonical link: https://commits.webkit.org/258125@main
b89ef51
to
8209e22
Compare
Committed 258125@main (8209e22): https://commits.webkit.org/258125@main Reviewed commits have been landed. Closing PR #7841 and removing active labels. |
8209e22
b89ef51
π§ͺ api-iosπ§ͺ api-gtk