-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
7 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
LayoutTests/fast/forms/vertical-writing-mode/progress-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<style> | ||
|
||
progress { | ||
transform: rotate(90deg) translate(0, -100%); | ||
transform-origin: left top; | ||
} | ||
|
||
</style> | ||
<progress value="20" max="100"></progress> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<meta name="fuzzy" content="maxDifference=0-8; totalPixels=0-1"/> | ||
<style> | ||
|
||
progress { | ||
writing-mode: vertical-lr; | ||
} | ||
|
||
</style> | ||
<progress value="20" max="100"></progress> |
4 changes: 2 additions & 2 deletions
4
...s/css-writing-modes/forms/progress-appearance-native-computed-style.optional-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
|
||
FAIL progress[style="writing-mode: horizontal-tb"] block size should match height and inline should match width assert_equals: expected "16px" but got "21px" | ||
PASS progress[style="writing-mode: vertical-lr"] block size should match width and inline should match width | ||
PASS progress[style="writing-mode: vertical-rl"] block size should match width and inline should match width | ||
FAIL progress[style="writing-mode: vertical-lr"] block size should match width and inline should match width assert_equals: expected "16px" but got "21px" | ||
FAIL progress[style="writing-mode: vertical-rl"] block size should match width and inline should match width assert_equals: expected "16px" but got "21px" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters