Chromium Code Reviews| Index: Source/core/rendering/RenderListMarker.cpp |
| diff --git a/Source/core/rendering/RenderListMarker.cpp b/Source/core/rendering/RenderListMarker.cpp |
| index d30e6443e0b2c5e6865c63f3facffa333f286e2c..6b156ffa622fc2928d5ac4f33dfedd97e6cae25c 100644 |
| --- a/Source/core/rendering/RenderListMarker.cpp |
| +++ b/Source/core/rendering/RenderListMarker.cpp |
| @@ -1633,4 +1633,19 @@ LayoutRect RenderListMarker::selectionRectForPaintInvalidation(const RenderLayer |
| return rect; |
| } |
| +void RenderListMarker::listItemStyleDidChange() |
| +{ |
| + RefPtr<RenderStyle> newStyle = RenderStyle::create(); |
| + // The marker always inherits from the list item, regardless of where it might end |
| + // up (e.g., in some deeply nested line box). See CSS3 spec. |
| + newStyle->inheritFrom(m_listItem->style()); |
| + if (style()) { |
| + // Reuse the current margins otherwise resetting the margins to initial values |
|
mstensho (USE GERRIT)
2014/10/14 19:51:39
Could you add something in front of "otherwise"? E
Xianzhu
2014/10/14 20:38:42
Done.
|
| + // would trigger unnecessary layout. |
| + newStyle->setMarginStart(style()->marginStart()); |
| + newStyle->setMarginEnd(style()->marginRight()); |
| + } |
| + setStyle(newStyle.release()); |
| +} |
| + |
| } // namespace blink |