| Index: third_party/WebKit/Source/platform/exported/WebSnapPointList.cpp
|
| diff --git a/third_party/WebKit/Source/platform/exported/WebSnapPointList.cpp b/third_party/WebKit/Source/platform/exported/WebSnapPointList.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..34aaa169ca476eda5da8edbd6f89017fb13d7162
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/exported/WebSnapPointList.cpp
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2017 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 "public/platform/WebSnapPointList.h"
|
| +
|
| +#include <algorithm>
|
| +
|
| +namespace blink {
|
| +
|
| +void WebSnapPointList::AddSnapPoint(double offset,
|
| + bool must_snap,
|
| + bool is_start,
|
| + bool is_end,
|
| + SnapOrientation orientation) {
|
| + WebSnapPoint point(offset, must_snap, is_start, is_end);
|
| + if (orientation == kSnapX)
|
| + horizontal_.push_back(point);
|
| + else
|
| + vertical_.push_back(point);
|
| +}
|
| +
|
| +void WebSnapPointList::Sort() {
|
| + std::sort(horizontal_.begin(), horizontal_.end());
|
| + std::sort(vertical_.begin(), vertical_.end());
|
| +}
|
| +
|
| +} // namespace blink
|
|
|