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

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

Issue 2772353002: Revert of Add StyleDifference::needsVisualRectUpdate (Closed)
Patch Set: Created 3 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
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 61288ef9b791d248934c354f8951c05146c7f9bf..1a07e189c1ca942ee2389360984bf78d3f62f0f8 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -561,12 +561,12 @@
else if (diffNeedsPaintInvalidationObject(other))
diff.setNeedsPaintInvalidationObject();
- if (diffNeedsVisualRectUpdate(other))
- diff.setNeedsVisualRectUpdate();
-
- // This needs to be at last, because it may depend on conditions in diff
- // computed above.
updatePropertySpecificDifferences(other, diff);
+
+ // The following condition needs to be at last, because it may depend on
+ // conditions in diff computed above.
+ if (scrollAnchorDisablingPropertyChanged(other, diff))
+ diff.setScrollAnchorDisablingPropertyChanged();
// Cursors are not checked, since they will be set appropriately in response
// to mouse events, so they don't need to cause any paint invalidation or
@@ -1004,21 +1004,6 @@
return false;
}
-// This doesn't include conditions needing layout or overflow recomputation
-// which implies visual rect update.
-bool ComputedStyle::diffNeedsVisualRectUpdate(
- const ComputedStyle& other) const {
- // Visual rect is empty if visibility is hidden.
- if (visibility() != other.visibility())
- return true;
-
- // Need to update visual rect of the resizer.
- if (resize() != other.resize())
- return true;
-
- return false;
-}
-
void ComputedStyle::updatePropertySpecificDifferences(
const ComputedStyle& other,
StyleDifference& diff) const {
@@ -1113,9 +1098,6 @@
if (hasClip != otherHasClip ||
(hasClip && m_visual->clip != other.m_visual->clip))
diff.setCSSClipChanged();
-
- if (scrollAnchorDisablingPropertyChanged(other, diff))
- diff.setScrollAnchorDisablingPropertyChanged();
}
void ComputedStyle::addPaintImage(StyleImage* image) {
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698