Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2669003002: Optimize outline paint invalidation (Closed)
Patch Set: - Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d06a1caa1e8eeb00b209db861ca386bb3eadde08..4ecf13410cd9506f80d8d1ce809a7c280d577bed 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1851,6 +1851,13 @@ void LayoutObject::setScrollAnchorDisablingStyleChangedOnAncestor() {
void LayoutObject::styleDidChange(StyleDifference diff,
const ComputedStyle* oldStyle) {
+ // First assume the outline will be affected. It may be updated when we know
+ // it's not affected.
+ bool hasOutline = m_style->hasOutline();
+ setOutlineMayBeAffectedByDescendants(hasOutline);
+ if (!hasOutline)
+ setPreviousOutlineMayBeAffectedByDescendants(false);
+
if (s_affectsParentBlock)
handleDynamicFloatPositionChange(this);

Powered by Google App Engine
This is Rietveld 408576698