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

Unified Diff: Source/core/rendering/style/BorderValue.h

Issue 222473005: Don't repaint when setting border or outline 0 with style none (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: make cross platform Created 6 years, 9 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/BorderData.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/BorderValue.h
diff --git a/Source/core/rendering/style/BorderValue.h b/Source/core/rendering/style/BorderValue.h
index 87031329ff472149af9bd2e771693cede137cf44..211f0be97f9987f51ece16e78d171e3319bf776a 100644
--- a/Source/core/rendering/style/BorderValue.h
+++ b/Source/core/rendering/style/BorderValue.h
@@ -63,6 +63,16 @@ public:
return m_width == o.m_width && m_style == o.m_style && m_color == o.m_color && m_colorIsCurrentColor == o.m_colorIsCurrentColor;
}
+ // The default width is 3px, but if the style is none we compute a value of 0 (in RenderStyle itself)
+ bool visuallyEqual(const BorderValue& o) const
+ {
+ if (m_style == BNONE && o.m_style == BNONE)
+ return true;
+ if (m_style == BHIDDEN && o.m_style == BHIDDEN)
+ return true;
+ return *this == o;
+ }
+
bool operator!=(const BorderValue& o) const
{
return !(*this == o);
« no previous file with comments | « Source/core/rendering/style/BorderData.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698