[webkit-changes] [WebKit/WebKit] ab79c5: [LFC][IFC] Fix css2.1/t0905-c414-flt-wrap-01-d-g.html
alan
noreply at github.com
Sun Sep 11 09:51:40 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ab79c5a1d9b9db4716e0f519e8c401151dbde0be
https://github.com/WebKit/WebKit/commit/ab79c5a1d9b9db4716e0f519e8c401151dbde0be
Author: Alan Bujtas <zalan at apple.com>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
Log Message:
-----------
[LFC][IFC] Fix css2.1/t0905-c414-flt-wrap-01-d-g.html
https://bugs.webkit.org/show_bug.cgi?id=245029
Reviewed by Antti Koivisto.
When the inline content starts with float boxes, let's place them as if there was no line yet. It's similar to as if the floats were coming from the parent BFC.
e.g.
<div style="width: 200px;>
<img style="float: left; width: 100px;">
<img style="float: left; width: 120px;">
XX
</div>
Both float boxes are placed first followed by the inline content.
It simply means that while the float boxes are vertically stacked (they don't fit the containing block horizontally), their margin boxes are adjoining.
------
| | \ / \ /
------ \/ \/
--------- /\ /\
| | / \ / \
---------
vs.
<div style="width: 200px;>
X
<img style="float: left; width: 100px;">
<img style="float: left; width: 120px;">
X
</div>
where "X" opens the line and while the first float box fits the line, the second one is placed _under_ the line.
------
| | \ / \ /
------ \/ \/
/\ /\
/ \ / \
---------
| |
---------
* Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::placeInlineContent):
Canonical link: https://commits.webkit.org/254362@main
More information about the webkit-changes
mailing list