[LFC] FormattingContext class should take FormattingState&
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 13:50:05 +0000 (13:50 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 13:50:05 +0000 (13:50 +0000)
commit9b71a976ea32cc70e93f8fbbd94dc1bf82f06adb
tree377e38115ab24abce745626f47ce07e6a228fbe8
parent39988885cf0f4e59f1cd810a06c8e6729d1c1b9d
[LFC] FormattingContext class should take FormattingState&
https://bugs.webkit.org/show_bug.cgi?id=191099

Reviewed by Antti Koivisto.

This is in preparation for not passing LayoutState& into every layout functions.
FormattingContext has FormattingState now and LayoutState can be acquired through FormattingState.
LayoutState <- FormattingState <- FormattingContext

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::FormattingContext):
(WebCore::Layout::FormattingContext::formattingState const):
(WebCore::Layout::FormattingContext::layoutState const):
* layout/FormattingContext.h:
* layout/FormattingState.cpp:
(WebCore::Layout::FormattingState::FormattingState):
* layout/FormattingState.h:
(WebCore::Layout::FormattingState::layoutState const):
* layout/LayoutFormattingState.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingState.cpp:
(WebCore::Layout::BlockFormattingState::BlockFormattingState):
(WebCore::Layout::BlockFormattingState::formattingContext):
(WebCore::Layout::BlockFormattingState::formattingContext const): Deleted.
* layout/blockformatting/BlockFormattingState.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingState.cpp:
(WebCore::Layout::InlineFormattingState::InlineFormattingState):
(WebCore::Layout::InlineFormattingState::formattingContext):
(WebCore::Layout::InlineFormattingState::formattingContext const): Deleted.
* layout/inlineformatting/InlineFormattingState.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContext.cpp
Source/WebCore/layout/FormattingContext.h
Source/WebCore/layout/FormattingState.cpp
Source/WebCore/layout/FormattingState.h
Source/WebCore/layout/LayoutFormattingState.h
Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp
Source/WebCore/layout/blockformatting/BlockFormattingContext.h
Source/WebCore/layout/blockformatting/BlockFormattingState.cpp
Source/WebCore/layout/blockformatting/BlockFormattingState.h
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h
Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingState.h