[LFC][Inline formatting context] Add basic text content handling.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2018 17:05:16 +0000 (17:05 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jul 2018 17:05:16 +0000 (17:05 +0000)
commit2b836f337c1feeb76ee30a13e9e0d2c91c41226f
tree22865836ac51d447ef12453cac781bb25b12b61b
parent75d816e5a103920efefada88f8b805148dbe6899
[LFC][Inline formatting context] Add basic text content handling.
https://bugs.webkit.org/show_bug.cgi?id=187860

Reviewed by Antti Koivisto.

InlineFormattingContext::layout() walks through the formatting root's descendant list in a post-order fashion and
feeds the TextContentProvider.
Eventually this would turn into a more generic loop where we stop and process the text content when finding a non-text content box (float, inline-box etc), but right now
this is about text content only.

* layout/displaytree/DisplayBox.h:
(WebCore::Display::Box::contentBoxBottom const):
(WebCore::Display::Box::contentBoxRight const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout const):
* layout/inlineformatting/textlayout/TextContentProvider.cpp:
(WebCore::Layout::TextContentProvider::textRuns): Add a helper function to support the case when all we need is just the run list in one go.
* layout/inlineformatting/textlayout/TextContentProvider.h:
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isDescendantOf const):
* layout/layouttree/LayoutBox.h:
* layout/layouttree/LayoutInlineBox.h:
(WebCore::Layout::InlineBox::textContent const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/displaytree/DisplayBox.h
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/textlayout/TextContentProvider.cpp
Source/WebCore/layout/inlineformatting/textlayout/TextContentProvider.h
Source/WebCore/layout/layouttree/LayoutBox.cpp
Source/WebCore/layout/layouttree/LayoutBox.h
Source/WebCore/layout/layouttree/LayoutInlineBox.h