Newly added float should trigger full layout on the block.
https://bugs.webkit.org/show_bug.cgi?id=187251
<rdar://problem/
41726137>
Reviewed by David Kilzer.
Source/WebCore:
RenderBlockFlow::determineStartPosition() is one of the places where we decide the extent of the line layout for the current block.
In here we try to figure out the first line in the block that requires layout. In certain cases when floats are present,
(due to their intrusive behavior) we just trigger a full layout on the entire block.
One of the special cases is when a new float is added to the block. determineStartPosition() checks for such floats (floats inserted
after the "last known float") and marks the block for full layout. However it missed the case when other, unrelated mutations happened
in addition to this newly inserted float. This patch fixes this case by checking if the floats after the "last know float" actually need layout.
Test: fast/inline/new-float-needs-layout-when-line-is-dirty.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::determineStartPosition):
LayoutTests:
* fast/inline/new-float-needs-layout-when-line-is-dirty-expected.txt: Added.
* fast/inline/new-float-needs-layout-when-line-is-dirty.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233767
268f45cc-cd09-0410-ab3c-
d52691b4dbfc