Mark various operator== methods as const.
Fix some lint errors as well. Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I3dc89035a5bf2cd6b092512d0aa6eb2022704792 Reviewed-on: https://chromium-review.googlesource.com/1039150 Reviewed-by: David Reveman <reveman@chromium.org> Reviewed-by: enne <enne@chromium.org> Reviewed-by: Alice Boxhall <aboxhall@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#558613}
This commit is contained in:
cc/trees
chrome/browser/ui/views/tabs
components
ui/accessibility
@@ -34,7 +34,7 @@ RenderFrameMetadata& RenderFrameMetadata::operator=(
|
||||
RenderFrameMetadata& RenderFrameMetadata::operator=(
|
||||
RenderFrameMetadata&& other) = default;
|
||||
|
||||
bool RenderFrameMetadata::operator==(const RenderFrameMetadata& other) {
|
||||
bool RenderFrameMetadata::operator==(const RenderFrameMetadata& other) const {
|
||||
return root_scroll_offset == other.root_scroll_offset &&
|
||||
root_background_color == other.root_background_color &&
|
||||
is_scroll_offset_at_top == other.is_scroll_offset_at_top &&
|
||||
@@ -45,7 +45,7 @@ bool RenderFrameMetadata::operator==(const RenderFrameMetadata& other) {
|
||||
local_surface_id == other.local_surface_id;
|
||||
}
|
||||
|
||||
bool RenderFrameMetadata::operator!=(const RenderFrameMetadata& other) {
|
||||
bool RenderFrameMetadata::operator!=(const RenderFrameMetadata& other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
|
@@ -31,8 +31,8 @@ class CC_EXPORT RenderFrameMetadata {
|
||||
|
||||
RenderFrameMetadata& operator=(const RenderFrameMetadata&);
|
||||
RenderFrameMetadata& operator=(RenderFrameMetadata&& other);
|
||||
bool operator==(const RenderFrameMetadata& other);
|
||||
bool operator!=(const RenderFrameMetadata& other);
|
||||
bool operator==(const RenderFrameMetadata& other) const;
|
||||
bool operator!=(const RenderFrameMetadata& other) const;
|
||||
|
||||
// Indicates whether the scroll offset of the root layer is at top, i.e.,
|
||||
// whether scroll_offset.y() == 0.
|
||||
|
@@ -17,7 +17,7 @@ TabRendererData& TabRendererData::operator=(TabRendererData&& other) = default;
|
||||
|
||||
TabRendererData::~TabRendererData() = default;
|
||||
|
||||
bool TabRendererData::operator==(const TabRendererData& other) {
|
||||
bool TabRendererData::operator==(const TabRendererData& other) const {
|
||||
return favicon.BackedBySameObjectAs(other.favicon) &&
|
||||
network_state == other.network_state && title == other.title &&
|
||||
url == other.url && crashed_status == other.crashed_status &&
|
||||
|
@@ -22,7 +22,7 @@ struct CHROME_VIEWS_EXPORT TabRendererData {
|
||||
TabRendererData& operator=(const TabRendererData& other);
|
||||
TabRendererData& operator=(TabRendererData&& other);
|
||||
|
||||
bool operator==(const TabRendererData& other);
|
||||
bool operator==(const TabRendererData& other) const;
|
||||
|
||||
// This interprets the crashed status to decide whether or not this
|
||||
// render data represents a tab that is "crashed" (i.e. the render
|
||||
|
@@ -576,8 +576,9 @@ void Surface::CommitSurfaceHierarchy(bool synchronized) {
|
||||
if (state_.input_region) {
|
||||
hit_test_region_ = *state_.input_region;
|
||||
hit_test_region_.Intersect(surface_hierarchy_content_bounds_);
|
||||
} else
|
||||
} else {
|
||||
hit_test_region_ = surface_hierarchy_content_bounds_;
|
||||
}
|
||||
|
||||
int outset = state_.input_outset;
|
||||
if (outset > 0) {
|
||||
@@ -727,7 +728,7 @@ Surface::State::State() {}
|
||||
|
||||
Surface::State::~State() = default;
|
||||
|
||||
bool Surface::State::operator==(const State& other) {
|
||||
bool Surface::State::operator==(const State& other) const {
|
||||
return other.opaque_region == opaque_region &&
|
||||
other.input_region == input_region &&
|
||||
other.buffer_scale == buffer_scale &&
|
||||
|
@@ -248,8 +248,8 @@ class Surface final : public ui::PropertyHandler {
|
||||
State();
|
||||
~State();
|
||||
|
||||
bool operator==(const State& other);
|
||||
bool operator!=(const State& other) { return !(*this == other); }
|
||||
bool operator==(const State& other) const;
|
||||
bool operator!=(const State& other) const { return !(*this == other); }
|
||||
|
||||
cc::Region opaque_region;
|
||||
base::Optional<cc::Region> input_region;
|
||||
|
@@ -59,7 +59,7 @@ void SurfaceDependencyDeadline::InheritFrom(
|
||||
}
|
||||
|
||||
bool SurfaceDependencyDeadline::operator==(
|
||||
const SurfaceDependencyDeadline& other) {
|
||||
const SurfaceDependencyDeadline& other) const {
|
||||
return begin_frame_source_ == other.begin_frame_source_ &&
|
||||
deadline_ == other.deadline_;
|
||||
}
|
||||
|
@@ -45,8 +45,8 @@ class VIZ_SERVICE_EXPORT SurfaceDependencyDeadline : public BeginFrameObserver {
|
||||
// Takes on the same BeginFrameSource and deadline as |other|.
|
||||
void InheritFrom(const SurfaceDependencyDeadline& other);
|
||||
|
||||
bool operator==(const SurfaceDependencyDeadline& other);
|
||||
bool operator!=(const SurfaceDependencyDeadline& other) {
|
||||
bool operator==(const SurfaceDependencyDeadline& other) const;
|
||||
bool operator!=(const SurfaceDependencyDeadline& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ AXRelativeBounds& AXRelativeBounds::operator=(AXRelativeBounds other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool AXRelativeBounds::operator==(const AXRelativeBounds& other) {
|
||||
bool AXRelativeBounds::operator==(const AXRelativeBounds& other) const {
|
||||
if (offset_container_id != other.offset_container_id)
|
||||
return false;
|
||||
if (bounds != other.bounds)
|
||||
@@ -45,7 +45,7 @@ bool AXRelativeBounds::operator==(const AXRelativeBounds& other) {
|
||||
return *transform == *other.transform;
|
||||
}
|
||||
|
||||
bool AXRelativeBounds::operator!=(const AXRelativeBounds& other) {
|
||||
bool AXRelativeBounds::operator!=(const AXRelativeBounds& other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
|
@@ -39,8 +39,8 @@ struct AX_EXPORT AXRelativeBounds final {
|
||||
|
||||
AXRelativeBounds(const AXRelativeBounds& other);
|
||||
AXRelativeBounds& operator=(AXRelativeBounds other);
|
||||
bool operator!=(const AXRelativeBounds& other);
|
||||
bool operator==(const AXRelativeBounds& other);
|
||||
bool operator!=(const AXRelativeBounds& other) const;
|
||||
bool operator==(const AXRelativeBounds& other) const;
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
@@ -64,4 +64,4 @@ AX_EXPORT std::ostream& operator<<(std::ostream& stream,
|
||||
|
||||
} // namespace ui
|
||||
|
||||
#endif // UI_ACCESSIBILITY_AX_NODE_DATA_H_
|
||||
#endif // UI_ACCESSIBILITY_AX_RELATIVE_BOUNDS_H_
|
||||
|
Reference in New Issue
Block a user