summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/FloatingObjects.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/FloatingObjects.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/FloatingObjects.h')
-rw-r--r--Source/WebCore/rendering/FloatingObjects.h20
1 files changed, 8 insertions, 12 deletions
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<FloatingObject> create(RenderBox&);
std::unique_ptr<FloatingObject> copyToNewContainer(LayoutSize, bool shouldPaint = false, bool isDescendant = false) const;
- std::unique_ptr<FloatingObject> unsafeClone() const;
+ std::unique_ptr<FloatingObject> 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<FloatingObject>& a, const FloatingObject& b) { return &a->renderer() == &b.renderer(); }
};
-typedef ListHashSet<std::unique_ptr<FloatingObject>, 4, FloatingObjectHashFunctions> FloatingObjectSet;
+typedef ListHashSet<std::unique_ptr<FloatingObject>, FloatingObjectHashFunctions> FloatingObjectSet;
typedef PODInterval<LayoutUnit, FloatingObject*> FloatingObjectInterval;
typedef PODIntervalTree<LayoutUnit, FloatingObject*> FloatingObjectTree;
-typedef PODFreeListArena<PODRedBlackTree<FloatingObjectInterval>::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<FloatingObjectTree> m_placedFloatsTree;
unsigned m_leftObjectsCount;
unsigned m_rightObjectsCount;
bool m_horizontalWritingMode;
@@ -175,5 +173,3 @@ template<> struct ValueToString<FloatingObject*> {
#endif
} // namespace WebCore
-
-#endif // FloatingObjects_h