| Index: ui/gfx/geometry/scroll_offset.cc
|
| diff --git a/ui/gfx/geometry/scroll_offset.cc b/ui/gfx/geometry/scroll_offset.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..297997db9a0547b553afd28fe727049fb8de2f86
|
| --- /dev/null
|
| +++ b/ui/gfx/geometry/scroll_offset.cc
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/gfx/geometry/scroll_offset.h"
|
| +
|
| +namespace gfx {
|
| +
|
| +bool ScrollOffset::IsZero() const {
|
| + return x_ == 0 && y_ == 0;
|
| +}
|
| +
|
| +void ScrollOffset::Add(const ScrollOffset& other) {
|
| + x_ += other.x_;
|
| + y_ += other.y_;
|
| +}
|
| +
|
| +void ScrollOffset::Subtract(const ScrollOffset& other) {
|
| + x_ -= other.x_;
|
| + y_ -= other.y_;
|
| +}
|
| +
|
| +} // namespace gfx
|
|
|