Chromium Code Reviews| 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(); |
|
esprehn
2015/04/22 07:45:45
Why is this needed? All updateItemValues does is:
dsinclair
2015/04/22 20:00:39
This works fine for lists that aren't reversed. Th
|
| +} |
| + |
| } |