summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderCounter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderCounter.cpp')
-rw-r--r--WebCore/rendering/RenderCounter.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/WebCore/rendering/RenderCounter.cpp b/WebCore/rendering/RenderCounter.cpp
index 598f40d..fd6d80d 100644
--- a/WebCore/rendering/RenderCounter.cpp
+++ b/WebCore/rendering/RenderCounter.cpp
@@ -116,7 +116,7 @@ static bool planCounter(RenderObject* object, const AtomicString& counterName, b
isReset = false;
return true;
}
- if (Node* e = object->element()) {
+ if (Node* e = object->node()) {
if (e->hasTagName(olTag)) {
value = static_cast<HTMLOListElement*>(e)->start();
isReset = true;
@@ -251,13 +251,6 @@ PassRefPtr<StringImpl> RenderCounter::originalText() const
return text.impl();
}
-void RenderCounter::dirtyLineBoxes(bool fullLayout, bool dummy)
-{
- if (prefWidthsDirty())
- calcPrefWidths(0);
- RenderText::dirtyLineBoxes(fullLayout, dummy);
-}
-
void RenderCounter::calcPrefWidths(int lead)
{
setTextInternal(originalText());
@@ -278,7 +271,11 @@ static void destroyCounterNodeChildren(AtomicStringImpl* identifier, CounterNode
child->parent()->removeChild(child);
ASSERT(counterMaps().get(child->renderer())->get(identifier) == child);
counterMaps().get(child->renderer())->remove(identifier);
- child->renderer()->invalidateCounters();
+ if (!child->renderer()->documentBeingDestroyed()) {
+ RenderObjectChildList* children = child->renderer()->virtualChildren();
+ if (children)
+ children->invalidateCounters(child->renderer());
+ }
delete child;
}
}