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

Side by Side Diff: ios/web/public/web_state/page_display_state.mm

Issue 2396553002: [ARC] Converts part of ios/web/ui to ARC.
Patch Set: co Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/web/public/web_state/page_display_state.h" 5 #include "ios/web/public/web_state/page_display_state.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #if !defined(__has_feature) || !__has_feature(objc_arc)
10 #error "This file requires ARC support."
11 #endif
12
9 namespace web { 13 namespace web {
10 14
11 namespace { 15 namespace {
12 // Returns true if: 16 // Returns true if:
13 // - both |value1| and |value2| are NAN, or 17 // - both |value1| and |value2| are NAN, or
14 // - |value1| and |value2| are equal non-NAN values. 18 // - |value1| and |value2| are equal non-NAN values.
15 inline bool StateValuesAreEqual(double value1, double value2) { 19 inline bool StateValuesAreEqual(double value1, double value2) {
16 return std::isnan(value1) ? std::isnan(value2) : value1 == value2; 20 return std::isnan(value1) ? std::isnan(value2) : value1 == value2;
17 } 21 }
18 } // namespace 22 } // namespace
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool PageDisplayState::operator==(const PageDisplayState& other) const { 103 bool PageDisplayState::operator==(const PageDisplayState& other) const {
100 return scroll_state_ == other.scroll_state_ && 104 return scroll_state_ == other.scroll_state_ &&
101 zoom_state_ == other.zoom_state_; 105 zoom_state_ == other.zoom_state_;
102 } 106 }
103 107
104 bool PageDisplayState::operator!=(const PageDisplayState& other) const { 108 bool PageDisplayState::operator!=(const PageDisplayState& other) const {
105 return !(*this == other); 109 return !(*this == other);
106 } 110 }
107 111
108 } // namespace web 112 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/web_state/crw_web_view_scroll_view_proxy.h ('k') | ios/web/public/web_state/ui/crw_generic_content_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698