From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/rendering/FloatingObjects.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'Source/WebCore/rendering/FloatingObjects.h') diff --git a/Source/WebCore/rendering/FloatingObjects.h b/Source/WebCore/rendering/FloatingObjects.h index 851923779..651d0ad07 100644 --- a/Source/WebCore/rendering/FloatingObjects.h +++ b/Source/WebCore/rendering/FloatingObjects.h @@ -21,8 +21,7 @@ * Boston, MA 02110-1301, USA. */ -#ifndef FloatingObjects_h -#define FloatingObjects_h +#pragma once #include "PODIntervalTree.h" #include "RootInlineBox.h" @@ -41,7 +40,7 @@ public: static std::unique_ptr create(RenderBox&); std::unique_ptr copyToNewContainer(LayoutSize, bool shouldPaint = false, bool isDescendant = false) const; - std::unique_ptr unsafeClone() const; + std::unique_ptr cloneForNewParent() const; explicit FloatingObject(RenderBox&); FloatingObject(RenderBox&, Type, const LayoutRect&, bool shouldPaint, bool isDescendant); @@ -67,8 +66,8 @@ public: const LayoutRect& frameRect() const { ASSERT(isPlaced()); return m_frameRect; } void setFrameRect(const LayoutRect& frameRect) { ASSERT(!isInPlacedTree()); m_frameRect = frameRect; } - int paginationStrut() const { return m_paginationStrut; } - void setPaginationStrut(int strut) { m_paginationStrut = strut; } + LayoutUnit paginationStrut() const { return m_paginationStrut; } + void setPaginationStrut(LayoutUnit strut) { m_paginationStrut = strut; } #ifndef NDEBUG bool isInPlacedTree() const { return m_isInPlacedTree; } @@ -88,7 +87,7 @@ private: RenderBox& m_renderer; RootInlineBox* m_originatingLine; LayoutRect m_frameRect; - int m_paginationStrut; // FIXME: This should be a LayoutUnit, since it's a vertical offset. + LayoutUnit m_paginationStrut; unsigned m_type : 2; // Type (left or right aligned) unsigned m_shouldPaint : 1; @@ -111,11 +110,10 @@ struct FloatingObjectHashTranslator { static bool equal(const std::unique_ptr& a, const FloatingObject& b) { return &a->renderer() == &b.renderer(); } }; -typedef ListHashSet, 4, FloatingObjectHashFunctions> FloatingObjectSet; +typedef ListHashSet, FloatingObjectHashFunctions> FloatingObjectSet; typedef PODInterval FloatingObjectInterval; typedef PODIntervalTree FloatingObjectTree; -typedef PODFreeListArena::Node> IntervalArena; // FIXME: This is really the same thing as FloatingObjectSet. // Change clients to use that set directly, and replace the moveAllToFloatInfoMap function with a takeSet function. @@ -151,13 +149,13 @@ public: private: void computePlacedFloatsTree(); - const FloatingObjectTree& placedFloatsTree(); + const FloatingObjectTree* placedFloatsTree(); void increaseObjectsCount(FloatingObject::Type); void decreaseObjectsCount(FloatingObject::Type); FloatingObjectInterval intervalForFloatingObject(FloatingObject*); FloatingObjectSet m_set; - FloatingObjectTree m_placedFloatsTree; + std::unique_ptr m_placedFloatsTree; unsigned m_leftObjectsCount; unsigned m_rightObjectsCount; bool m_horizontalWritingMode; @@ -175,5 +173,3 @@ template<> struct ValueToString { #endif } // namespace WebCore - -#endif // FloatingObjects_h -- cgit v1.2.1