[webkit-changes] [WebKit/WebKit] e10544: [macOS] Support rendering native <progress> in ver...
Aditya Keerthi
noreply at github.com
Thu Sep 14 08:43:16 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e105446b239e5bea36bb218c7392271e850da146
https://github.com/WebKit/WebKit/commit/e105446b239e5bea36bb218c7392271e850da146
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2023-09-14 (Thu, 14 Sep 2023)
Changed paths:
A LayoutTests/fast/forms/vertical-writing-mode/progress-expected.html
A LayoutTests/fast/forms/vertical-writing-mode/progress.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/progress-appearance-native-computed-style.optional-expected.txt
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/wincairo/TestExpectations
M Source/WebCore/platform/graphics/mac/controls/ProgressBarMac.mm
Log Message:
-----------
[macOS] Support rendering native <progress> in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=261493
rdar://115408537
Reviewed by Tim Nguyen and Richard Robinson.
Add support for rendering `<progress>` with `appearance: auto` with a vertical
writing mode, by rotating the CoreUI image by 90 degrees. This approach is viable
since the image does not have any shadows or orientation specific behaviors.
* LayoutTests/fast/forms/vertical-writing-mode/progress-expected.html: Added.
* LayoutTests/fast/forms/vertical-writing-mode/progress.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/forms/progress-appearance-native-computed-style.optional-expected.txt:
These subtests were previously incorrectly passing, as the minimum block size
was not actually being enforced with a vertical writing mode. Now, the vertical
writing mode fails the same way as the horizontal writing mode.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/wincairo/TestExpectations:
* Source/WebCore/platform/graphics/mac/controls/ProgressBarMac.mm:
(WebCore::ProgressBarMac::rectForBounds const):
Adjust `rectForBounds` to ensure a minimum block-size is enforced. Support for
vertical writing modes is not added at a "lower-level" (`controlSizeForFont`,
`cellSize`, `cellOutsets`), since all controls can not necessarily be rotated.
(WebCore::ProgressBarMac::draw):
Draw vertical progress bars into a horizontal buffer and rotate the context to
achieve a vertical appearance.
Canonical link: https://commits.webkit.org/267988@main
More information about the webkit-changes
mailing list