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

Unified Diff: Source/core/layout/LayoutCounter.cpp

Issue 1185573004: CSS Counters not properly updated on style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating as per review comments Created 5 years, 6 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
« no previous file with comments | « LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutCounter.cpp
diff --git a/Source/core/layout/LayoutCounter.cpp b/Source/core/layout/LayoutCounter.cpp
index 8ea4aa7e587c3e3a6d33d7fa6d934599b136f193..945101c3cf383e0ce05654aa41639239fb1cbfda 100644
--- a/Source/core/layout/LayoutCounter.cpp
+++ b/Source/core/layout/LayoutCounter.cpp
@@ -569,6 +569,8 @@ void LayoutCounter::layoutObjectStyleChanged(LayoutObject& layoutObject, const C
LayoutCounter::destroyCounterNodes(layoutObject);
}
} else if (newCounterDirectives) {
+ if (layoutObject.hasCounterNodeMap())
+ LayoutCounter::destroyCounterNodes(layoutObject);
CounterDirectiveMap::const_iterator newMapEnd = newCounterDirectives->end();
for (CounterDirectiveMap::const_iterator it = newCounterDirectives->begin(); it != newMapEnd; ++it) {
// We must create this node here, because the added node may be a node with no display such as
« no previous file with comments | « LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698