-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ControlPart enum order should not depend on CSSValueID enum order
Currently, the order of ControlPart enum in theme_types.h must match the order in css_value_keywords.json5. If not, a developer who uses an appearance value will get an unexpected rendered result when the wrong ControlPart value gets mapped instead. That is happening in M118 since CL [1] moved the order in css_value_keywords.json5, but not in theme_types.h. We fix this bug by changing the function `inline ControlPart CSSIdentifierValue::ConvertTo()` to not depend on the enum value order and instead list all ControlParts in a switch case. [1] https://chromium-review.googlesource.com/c/chromium/src/+/4833813 Change-Id: Ib61346281ee2a3de07c80729dc3029c97d3aee55 Bug: 1495418, 924486 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4973285 Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: Di Zhang <dizhangg@chromium.org> Cr-Commit-Position: refs/heads/main@{#1215572}
- Loading branch information
1 parent
a110627
commit c9694e8
Showing
13 changed files
with
101 additions
and
15 deletions.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
third_party/blink/web_tests/css-parser/deprecated-css-appearance-values-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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONSOLE WARNING: The keyword 'inner-spin-button' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'push-button' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'square-button' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'slider-horizontal' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'searchfield-cancel-button' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'media-slider' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'media-sliderthumb' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'media-volume-slider' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'media-volume-sliderthumb' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'sliderthumb-horizontal' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. | ||
CONSOLE WARNING: The keyword 'sliderthumb-vertical' used on the 'appearance' property was deprecated and has now been removed. It will no longer have any effect. |
22 changes: 22 additions & 0 deletions
22
third_party/blink/web_tests/css-parser/deprecated-css-appearance-values.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,22 @@ | ||
<!DOCTYPE html> | ||
<title>Deprecated CSS appearance value: inner-spin-button</title> | ||
<link rel=author href="mailto:dizhangg@chromium.org"> | ||
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> | ||
<style> | ||
span { | ||
border: 2px solid; | ||
border-color: red; | ||
height: 3em; | ||
} | ||
</style> | ||
<span style="appearance: inner-spin-button">foobar</span> | ||
<span style="appearance: push-button">foobar</span> | ||
<span style="appearance: square-button">foobar</span> | ||
<span style="appearance: slider-horizontal">foobar</span> | ||
<span style="appearance: searchfield-cancel-button">foobar</span> | ||
<span style="appearance: media-slider">foobar</span> | ||
<span style="appearance: media-sliderthumb">foobar</span> | ||
<span style="appearance: media-volume-slider">foobar</span> | ||
<span style="appearance: media-volume-sliderthumb">foobar</span> | ||
<span style="appearance: sliderthumb-horizontal">foobar</span> | ||
<span style="appearance: sliderthumb-vertical">foobar</span> |
Binary file added
BIN
+3.73 KB
...b_tests/platform/linux/css-parser/deprecated-css-appearance-values-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.8 KB
...earance-values-enabled/css-parser/deprecated-css-appearance-values-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.28 KB
...web_tests/platform/mac/css-parser/deprecated-css-appearance-values-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.29 KB
...earance-values-enabled/css-parser/deprecated-css-appearance-values-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.11 KB
...web_tests/platform/win/css-parser/deprecated-css-appearance-values-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.16 KB
...earance-values-enabled/css-parser/deprecated-css-appearance-values-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
...ed-css-appearance-values-enabled/css-parser/deprecated-css-appearance-values-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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONSOLE WARNING: The keyword 'inner-spin-button' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'push-button' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'square-button' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'slider-horizontal' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'searchfield-cancel-button' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'media-slider' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'media-sliderthumb' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'media-volume-slider' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'media-volume-sliderthumb' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'sliderthumb-horizontal' specified to an 'appearance' property is not standardized. It will be removed in the future. | ||
CONSOLE WARNING: The keyword 'sliderthumb-vertical' specified to an 'appearance' property is not standardized. It will be removed in the future. |