[webkit-changes] [WebKit/WebKit] 219eda: REGRESSION (Safari 16): Input placeholder misplace...
Aditya Keerthi
noreply at github.com
Wed Sep 28 09:37:47 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 219edafe86a2f96092c3004bfdbdbe9204b27817
https://github.com/WebKit/WebKit/commit/219edafe86a2f96092c3004bfdbdbe9204b27817
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2022-09-28 (Wed, 28 Sep 2022)
Changed paths:
A LayoutTests/fast/forms/placeholder-content-center-line-height-greater-than-content-height-expected.html
A LayoutTests/fast/forms/placeholder-content-center-line-height-greater-than-content-height.html
M LayoutTests/platform/gtk/TestExpectations
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/win/TestExpectations
M Source/WebCore/rendering/RenderTextControlSingleLine.cpp
Log Message:
-----------
REGRESSION (Safari 16): Input placeholder misplaced on revaaa.com
https://bugs.webkit.org/show_bug.cgi?id=245422
rdar://100369677
Reviewed by Alan Bujtas.
250414 at main prevented authors from customizing the `line-height` of
`::placeholder`. This change resulted in off-center placeholders when the
placeholder box's height was larger than the height of the content.
Consequently, a follow-up fix using the height of the content in the
placeholder's first line box to determine its position was done in
253500 at main.
However, the height of the content in the placeholder's first line box can be
smaller than the height of the line box. In this case, the placeholder will
continue to appear off-center, as a smaller height is used for centering.
To fix, take the maximum of the height of the content in the placeholder's
first line box and the height of the line box.
* LayoutTests/fast/forms/placeholder-content-center-line-height-greater-than-content-height-expected.html: Added.
* LayoutTests/fast/forms/placeholder-content-center-line-height-greater-than-content-height.html: Added.
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/win/TestExpectations:
* Source/WebCore/rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::layout):
Canonical link: https://commits.webkit.org/254962@main
More information about the webkit-changes
mailing list