Index: Source/WebCore/rendering/RenderObject.h |
=================================================================== |
--- Source/WebCore/rendering/RenderObject.h (revision 116144) |
+++ Source/WebCore/rendering/RenderObject.h (working copy) |
@@ -37,6 +37,7 @@ |
#include "RenderStyle.h" |
#include "TextAffinity.h" |
#include "TransformationMatrix.h" |
+#include <wtf/HashSet.h> |
#include <wtf/UnusedParam.h> |
#if USE(CG) || USE(CAIRO) || USE(SKIA) || PLATFORM(QT) |
@@ -117,6 +118,8 @@ |
}; |
#endif |
+typedef WTF::HashSet<const RenderObject*> RenderObjectAncestorLineboxDirtySet; |
+ |
#ifndef NDEBUG |
const int showTreeCharacterOffset = 39; |
#endif |
@@ -369,6 +372,22 @@ |
bool hasColumns() const { return m_bitfields.hasColumns(); } |
void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } |
+ bool ancestorLineBoxDirty() const { return s_ancestorLineboxDirtySet && s_ancestorLineboxDirtySet->contains(this); } |
+ void setAncestorLineBoxDirty(bool b = true) |
+ { |
+ if (b) { |
+ if (!s_ancestorLineboxDirtySet) |
+ s_ancestorLineboxDirtySet = new RenderObjectAncestorLineboxDirtySet; |
+ s_ancestorLineboxDirtySet->add(this); |
+ } else if (s_ancestorLineboxDirtySet) { |
+ s_ancestorLineboxDirtySet->remove(this); |
+ if (s_ancestorLineboxDirtySet->isEmpty()) { |
+ delete s_ancestorLineboxDirtySet; |
+ s_ancestorLineboxDirtySet = 0; |
+ } |
+ } |
+ } |
+ |
bool inRenderFlowThread() const { return m_bitfields.inRenderFlowThread(); } |
void setInRenderFlowThread(bool b = true) { m_bitfields.setInRenderFlowThread(b); } |
@@ -890,6 +909,8 @@ |
RenderObject* m_previous; |
RenderObject* m_next; |
+ static RenderObjectAncestorLineboxDirtySet* s_ancestorLineboxDirtySet; |
+ |
#ifndef NDEBUG |
bool m_hasAXObject : 1; |
bool m_setNeedsLayoutForbidden : 1; |
@@ -1050,6 +1071,7 @@ |
setNeedsSimplifiedNormalFlowLayout(false); |
setNormalChildNeedsLayout(false); |
setNeedsPositionedMovementLayout(false); |
+ setAncestorLineBoxDirty(false); |
} |
} |