[webkit-changes] [WebKit/WebKit] 340e63: REGRESSION (Safari 16.4): Dynamically set `<meter>...
Aditya Keerthi
noreply at github.com
Thu Apr 27 16:57:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 340e63b309b7b27c301b2a02ea1275836cc1f4d8
https://github.com/WebKit/WebKit/commit/340e63b309b7b27c301b2a02ea1275836cc1f4d8
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-04-27 (Thu, 27 Apr 2023)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/css/appearance-apple-pay-button-style-dynamic-update-expected.html
A LayoutTests/fast/css/appearance-apple-pay-button-style-dynamic-update.html
A LayoutTests/fast/forms/meter-dynamic-update-expected.html
A LayoutTests/fast/forms/meter-dynamic-update.html
A LayoutTests/fast/forms/progress-dynamic-update-expected.html
A LayoutTests/fast/forms/progress-dynamic-update.html
A LayoutTests/fast/forms/range-datalist-dynamic-update-expected.html
A LayoutTests/fast/forms/range-datalist-dynamic-update.html
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/platform/graphics/controls/ApplePayButtonPart.cpp
M Source/WebCore/platform/graphics/controls/ApplePayButtonPart.h
M Source/WebCore/platform/graphics/controls/MeterPart.cpp
M Source/WebCore/platform/graphics/controls/MeterPart.h
M Source/WebCore/platform/graphics/controls/ProgressBarPart.cpp
M Source/WebCore/platform/graphics/controls/ProgressBarPart.h
M Source/WebCore/platform/graphics/controls/SliderTrackPart.cpp
M Source/WebCore/platform/graphics/controls/SliderTrackPart.h
M Source/WebCore/rendering/RenderTheme.cpp
M Source/WebCore/rendering/RenderTheme.h
Log Message:
-----------
REGRESSION (Safari 16.4): Dynamically set `<meter>` doesn't show the value
https://bugs.webkit.org/show_bug.cgi?id=255914
rdar://108495001
Reviewed by Tim Horton.
257981 at main began the process of refactoring form control rendering to support
the GPU process on macOS. Since the refactoring, form controls are represented
by various `ControlPart` subclasses, which can be drawn using a `GraphicsContext`.
For the more customizable controls (such as <meter>, <progress>,
<input type=range>, and Apple Pay buttons), form control state is encoded directly
on the `ControlPart` subclass. The `ControlPart` is only created once per renderer
in the various flavors of `RenderTheme::ensureControlPart`. Consequently, the
a form control's updated state is never reflected in the `ControlPart` once it
has been created. This results in dynamic changes to state not being reflected
in painting.
To fix, ensure the `ControlPart` is up-to-date with the latest state prior to
painting.
* LayoutTests/TestExpectations:
* LayoutTests/fast/css/appearance-apple-pay-button-style-dynamic-update-expected.html: Added.
* LayoutTests/fast/css/appearance-apple-pay-button-style-dynamic-update.html: Added.
* LayoutTests/fast/forms/meter-dynamic-update-expected.html: Added.
* LayoutTests/fast/forms/meter-dynamic-update.html: Added.
* LayoutTests/fast/forms/progress-dynamic-update-expected.html: Added.
* LayoutTests/fast/forms/progress-dynamic-update.html: Added.
* LayoutTests/fast/forms/range-datalist-dynamic-update-expected.html: Added.
* LayoutTests/fast/forms/range-datalist-dynamic-update.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/platform/graphics/controls/ApplePayButtonPart.cpp:
(WebCore::ApplePayButtonPart::create):
* Source/WebCore/platform/graphics/controls/ApplePayButtonPart.h:
(WebCore::ApplePayButtonPart::setButtonType):
(WebCore::ApplePayButtonPart::setButtonStyle):
(WebCore::ApplePayButtonPart::setLocale):
* Source/WebCore/platform/graphics/controls/MeterPart.cpp:
(WebCore::MeterPart::create):
* Source/WebCore/platform/graphics/controls/MeterPart.h:
(WebCore::MeterPart::setGaugeRegion):
(WebCore::MeterPart::setValue):
(WebCore::MeterPart::setMinimum):
(WebCore::MeterPart::setMaximum):
* Source/WebCore/platform/graphics/controls/ProgressBarPart.cpp:
(WebCore::ProgressBarPart::create):
* Source/WebCore/platform/graphics/controls/ProgressBarPart.h:
(WebCore::ProgressBarPart::setPosition):
(WebCore::ProgressBarPart::setAnimationStartTime):
* Source/WebCore/platform/graphics/controls/SliderTrackPart.cpp:
(WebCore::SliderTrackPart::create):
* Source/WebCore/platform/graphics/controls/SliderTrackPart.h:
(WebCore::SliderTrackPart::setThumbSize):
(WebCore::SliderTrackPart::setTrackBounds):
(WebCore::SliderTrackPart::setTickRatios):
* Source/WebCore/rendering/RenderTheme.cpp:
(WebCore::updateApplePayButtonPartForRenderer):
(WebCore::updateMeterPartForRenderer):
(WebCore::updateProgressBarPartForRenderer):
(WebCore::updateSliderTrackPartForRenderer):
(WebCore::RenderTheme::createControlPart const):
Don't capture any state on creation, it is only necessary for painting, and
will be set prior to drawing.
(WebCore::RenderTheme::updateControlPartForRenderer const):
Update the `ControlPart` based on the latest state, only for controls that
require additional state.
(WebCore::RenderTheme::paint):
Ensure the `ControlPart` state is up-to-date prior to painting.
(WebCore::createApplePayButtonPartForRenderer): Deleted.
(WebCore::createMeterPartForRenderer): Deleted.
(WebCore::createProgressBarPartForRenderer): Deleted.
(WebCore::createSliderTrackPartForRenderer): Deleted.
* Source/WebCore/rendering/RenderTheme.h:
Canonical link: https://commits.webkit.org/263473@main
More information about the webkit-changes
mailing list