| Index: Source/core/rendering/RenderListMarker.cpp
|
| diff --git a/Source/core/rendering/RenderListMarker.cpp b/Source/core/rendering/RenderListMarker.cpp
|
| index d30e6443e0b2c5e6865c63f3facffa333f286e2c..5fff3b3eadd3a1ea32e9421064e2ddfe65a048b8 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
|
| + // would trigger unnecessary layout.
|
| + newStyle->setMarginStart(style()->marginStart());
|
| + newStyle->setMarginEnd(style()->marginRight());
|
| + }
|
| + setStyle(newStyle.release());
|
| +}
|
| +
|
| } // namespace blink
|
|
|