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

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

Issue 2705143002: Split StyleSurroundData::offset into separate members. (Closed)
Patch Set: Created 3 years, 10 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 08720ae4b90cfe764ad1910260a44adf9e7d3fff..a5468d8b0bdeb118da6e6ed8b16f2edbe8cfe09f 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -560,7 +560,7 @@ StyleDifference ComputedStyle::visualInvalidationDiff(
}
if (!diff.needsFullLayout() && position() != EPosition::kStatic &&
- m_surround->offset != other.m_surround->offset) {
+ !offsetEqual(other)) {
// Optimize for the case where a positioned layer is moving but not changing
// size.
if (dependenceOnContentHeightHasChanged(*this, other))
@@ -609,8 +609,7 @@ bool ComputedStyle::scrollAnchorDisablingPropertyChanged(
}
if (m_surround.get() != other.m_surround.get()) {
- if (m_surround->margin != other.m_surround->margin ||
- m_surround->offset != other.m_surround->offset ||
+ if (m_surround->margin != other.m_surround->margin || !offsetEqual(other) ||
m_surround->padding != other.m_surround->padding)
return true;
}

Powered by Google App Engine
This is Rietveld 408576698