[webkit-changes] [WebKit/WebKit] 52561b: [LFC][IFC] InlineFormattingGeometry::floatConstrai...
alan
noreply at github.com
Tue Sep 13 06:44:47 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 52561bcb85e3706cc6152d13c4d6cb697ee10242
https://github.com/WebKit/WebKit/commit/52561bcb85e3706cc6152d13c4d6cb697ee10242
Author: Alan Bujtas <zalan at apple.com>
Date: 2022-09-13 (Tue, 13 Sep 2022)
Changed paths:
M Source/WebCore/layout/floats/FloatingContext.h
M Source/WebCore/layout/floats/FloatingState.h
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
Log Message:
-----------
[LFC][IFC] InlineFormattingGeometry::floatConstraintsForLine should not always flip for right-to-left direction
https://bugs.webkit.org/show_bug.cgi?id=245109
Reviewed by Antti Koivisto.
Floating state currently can only hold floats with the same inline direction.
The coordinate flip in floatConstraintsForLine is only required when the float box lives in a different inline direction.
e.g.
<div style="direction: rtl">
<div style="float: inline-start"></div>
<div style="direction: ltr>left-to-right content with an intrusive float from right-to-left parent BFC</div>
</div>
while this does not need one:
<div style="direction: rtl">
<div style="float: inline-start"></div>
<div>matching right-to-left content and float</div>
</div>
* Source/WebCore/layout/floats/FloatingContext.h:
(WebCore::Layout::FloatingContext::isLeftToRightDirection const):
* Source/WebCore/layout/floats/FloatingState.h:
(WebCore::Layout::FloatingState::isLeftToRightDirection const):
(WebCore::Layout::FloatingState::setIsLeftToRightDirection):
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::floatConstraintsForLine const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::tryPlacingFloatBox):
Canonical link: https://commits.webkit.org/254435@main
More information about the webkit-changes
mailing list