| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 25d3c276d7a174195d5c1fd7afa8a0c64db2cb6b..9595e53fa91b86cd2d280a3819290cef4f0f3b8f 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -143,10 +143,10 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
|
| if (oldStyle) {
|
| // The background of the root element or the body element could propagate up to
|
| // the canvas. Just dirty the entire canvas when our style changes substantially.
|
| - if (diff >= StyleDifferenceRepaint && node() &&
|
| - (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
|
| + if ((diff.needsRepaint() || diff.needsLayout()) && node()
|
| + && (isHTMLHtmlElement(*node()) || isHTMLBodyElement(*node()))) {
|
|
|
| - if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() || diff != StyleDifferenceLayout)
|
| + if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() || !diff.needsFullLayout())
|
| view()->repaint();
|
|
|
| if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFixedBackground())
|
| @@ -155,7 +155,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyl
|
|
|
| // When a layout hint happens and an object's position style changes, we have to do a layout
|
| // to dirty the render tree using the old position value now.
|
| - if (diff == StyleDifferenceLayout && parent() && oldStyle->position() != newStyle.position()) {
|
| + if (diff.needsFullLayout() && parent() && oldStyle->position() != newStyle.position()) {
|
| markContainingBlocksForLayout();
|
| if (oldStyle->position() == StaticPosition)
|
| repaint();
|
| @@ -211,7 +211,7 @@ void RenderBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle
|
| }
|
|
|
| // Our opaqueness might have changed without triggering layout.
|
| - if (diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintLayer) {
|
| + if (diff.needsRepaint()) {
|
| RenderObject* parentToInvalidate = parent();
|
| for (unsigned i = 0; i < backgroundObscurationTestMaxDepth && parentToInvalidate; ++i) {
|
| parentToInvalidate->invalidateBackgroundObscurationStatus();
|
|
|