[LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2018 16:11:24 +0000 (16:11 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2018 16:11:24 +0000 (16:11 +0000)
commit8294da9d3a0991b99323e229aeac31fcbf4a6137
tree758663d6cdd5353ec96e7faf8a8e611eebaa3ac5
parent7ee92e0dc63e7b709cf0097060e05c5610617fdc
[LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
https://bugs.webkit.org/show_bug.cgi?id=191801

Reviewed by Antti Koivisto.

Source/WebCore:

before<span style="position: relative">positioned</span>after
In the example above the <positioned> inline box has both the BreakAtStart and the BreakAtEnd rules.
While walking through the inline tree, we add BreakAtStart first and when we figure it's the last child too,
we add BreakAtEnd as well. BreakAtEnd should not clear the BreakAtStart rule.

Test: fast/inline/simple-inline-with-out-of-flow-descendant2.html

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
* layout/inlineformatting/InlineFormattingState.cpp:
(WebCore::Layout::InlineFormattingState::addDetachingRule):
* layout/inlineformatting/InlineFormattingState.h:
(WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted.

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt: Added.
* fast/inline/simple-inline-with-out-of-flow-descendant2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2-expected.txt [new file with mode: 0644]
LayoutTests/fast/inline/simple-inline-with-out-of-flow-descendant2.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingState.h
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt