-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wide-layout attachments: Fix baseline computation #15680
Wide-layout attachments: Fix baseline computation #15680
Conversation
EWS run on previous version of this PR (hash 389da92) |
389da92
to
978f0ff
Compare
EWS run on previous version of this PR (hash 978f0ff) |
978f0ff
to
ab36b2f
Compare
EWS run on current version of this PR (hash ab36b2f) |
https://bugs.webkit.org/show_bug.cgi?id=259039 rdar://problem/111991128 Reviewed by Tim Nguyen. The previous computation used `renderRect`s, which relied on the baseline, modifying the baseline again and again. Instead, assume that the image is vertically centred, so it's just a matter of adding half-heights to find the bottom of that image. (Fallback to the full attachment height alone in case the inner element doesn't have its height yet.) * LayoutTests/fast/attachment/mac/wide-attachment-image-controls-basic-expected.txt: * LayoutTests/platform/ios-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt: * LayoutTests/platform/mac-wk2/fast/attachment/cocoa/wide-attachment-rendering-expected.txt: * Source/WebCore/rendering/RenderAttachment.cpp: (WebCore::RenderAttachment::baselinePosition const): Canonical link: https://commits.webkit.org/265894@main
ab36b2f
to
28021b9
Compare
Committed 265894@main (28021b9): https://commits.webkit.org/265894@main Reviewed commits have been landed. Closing PR #15680 and removing active labels. |
if (auto* baselineElementRenderBox = baselineElement->renderBox()) { | ||
// This is the bottom of the image assuming it is vertically centered. | ||
return (height() + baselineElementRenderBox->height()) / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does wide-attachment support vertical writing mode in general?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at this time, no.
28021b9
ab36b2f