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

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

Issue 265703012: Separate repaint and layout requirements of StyleDifference (Step 4) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/SVGRenderStyle.cpp
diff --git a/Source/core/rendering/style/SVGRenderStyle.cpp b/Source/core/rendering/style/SVGRenderStyle.cpp
index 0a66df6bcd47a60fcc836cc5b00bbdf6e417755e..2e0646ed5879b58d19e9df5d47daef960de821ca 100644
--- a/Source/core/rendering/style/SVGRenderStyle.cpp
+++ b/Source/core/rendering/style/SVGRenderStyle.cpp
@@ -122,15 +122,17 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
{
StyleDifference styleDifference;
- if (diffNeedsLayout(other))
+ if (diffNeedsLayoutAndRepaint(other)) {
styleDifference.setNeedsFullLayout();
- if (diffNeedsRepaint(other))
styleDifference.setNeedsRepaintObject();
Julien - ping for review 2014/05/07 00:24:32 We didn't do that before, why do we want to do thi
Xianzhu 2014/05/07 00:39:22 I'm a bit confused. Doesn't RenderObject::setStyle
Julien - ping for review 2014/05/08 21:03:49 They both do. However this is forcing the object t
Xianzhu 2014/05/08 21:52:55 The code in RenderObject.cpp is changed to the fol
+ } else if (diffNeedsRepaint(other)) {
+ styleDifference.setNeedsRepaintObject();
+ }
return styleDifference;
}
-bool SVGRenderStyle::diffNeedsLayout(const SVGRenderStyle* other) const
+bool SVGRenderStyle::diffNeedsLayoutAndRepaint(const SVGRenderStyle* other) const
{
// If resources change, we need a relayout, as the presence of resources influences the repaint rect.
if (resources != other->resources)
« Source/core/rendering/style/RenderStyle.cpp ('K') | « Source/core/rendering/style/SVGRenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698