Description[LayoutNG] Add box fragments to line boxes when needed
This patch creates box fragments to line boxes when needed.
This patch creates box fragments when an inline box has background or
box decorations such as border or box shadow. When box fragments are
needed is to be determined with the paint code.
The previous CL[1] placed InlineFlowBox to contain all children. CSS
leaves positioning of inline boxes undefined, but testing indicates that
implementations don't do so, while they are quite interoperable. This
patch places box fragments to be interoperable with existing
implementations.
NGInlineNode::CopyFragmentDataToLayoutBox needed an overhaul to place
InlineFlowBox by using the geometry of box fragments.
This patch also adds a few minor additions:
* Add NGFragment::Offset().
* Add NGFragmentBuilder constructor from LayoutObject.
* Add NGLayoutResult::MutablePhysicalFragment() to allow move semantics.
* Add NGLineBoxFragmentBuilder::WritingMode().
There are some minor two-way dependencies to inline
margin/border/padding patch[2]. This will be cleaned up when it landed.
[1] https://codereview.chromium.org/2887623002
[2] https://codereview.chromium.org/2865903002
BUG=636993
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Review-Url: https://codereview.chromium.org/2898413002
Cr-Commit-Position: refs/heads/master@{#475262}
Committed: https://chromium.googlesource.com/chromium/src/+/484bedec5922468b681054f150c28504bdd144e1
Patch Set 1 #Patch Set 2 : WIP #Patch Set 3 : WIP #Patch Set 4 : WIP, build fix #Patch Set 5 : Cleanup and comments #Patch Set 6 : WIP #Patch Set 7 : WIP #Patch Set 8 : WIP #Patch Set 9 : Fix crash and atomic inlines #Patch Set 10 : Fix bidi #Patch Set 11 : Fixes and cleanup #
Total comments: 6
Patch Set 12 : eae review #Patch Set 13 : x64 build fix #Messages
Total messages: 41 (33 generated)
|