forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit non-initial <input type=checkbox switch> styling to appearance:…
…auto https://bugs.webkit.org/show_bug.cgi?id=267334 Reviewed by Aditya Keerthi and Tim Nguyen. Per discussion in whatwg/html#4180 we do not want styles intended for appearance:auto to leak into appearance:none. Ideally we pay more attention to this with all form controls going forward, but that is a much larger undertaking. * LayoutTests/fast/forms/switch/display-expected.txt: Added. * LayoutTests/fast/forms/switch/display.html: Added. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.window-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.window.js: * LayoutTests/platform/ios/TestExpectations: Enable WebKit-specific switch tests on iOS too, except for those that currently do not work. * Source/WebCore/css/htmlSwitchControl.css: (@namespace "http://www.w3.org/1999/xhtml";): (input[type="checkbox"][switch]::thumb, input[type="checkbox"][switch]::track): * Source/WebCore/rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::adjustSwitchStyleDisplay const): (WebCore::RenderTheme::adjustSwitchStyle const): (WebCore::RenderTheme::adjustSwitchThumbOrSwitchTrackStyle const): * Source/WebCore/rendering/RenderTheme.h: * Source/WebCore/rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::adjustSwitchStyle const): No longer skip most of the iOS style adjusting logic for non-auto sizes. Canonical link: https://commits.webkit.org/273078@main
- Loading branch information
Showing
9 changed files
with
101 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PASS getComputedStyle(control).display is "none" | ||
PASS getComputedStyle(control).display is "inline-grid" | ||
PASS getComputedStyle(control).display is "grid" | ||
PASS getComputedStyle(control).display is "grid" | ||
PASS getComputedStyle(control).display is "inline-grid" | ||
|
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,20 @@ | ||
<script src="../../../resources/js-test-pre.js"></script> | ||
<input type=checkbox switch> | ||
<script> | ||
const control = document.querySelector("input"); | ||
|
||
control.style.display = "none"; | ||
shouldBeEqualToString("getComputedStyle(control).display", "none"); | ||
|
||
control.style.display = "inline"; | ||
shouldBeEqualToString("getComputedStyle(control).display", "inline-grid"); | ||
|
||
control.style.display = "table"; | ||
shouldBeEqualToString("getComputedStyle(control).display", "grid"); | ||
|
||
control.style.display = "block"; | ||
shouldBeEqualToString("getComputedStyle(control).display", "grid"); | ||
|
||
control.style.display = "inline-grid"; | ||
shouldBeEqualToString("getComputedStyle(control).display", "inline-grid"); | ||
</script> |
2 changes: 2 additions & 0 deletions
2
...platform-tests/html/rendering/widgets/input-checkbox-switch.tentative.window-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,4 +1,6 @@ | ||
|
||
PASS Default appearance value | ||
PASS Default appearance value: display:none | ||
PASS appearance:none should work | ||
PASS appearance:none should work: display gets its initial value | ||
|
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
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