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

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

Issue 247713003: Separate repaint and layout requirements of StyleDifference (Step 3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments; Rebase on RAL 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
« no previous file with comments | « Source/core/rendering/style/SVGRenderStyle.h ('k') | Source/core/rendering/style/StyleDifference.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/SVGRenderStyle.cpp
diff --git a/Source/core/rendering/style/SVGRenderStyle.cpp b/Source/core/rendering/style/SVGRenderStyle.cpp
index f7f75f060ff8d60c64c0f317aa3338980016ca20..27be6fc10ac4aa7af3ed3018ff92635ca78945fe 100644
--- a/Source/core/rendering/style/SVGRenderStyle.cpp
+++ b/Source/core/rendering/style/SVGRenderStyle.cpp
@@ -124,7 +124,7 @@ StyleDifference SVGRenderStyle::diff(const SVGRenderStyle* other) const
if (diffNeedsLayout(other))
styleDifference.setNeedsFullLayout();
- else if (diffNeedsRepaintOnly(other))
+ if (diffNeedsRepaint(other))
styleDifference.setNeedsRepaintObject();
return styleDifference;
@@ -181,13 +181,10 @@ bool SVGRenderStyle::diffNeedsLayout(const SVGRenderStyle* other) const
return false;
}
-bool SVGRenderStyle::diffNeedsRepaintOnly(const SVGRenderStyle* other) const
+bool SVGRenderStyle::diffNeedsRepaint(const SVGRenderStyle* other) const
{
- if (stroke != other->stroke) {
- // Only the stroke-opacity case remains, where we only need a repaint.
- ASSERT(stroke->opacity != other->stroke->opacity);
+ if (stroke->opacity != other->stroke->opacity)
return true;
- }
// Painting related properties only need repaints.
if (misc != other->misc) {
« no previous file with comments | « Source/core/rendering/style/SVGRenderStyle.h ('k') | Source/core/rendering/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698