-
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.
Adjust logic for positioning the filename label in RenderFileUploadCo…
…ntrol to use the font ascent https://bugs.webkit.org/show_bug.cgi?id=262494 rdar://116356078 Reviewed by Alan Baradlay. In preparation for vertical writing mode support for `RenderFileUploadControl`, adjust the way that the filename label is positioned to use the font ascent rather than the `baselinePosition` of the associated button. This change is necessary since, the baseline position returns the center baseline in vertical writing mode, making it impossible to line up the filename label with the button text. Instead, the font ascent can be used similar to its use to draw the button text using `TextBoxPainter`. For now, there is no behavior change as only horizontal writing mode is supported. * Source/WebCore/rendering/RenderButton.cpp: * Source/WebCore/rendering/RenderButton.h: * Source/WebCore/rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintControl): Obtain the visual rect of the first textbox in the file upload button, move it to the desired painting position, and adjust its position using the ascent to ensure the text is painted at the correct location. Canonical link: https://commits.webkit.org/268752@main
- Loading branch information
Showing
3 changed files
with
20 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
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