-
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.
REGRESSION (258177@main): Radio buttons are shifted up on facebook.co…
…m account sign up/creation page https://bugs.webkit.org/show_bug.cgi?id=258754 rdar://111343119 Reviewed by Wenson Hsieh. On macOS, "toggle buttons", which include radio button and checkboxes, are only drawn at fixed sizes. When painted into a rect larger than their natural size, the control is automatically vertically centered. 258177@main incorrectly adjusted the rect used to paint these controls to equal the natural size, rather the size of the element itself. Radio buttons on facebook.com have a tall size. Consequently, the control is painted at the top of the box, rather than in the center. Fix by ensuring the rect used for painting uses the full size of the element. * LayoutTests/TestExpectations: * LayoutTests/fast/forms/fixed-size-checkbox-vertically-centered-expected.html: Added. * LayoutTests/fast/forms/fixed-size-checkbox-vertically-centered.html: Added. * LayoutTests/fast/forms/fixed-size-radio-vertically-centered-expected.html: Added. * LayoutTests/fast/forms/fixed-size-radio-vertically-centered.html: Added. * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/platform/graphics/mac/controls/ToggleButtonMac.h: * Source/WebCore/platform/graphics/mac/controls/ToggleButtonMac.mm: (WebCore::ToggleButtonMac::rectForBounds const): Implement `rectForBounds` so that the rect used for painting is accurately reported. (WebCore::ToggleButtonMac::draw): Do not constain the paint rect to the natural size of the control. Canonical link: https://commits.webkit.org/265694@main
- Loading branch information
Showing
8 changed files
with
88 additions
and
16 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
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/forms/fixed-size-checkbox-vertically-centered-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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
|
||
input[type="checkbox"] { | ||
margin-top: 44px; | ||
width: 16px; | ||
height: 16px; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<input type="checkbox"> | ||
</body> | ||
</html> |
16 changes: 16 additions & 0 deletions
16
LayoutTests/fast/forms/fixed-size-checkbox-vertically-centered.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,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
|
||
input[type="checkbox"] { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<input type="checkbox"> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
LayoutTests/fast/forms/fixed-size-radio-vertically-centered-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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
|
||
input[type="radio"] { | ||
margin-top: 44px; | ||
width: 18px; | ||
height: 18px; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<input type="radio"> | ||
</body> | ||
</html> |
16 changes: 16 additions & 0 deletions
16
LayoutTests/fast/forms/fixed-size-radio-vertically-centered.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,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
|
||
input[type="radio"] { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<input type="radio"> | ||
</body> | ||
</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
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