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

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: meade@'s suggestion 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 f4ddbc24d241a7349c12a07fae6013710d75b2be..38edf43644fb776893b65603722c2552f4ce9206 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -596,10 +596,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;
}
@@ -890,7 +890,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()) {
@@ -2209,7 +2209,7 @@ Color ComputedStyle::VisitedDependentColor(int color_property) const {
unvisited_color.Alpha());
}
-const BorderValue& ComputedStyle::BorderBefore() const {
+const BorderValue ComputedStyle::BorderBefore() const {
switch (GetWritingMode()) {
case WritingMode::kHorizontalTb:
return BorderTop();
@@ -2222,7 +2222,7 @@ const BorderValue& ComputedStyle::BorderBefore() const {
return BorderTop();
}
-const BorderValue& ComputedStyle::BorderAfter() const {
+const BorderValue ComputedStyle::BorderAfter() const {
switch (GetWritingMode()) {
case WritingMode::kHorizontalTb:
return BorderBottom();
@@ -2235,13 +2235,13 @@ const BorderValue& ComputedStyle::BorderAfter() const {
return BorderBottom();
}
-const BorderValue& ComputedStyle::BorderStart() const {
+const BorderValue ComputedStyle::BorderStart() const {
if (IsHorizontalWritingMode())
return IsLeftToRightDirection() ? BorderLeft() : BorderRight();
return IsLeftToRightDirection() ? BorderTop() : BorderBottom();
}
-const BorderValue& ComputedStyle::BorderEnd() const {
+const BorderValue ComputedStyle::BorderEnd() const {
if (IsHorizontalWritingMode())
return IsLeftToRightDirection() ? BorderRight() : BorderLeft();
return IsLeftToRightDirection() ? BorderBottom() : BorderTop();
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698