Commit fa4d4412 authored by shend's avatar shend Committed by Commit bot

Omit .Get() on calls to DataEquivalent in StyleRareInheritedData.

StyleRareInheritedData contains a few members stored as RefPtr<> or
Persistent<>. To compare these members, we can't use == because that
performs a pointer comparison, so instead we use a helper method called
DataEquivalent that checks both the pointer and the data itself.

For some members, DataEquivalent is being used like this:

  DataEquivalent(foo.Get(), o.foo.Get())

However, DataEquivalent is overloaded for RefPtr and Persistent, so we
can do this instead:

  DataEquivalent(foo, o.foo)

This patch removes .Get() calls on DataEquivalent to take advantage of
the overloads.

BUG=628043

Review-Url: https://codereview.chromium.org/2852873002
Cr-Commit-Position: refs/heads/master@{#468914}
parent 84f04dbf
...@@ -197,9 +197,9 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const { ...@@ -197,9 +197,9 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const {
visited_link_caret_color_ == o.visited_link_caret_color_ && visited_link_caret_color_ == o.visited_link_caret_color_ &&
tap_highlight_color == o.tap_highlight_color && tap_highlight_color == o.tap_highlight_color &&
ShadowDataEquivalent(o) && highlight == o.highlight && ShadowDataEquivalent(o) && highlight == o.highlight &&
DataEquivalent(cursor_data.Get(), o.cursor_data.Get()) && DataEquivalent(cursor_data, o.cursor_data) && indent == o.indent &&
indent == o.indent && effective_zoom_ == o.effective_zoom_ && effective_zoom_ == o.effective_zoom_ && widows == o.widows &&
widows == o.widows && orphans == o.orphans && orphans == o.orphans &&
text_stroke_color_is_current_color_ == text_stroke_color_is_current_color_ ==
o.text_stroke_color_is_current_color_ && o.text_stroke_color_is_current_color_ &&
text_fill_color_is_current_color_ == text_fill_color_is_current_color_ ==
...@@ -246,7 +246,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const { ...@@ -246,7 +246,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const {
text_underline_position_ == o.text_underline_position_ && text_underline_position_ == o.text_underline_position_ &&
text_decoration_skip_ == o.text_decoration_skip_ && text_decoration_skip_ == o.text_decoration_skip_ &&
ruby_position_ == o.ruby_position_ && ruby_position_ == o.ruby_position_ &&
DataEquivalent(list_style_image.Get(), o.list_style_image.Get()) && DataEquivalent(list_style_image, o.list_style_image) &&
DataEquivalent(applied_text_decorations, o.applied_text_decorations) && DataEquivalent(applied_text_decorations, o.applied_text_decorations) &&
DataEquivalent(variables, o.variables) && DataEquivalent(variables, o.variables) &&
text_size_adjust_ == o.text_size_adjust_; text_size_adjust_ == o.text_size_adjust_;
...@@ -254,7 +254,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const { ...@@ -254,7 +254,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const {
bool StyleRareInheritedData::ShadowDataEquivalent( bool StyleRareInheritedData::ShadowDataEquivalent(
const StyleRareInheritedData& o) const { const StyleRareInheritedData& o) const {
return DataEquivalent(text_shadow.Get(), o.text_shadow.Get()); return DataEquivalent(text_shadow, o.text_shadow);
} }
bool StyleRareInheritedData::QuotesDataEquivalent( bool StyleRareInheritedData::QuotesDataEquivalent(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment