| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 #include "public/platform/WebSnapPointList.h" |
| 5 |
| 6 #include <algorithm> |
| 7 |
| 8 namespace blink { |
| 9 |
| 10 void WebSnapPointList::AddSnapPoint(double offset, |
| 11 bool must_snap, |
| 12 bool is_start, |
| 13 bool is_end, |
| 14 SnapOrientation orientation) { |
| 15 WebSnapPoint point(offset, must_snap, is_start, is_end); |
| 16 if (orientation == kSnapX) |
| 17 horizontal_.push_back(point); |
| 18 else |
| 19 vertical_.push_back(point); |
| 20 } |
| 21 |
| 22 void WebSnapPointList::Sort() { |
| 23 std::sort(horizontal_.begin(), horizontal_.end()); |
| 24 std::sort(vertical_.begin(), vertical_.end()); |
| 25 } |
| 26 |
| 27 } // namespace blink |
| OLD | NEW |