[LFC][IFC] Layout floats as part of the inline content
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2018 14:42:06 +0000 (14:42 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Oct 2018 14:42:06 +0000 (14:42 +0000)
commita5422676e210b9062ceb9b59163076ad5669b018
tree338e41ceb4b4f737fa55328d01ab93205dddad59
parent932ac079490673b98877acd99d5ee31fcdf3d741
[LFC][IFC] Layout floats as part of the inline content
https://bugs.webkit.org/show_bug.cgi?id=190942

Reviewed by Antti Koivisto.

Source/WebCore:

Add float handling to InlineFormattingContext::layoutInlineContent.
Note that floats don't actually generate inline runs.

Test: fast/block/basic/inline-content-with-floating-image.html

* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
* layout/floats/FloatAvoider.cpp:
(WebCore::Layout::FloatAvoider::FloatAvoider): Check if any mapping is needed.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::isTrimmableContent):
(WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
(WebCore::Layout::trimLeadingRun): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:
(WebCore::Layout::InlineFormattingContext::Line::isClosed const):
* layout/inlineformatting/Line.cpp:
(WebCore::Layout::InlineFormattingContext::Line::init):
(WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft):
(WebCore::Layout::InlineFormattingContext::Line::adjustLogicalRight):
(WebCore::Layout::InlineFormattingContext::Line::appendContent):
(WebCore::Layout::InlineFormattingContext::Line::close):

Tools:

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

LayoutTests:

* fast/block/basic/inline-content-with-floating-image-expected.txt: Added.
* fast/block/basic/inline-content-with-floating-image.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/basic/inline-content-with-floating-image-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/basic/inline-content-with-floating-image.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Source/WebCore/layout/floats/FloatAvoider.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h
Source/WebCore/layout/inlineformatting/Line.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt