[webkit-changes] [WebKit/WebKit] a194f9: vertical-align doesn't seem to be intuitive/correct
Alan Baradlay
noreply at github.com
Mon Apr 3 06:44:03 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a194f90ccc4e6d0e75dd7c7f3617d620b1bf2555
https://github.com/WebKit/WebKit/commit/a194f90ccc4e6d0e75dd7c7f3617d620b1bf2555
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-04-03 (Mon, 03 Apr 2023)
Changed paths:
A LayoutTests/fast/inline-block/vertical-align-top-and-bottom-expected.txt
A LayoutTests/fast/inline-block/vertical-align-top-and-bottom.html
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h
Log Message:
-----------
vertical-align doesn't seem to be intuitive/correct
https://bugs.webkit.org/show_bug.cgi?id=156662
<rdar://problem/97039168>
Reviewed by Antti Koivisto.
"vertical-align: bottom" pushes the root inline box down when it stretches the line, but only when it actually stretches it.
(i.e. when top stretches it even more, bottom has no affect)
(Test case credit: https://chromium.googlesource.com/chromium/src.git/+/020751ff9d9524fe83cc858edf4d1aea78e305ae)
* LayoutTests/fast/inline-block/vertical-align-top-and-bottom-expected.txt: Added.
* LayoutTests/fast/inline-block/vertical-align-top-and-bottom.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.cpp:
(WebCore::Layout::LineBoxVerticalAligner::computeLineBoxLogicalHeight const):
(WebCore::Layout::LineBoxVerticalAligner::computeRootInlineBoxVerticalPosition const): check if top stretches the line box.
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxVerticalAligner.h: decouple top(bottom) and non-line-box relative box heights.
(WebCore::Layout::LineBoxVerticalAligner::LineBoxAlignmentContent::height const):
Canonical link: https://commits.webkit.org/262506@main
More information about the webkit-changes
mailing list