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

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

Issue 2905793002: Replace pointers in ComputedStyle::*DataEquivalent functions with refs. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 43a50f38e72e63e93ccdbaceed4dc926c299b7ea..c9d7d779a46a127bb172985f3541507bd10c2fed 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -2276,9 +2276,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
FlexDirection() == kFlowColumnReverse;
}
bool HasBoxReflect() const { return BoxReflect(); }
- bool ReflectionDataEquivalent(const ComputedStyle* other_style) const {
+ bool ReflectionDataEquivalent(const ComputedStyle& other) const {
return rare_non_inherited_data_->ReflectionDataEquivalent(
- *other_style->rare_non_inherited_data_);
+ *other.rare_non_inherited_data_);
}
// Mask utility functions.
@@ -3057,10 +3057,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
}
// Content utility functions.
- bool ContentDataEquivalent(const ComputedStyle* other_style) const {
- return const_cast<ComputedStyle*>(this)
- ->rare_non_inherited_data_->ContentDataEquivalent(
- *const_cast<ComputedStyle*>(other_style)->rare_non_inherited_data_);
+ bool ContentDataEquivalent(const ComputedStyle& other) const {
+ return rare_non_inherited_data_->ContentDataEquivalent(
+ *other.rare_non_inherited_data_);
}
// Contain utility functions.
@@ -3183,9 +3182,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
// check hasTransform(), as it is possible for two styles to have matching
// transform operations but differ in other transform-impacting style
// respects.
- bool TransformDataEquivalent(const ComputedStyle& other_style) const {
+ bool TransformDataEquivalent(const ComputedStyle& other) const {
return rare_non_inherited_data_->transform_ ==
- other_style.rare_non_inherited_data_->transform_;
+ other.rare_non_inherited_data_->transform_;
}
bool Preserves3D() const {
return UsedTransformStyle3D() != kTransformStyle3DFlat;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698