Chromium Code Reviews

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 187813004: Use outlineBox if we have an outline or shadow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index fad82562adb24917ac6240b8338ad0156fabbec1..34929b7d2e1b94874c1e1da8399f2f90461a9724 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -1514,7 +1514,10 @@ bool RenderObject::repaintAfterLayoutIfNeeded(const RenderLayerModelObject* repa
// This ASSERT fails due to animations. See https://bugs.webkit.org/show_bug.cgi?id=37048
// ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBoundsForRepaint(repaintContainer));
newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBoundsForRepaint(repaintContainer);
- if (newOutlineBox.location() != oldOutlineBox.location() || (mustRepaintBackgroundOrBorder() && (newBounds != oldBounds || newOutlineBox != oldOutlineBox)))
+
+ bool hasOutlineBox = hasOutline() || (style()->boxShadow() && style()->boxShadow()->shadows().size() > 0);
+ if ((hasOutlineBox && newOutlineBox.location() != oldOutlineBox.location())
+ || (mustRepaintBackgroundOrBorder() && (newBounds != oldBounds || (hasOutlineBox && newOutlineBox != oldOutlineBox))))
eseidel 2014/03/05 22:09:41 You already check hasOutlineBox and location != lo
dsinclair 2014/03/05 22:15:06 If the location's are equal that doesn't mean that
fullRepaint = true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine