| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index ddee2df92be60fbc5fc8bbdf42b2c34de427e6f0..61ceb92aba054197167f2a807c902e5e528aaeb6 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -1743,8 +1743,15 @@ StyleRecalcChange Element::recalcOwnStyle(StyleRecalcChange change)
|
| if (change > Inherit || localChange > Inherit)
|
| return max(localChange, change);
|
|
|
| - if (localChange < Inherit && (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle()))
|
| - return UpdatePseudoElements;
|
| + if (localChange < Inherit) {
|
| + if (oldStyle->hasChildDependentFlags()) {
|
| + if (childNeedsStyleRecalc())
|
| + return Inherit;
|
| + newStyle->copyChildDependentFlagsFrom(*oldStyle);
|
| + }
|
| + if (oldStyle->hasPseudoElementStyle() || newStyle->hasPseudoElementStyle())
|
| + return UpdatePseudoElements;
|
| + }
|
|
|
| return localChange;
|
| }
|
|
|