[LFC][IFC] Compute estimated margin top for inline formatting root's ancestors
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Oct 2018 14:53:14 +0000 (14:53 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Oct 2018 14:53:14 +0000 (14:53 +0000)
commit057b6bc10ab0cfcd8bc192c32612f48d4f8ec33a
treee658e40be8d5d302514cce977bae54088704ecb7
parent039f442ccaf37c1e2d6e3c8bf7dd57dc829f91bd
[LFC][IFC] Compute estimated margin top for inline formatting root's ancestors
https://bugs.webkit.org/show_bug.cgi?id=191018

Reviewed by Antti Koivisto.

Source/WebCore:

<div><img style="float: left"></div>
This inline formatting context (root -> div) inherits the floating context from the parent block formatting context.
Floats are added to the floating context relative to the floating context's root. In order to position this float properly we
need to precompute the ancestor's margin top (stop at the block formatting root boundary).

Test: fast/inline/simple-intruding-floats3.html

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):

Tools:

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

LayoutTests:

* fast/inline/simple-intruding-floats3-expected.txt: Added.
* fast/inline/simple-intruding-floats3.html: Added.
* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/inline/simple-intruding-floats3-expected.txt [new file with mode: 0644]
LayoutTests/fast/inline/simple-intruding-floats3.html [new file with mode: 0644]
LayoutTests/platform/ios/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt