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

Unified Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 340323002: Don't force full invalidation on padding or margin change (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Based on https://codereview.chromium.org/350043003/ Created 6 years, 6 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: Source/core/rendering/style/RenderStyle.cpp
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index 43fedd29bc3bc2361fad3db8cb6022937664b6d5..3862be58f61ec13e57923a7ba47e39b18bb7ff28 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -423,12 +423,6 @@ bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const
// instead of forced full repaint.
if (surround.get() != other.surround.get()) {
Julien - ping for review 2014/06/29 01:20:32 There is only border checks in this branch so I wo
Xianzhu 2014/06/30 22:30:34 If 'surround' object is shared between the old sty
- if (surround->margin != other.surround->margin)
- return true;
-
- if (surround->padding != other.surround->padding)
- return true;
-
// If our border widths change, then we need to layout. Other changes to borders only necessitate a repaint.
if (borderLeftWidth() != other.borderLeftWidth()
|| borderTopWidth() != other.borderTopWidth()
@@ -616,6 +610,14 @@ bool RenderStyle::diffNeedsFullLayout(const RenderStyle& other) const
if (noninherited_flags._vertical_align != other.noninherited_flags._vertical_align)
return true;
+ if (surround.get() != other.surround.get()) {
Julien - ping for review 2014/06/29 01:20:32 Will this work correctly if we have a background-c
Xianzhu 2014/06/30 22:30:34 Yes. Border size change will still trigger a full
+ if (surround->margin != other.surround->margin)
+ return true;
+
+ if (surround->padding != other.surround->padding)
+ return true;
+ }
+
return false;
}

Powered by Google App Engine
This is Rietveld 408576698