Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: Source/WebCore/rendering/RenderBlock.h

Issue 10882045: Merge 125351 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/rendering/RenderBlock.h
===================================================================
--- Source/WebCore/rendering/RenderBlock.h (revision 126659)
+++ Source/WebCore/rendering/RenderBlock.h (working copy)
@@ -54,6 +54,9 @@
template <class Iterator> struct MidpointState;
typedef BidiResolver<InlineIterator, BidiRun> InlineBidiResolver;
typedef MidpointState<InlineIterator> LineMidpointState;
+typedef WTF::ListHashSet<RenderBox*> TrackedRendererListHashSet;
+typedef WTF::HashMap<const RenderBlock*, TrackedRendererListHashSet*> TrackedDescendantsMap;
+typedef WTF::HashMap<const RenderBox*, HashSet<RenderBlock*>*> TrackedContainerMap;
enum CaretType { CursorCaret, DragCaret };
@@ -99,16 +102,19 @@
virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0);
void insertPositionedObject(RenderBox*);
- void removePositionedObject(RenderBox*);
+ static void removePositionedObject(RenderBox*);
void removePositionedObjects(RenderBlock*);
- typedef ListHashSet<RenderBox*, 4> PositionedObjectsListHashSet;
- PositionedObjectsListHashSet* positionedObjects() const { return m_positionedObjects.get(); }
- bool hasPositionedObjects() const { return m_positionedObjects && !m_positionedObjects->isEmpty(); }
+ TrackedRendererListHashSet* positionedObjects() const;
+ bool hasPositionedObjects() const
+ {
+ TrackedRendererListHashSet* objects = positionedObjects();
+ return objects && !objects->isEmpty();
+ }
void addPercentHeightDescendant(RenderBox*);
static void removePercentHeightDescendant(RenderBox*);
- HashSet<RenderBox*>* percentHeightDescendants() const;
+ TrackedRendererListHashSet* percentHeightDescendants() const;
static bool hasPercentHeightContainerMap();
static bool hasPercentHeightDescendant(RenderBox*);
static void clearPercentHeightDescendantsFrom(RenderBox*);
@@ -510,6 +516,9 @@
void layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);
BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*);
+ void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendantsMap*&, TrackedContainerMap*&);
+ static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDescendantsMap*&, TrackedContainerMap*&);
+
virtual void borderFitAdjust(LayoutRect&) const; // Shrink the box in which the border paints if border-fit is set.
virtual void updateBeforeAfterContent(PseudoId);
@@ -1068,9 +1077,6 @@
const RenderBlock* m_renderer;
};
OwnPtr<FloatingObjects> m_floatingObjects;
-
- typedef PositionedObjectsListHashSet::const_iterator Iterator;
- OwnPtr<PositionedObjectsListHashSet> m_positionedObjects;
// Allocated only when some of these fields have non-default values
struct RenderBlockRareData {

Powered by Google App Engine
This is Rietveld 408576698