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

Unified Diff: Source/core/html/HTMLOListElement.cpp

Issue 778003003: List marker pseudo elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « Source/core/html/HTMLOListElement.h ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOListElement.cpp
diff --git a/Source/core/html/HTMLOListElement.cpp b/Source/core/html/HTMLOListElement.cpp
index 4da5176a545b3d09689ce83c8e5da11c6da56275..4698aef14c8851fb1a147802ca15ec8f5d047a55 100644
--- a/Source/core/html/HTMLOListElement.cpp
+++ b/Source/core/html/HTMLOListElement.cpp
@@ -108,4 +108,21 @@ void HTMLOListElement::recalculateItemCount()
m_shouldRecalculateItemCount = false;
}
+void HTMLOListElement::attach(const AttachContext& context)
+{
+ HTMLElement::attach(context);
+
+ if (!RuntimeEnabledFeatures::listMarkerPseudoElementEnabled())
+ return;
+
+ if (!m_isReversed)
+ return;
+
+ // If we're looking at a reversed ordered list we have to recalculate
+ // all of the marker values after everything is inserted. This is because
+ // we built the tree top to bottom, but that means the list item with the
+ // highest value will end up with 1 and we count down from there.
+ updateItemValues();
+}
+
}
« no previous file with comments | « Source/core/html/HTMLOListElement.h ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698