Title: [282326] trunk/Source/WebCore
- Revision
- 282326
- Author
- [email protected]
- Date
- 2021-09-13 08:17:24 -0700 (Mon, 13 Sep 2021)
Log Message
[LFC] Remove redundant LayoutState::ensureFormattingState
https://bugs.webkit.org/show_bug.cgi?id=229259
Reviewed by Antti Koivisto.
* layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::ensureInlineFormattingState): No need to call ensure*. There has to be a parent formatting state at this point.
(WebCore::Layout::LayoutState::ensureFormattingState): Deleted.
* layout/LayoutState.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (282325 => 282326)
--- trunk/Source/WebCore/ChangeLog 2021-09-13 14:40:01 UTC (rev 282325)
+++ trunk/Source/WebCore/ChangeLog 2021-09-13 15:17:24 UTC (rev 282326)
@@ -1,3 +1,15 @@
+2021-09-13 Alan Bujtas <[email protected]>
+
+ [LFC] Remove redundant LayoutState::ensureFormattingState
+ https://bugs.webkit.org/show_bug.cgi?id=229259
+
+ Reviewed by Antti Koivisto.
+
+ * layout/LayoutState.cpp:
+ (WebCore::Layout::LayoutState::ensureInlineFormattingState): No need to call ensure*. There has to be a parent formatting state at this point.
+ (WebCore::Layout::LayoutState::ensureFormattingState): Deleted.
+ * layout/LayoutState.h:
+
2021-09-13 Diego Pino Garcia <[email protected]>
Unreviewed build fix for Ubuntu LTS/Debian r282270
Modified: trunk/Source/WebCore/layout/LayoutState.cpp (282325 => 282326)
--- trunk/Source/WebCore/layout/LayoutState.cpp 2021-09-13 14:40:01 UTC (rev 282325)
+++ trunk/Source/WebCore/layout/LayoutState.cpp 2021-09-13 15:17:24 UTC (rev 282326)
@@ -149,23 +149,6 @@
return *m_flexFormattingStates.get(&formattingContextRoot);
}
-FormattingState& LayoutState::ensureFormattingState(const ContainerBox& formattingContextRoot)
-{
- if (formattingContextRoot.establishesInlineFormattingContext())
- return ensureInlineFormattingState(formattingContextRoot);
-
- if (formattingContextRoot.establishesBlockFormattingContext())
- return ensureBlockFormattingState(formattingContextRoot);
-
- if (formattingContextRoot.establishesTableFormattingContext())
- return ensureTableFormattingState(formattingContextRoot);
-
- if (formattingContextRoot.establishesFlexFormattingContext())
- return ensureFlexFormattingState(formattingContextRoot);
-
- CRASH();
-}
-
InlineFormattingState& LayoutState::ensureInlineFormattingState(const ContainerBox& formattingContextRoot)
{
ASSERT(formattingContextRoot.establishesInlineFormattingContext());
@@ -179,7 +162,7 @@
// Otherwise, the formatting context inherits the floats from the parent formatting context.
// Find the formatting state in which this formatting root lives, not the one it creates and use its floating state.
- auto& parentFormattingState = ensureFormattingState(formattingContextRoot.formattingContextRoot());
+ auto& parentFormattingState = establishedBlockFormattingState(formattingContextRoot.formattingContextRoot());
auto& parentFloatingState = parentFormattingState.floatingState();
return makeUnique<InlineFormattingState>(parentFloatingState, *this);
};
Modified: trunk/Source/WebCore/layout/LayoutState.h (282325 => 282326)
--- trunk/Source/WebCore/layout/LayoutState.h 2021-09-13 14:40:01 UTC (rev 282325)
+++ trunk/Source/WebCore/layout/LayoutState.h 2021-09-13 15:17:24 UTC (rev 282326)
@@ -52,7 +52,6 @@
LayoutState(const Document&, const ContainerBox& rootContainer);
~LayoutState();
- FormattingState& ensureFormattingState(const ContainerBox& formattingContextRoot);
InlineFormattingState& ensureInlineFormattingState(const ContainerBox& formattingContextRoot);
BlockFormattingState& ensureBlockFormattingState(const ContainerBox& formattingContextRoot);
TableFormattingState& ensureTableFormattingState(const ContainerBox& formattingContextRoot);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes