Title: [251484] trunk/Source/WebCore
- Revision
- 251484
- Author
- an...@apple.com
- Date
- 2019-10-23 11:49:37 -0700 (Wed, 23 Oct 2019)
Log Message
[LFC] LayoutState should have out-of-line destructor
https://bugs.webkit.org/show_bug.cgi?id=203307
Reviewed by Zalan Bujtas.
Otherwise instantiating it requires a pile of other headers.
* layout/LayoutState.cpp:
* layout/LayoutState.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutTree):
Use makeUnique.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (251483 => 251484)
--- trunk/Source/WebCore/ChangeLog 2019-10-23 18:45:37 UTC (rev 251483)
+++ trunk/Source/WebCore/ChangeLog 2019-10-23 18:49:37 UTC (rev 251484)
@@ -1,3 +1,19 @@
+2019-10-23 Antti Koivisto <an...@apple.com>
+
+ [LFC] LayoutState should have out-of-line destructor
+ https://bugs.webkit.org/show_bug.cgi?id=203307
+
+ Reviewed by Zalan Bujtas.
+
+ Otherwise instantiating it requires a pile of other headers.
+
+ * layout/LayoutState.cpp:
+ * layout/LayoutState.h:
+ * layout/layouttree/LayoutTreeBuilder.cpp:
+ (WebCore::Layout::TreeBuilder::createLayoutTree):
+
+ Use makeUnique.
+
2019-10-23 youenn fablet <you...@apple.com>
Remove NavigatorBase::serviceWorkerIfExists
Modified: trunk/Source/WebCore/layout/LayoutState.cpp (251483 => 251484)
--- trunk/Source/WebCore/layout/LayoutState.cpp 2019-10-23 18:45:37 UTC (rev 251483)
+++ trunk/Source/WebCore/layout/LayoutState.cpp 2019-10-23 18:49:37 UTC (rev 251484)
@@ -45,6 +45,8 @@
ASSERT(root.establishesFormattingContext());
}
+LayoutState::~LayoutState() = default;
+
Display::Box& LayoutState::displayBoxForLayoutBox(const Box& layoutBox)
{
return *m_layoutToDisplayBox.ensure(&layoutBox, [] {
Modified: trunk/Source/WebCore/layout/LayoutState.h (251483 => 251484)
--- trunk/Source/WebCore/layout/LayoutState.h 2019-10-23 18:45:37 UTC (rev 251483)
+++ trunk/Source/WebCore/layout/LayoutState.h 2019-10-23 18:49:37 UTC (rev 251484)
@@ -49,6 +49,7 @@
WTF_MAKE_ISO_ALLOCATED(LayoutState);
public:
LayoutState(const Container& root);
+ ~LayoutState();
FormattingState& createFormattingStateForFormattingRootIfNeeded(const Container& formattingContextRoot);
FormattingState& establishedFormattingState(const Container& formattingRoot) const;
Modified: trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp (251483 => 251484)
--- trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2019-10-23 18:45:37 UTC (rev 251483)
+++ trunk/Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp 2019-10-23 18:49:37 UTC (rev 251484)
@@ -81,7 +81,7 @@
style.setLogicalWidth(Length(renderView.width(), Fixed));
style.setLogicalHeight(Length(renderView.height(), Fixed));
- std::unique_ptr<Container> initialContainingBlock(new Container(WTF::nullopt, WTFMove(style)));
+ auto initialContainingBlock = makeUnique<Container>(WTF::nullopt, WTFMove(style));
TreeBuilder::createSubTree(renderView, *initialContainingBlock);
return initialContainingBlock;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes