Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index b8823828a5cfdcaad8b691188080c8771f07d703..92d0bd70c935e2b98cc76bfd53922962c3be6be9 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -2122,24 +2122,21 @@ void LayoutObject::styleDidChange(StyleDifference diff, const ComputedStyle* old |
| } |
| } |
| -void LayoutObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly) |
| +void LayoutObject::propagateStyleToAnonymousChildren() |
| { |
| // FIXME: We could save this call when the change only affected non-inherited properties. |
| for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibling()) { |
| if (!child->isAnonymous() || child->style()->styleType() != PseudoIdNone) |
| continue; |
| - if (blockChildrenOnly && !child->isLayoutBlock()) |
| - continue; |
| - |
| - if (child->isLayoutFullScreen() || child->isLayoutFullScreenPlaceholder()) |
| + if (child->anonymousHasStylePropagationOverride()) |
|
mstensho (USE GERRIT)
2016/05/20 16:39:09
Does anyone have a fancier name than this? :)
eae
2016/05/20 17:02:04
While it doesn't exactly roll of the tongue it get
|
| continue; |
| RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisplay(styleRef(), child->style()->display()); |
| // Preserve the position style of anonymous block continuations as they can have relative position when |
| // they contain block descendants of relative positioned inlines. |
| - if (child->isInFlowPositioned() && toLayoutBlock(child)->isAnonymousBlockContinuation()) |
| + if (child->isInFlowPositioned() && child->isLayoutBlock() && toLayoutBlock(child)->isAnonymousBlockContinuation()) |
|
mstensho (USE GERRIT)
2016/05/20 16:39:09
It only seems right to type-check here. Now more t
eae
2016/05/20 17:02:04
Acknowledged.
|
| newStyle->setPosition(child->style()->position()); |
| updateAnonymousChildStyle(*child, *newStyle); |