summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderCounter.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/rendering/RenderCounter.cpp
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/rendering/RenderCounter.cpp')
-rw-r--r--WebCore/rendering/RenderCounter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/WebCore/rendering/RenderCounter.cpp b/WebCore/rendering/RenderCounter.cpp
index 1882b12..4b6deed 100644
--- a/WebCore/rendering/RenderCounter.cpp
+++ b/WebCore/rendering/RenderCounter.cpp
@@ -219,7 +219,7 @@ const char* RenderCounter::renderName() const
return "RenderCounter";
}
-bool RenderCounter::isRenderCounter() const
+bool RenderCounter::isCounter() const
{
return true;
}
@@ -263,6 +263,12 @@ void RenderCounter::calcPrefWidths(int lead)
RenderText::calcPrefWidths(lead);
}
+void RenderCounter::invalidate()
+{
+ m_counterNode = 0;
+ setNeedsLayoutAndPrefWidthsRecalc();
+}
+
static void destroyCounterNodeChildren(AtomicStringImpl* identifier, CounterNode* node)
{
CounterNode* previous;
@@ -271,6 +277,7 @@ 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();
delete child;
}
}