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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2861773004: Move border-*-width out of BorderValue and store on SurroundData in ComputedStyle instead (Closed)
Patch Set: Change border-*-width from a float to unsigned Created 3 years, 7 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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 24b011f80eb60ebbb601911c55fae60a97df9660..f68b97b70caa175f2b9d1b4ef2a944c76c828eaa 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -600,10 +600,10 @@ bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation(
if (surround_data_.Get() != other.surround_data_.Get()) {
// If our border widths change, then we need to layout. Other changes to
// borders only necessitate a paint invalidation.
- if (BorderLeftWidth() != other.BorderLeftWidth() ||
- BorderTopWidth() != other.BorderTopWidth() ||
- BorderBottomWidth() != other.BorderBottomWidth() ||
- BorderRightWidth() != other.BorderRightWidth())
+ if (!(BorderWidthEquals(BorderLeftWidth(), other.BorderLeftWidth())) ||
+ !(BorderWidthEquals(BorderTopWidth(), other.BorderTopWidth())) ||
+ !(BorderWidthEquals(BorderBottomWidth(), other.BorderBottomWidth())) ||
+ !(BorderWidthEquals(BorderRightWidth(), other.BorderRightWidth())))
return true;
}
@@ -894,7 +894,7 @@ bool ComputedStyle::DiffNeedsPaintInvalidationObject(
PrintColorAdjust() != other.PrintColorAdjust() ||
InsideLink() != other.InsideLink() ||
!Border().VisuallyEqual(other.Border()) || !RadiiEqual(other) ||
- *background_data_ != *other.background_data_)
+ !BorderSizeEquals(other) || *background_data_ != *other.background_data_)
return true;
if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get()) {

Powered by Google App Engine
This is Rietveld 408576698