| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef LayoutBoxItem_h | 5 #ifndef LayoutBoxItem_h |
| 6 #define LayoutBoxItem_h | 6 #define LayoutBoxItem_h |
| 7 | 7 |
| 8 #include "core/layout/LayoutBox.h" | 8 #include "core/layout/LayoutBox.h" |
| 9 #include "core/layout/api/LayoutBoxModel.h" | 9 #include "core/layout/api/LayoutBoxModel.h" |
| 10 #include "platform/scroll/ScrollTypes.h" | 10 #include "platform/scroll/ScrollTypes.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 explicit LayoutBoxItem(std::nullptr_t) : LayoutBoxModel(nullptr) { } | 27 explicit LayoutBoxItem(std::nullptr_t) : LayoutBoxModel(nullptr) { } |
| 28 | 28 |
| 29 LayoutBoxItem() { } | 29 LayoutBoxItem() { } |
| 30 | 30 |
| 31 LayoutBoxItem enclosingBox() const | 31 LayoutBoxItem enclosingBox() const |
| 32 { | 32 { |
| 33 return LayoutBoxItem(toBox()->enclosingBox()); | 33 return LayoutBoxItem(toBox()->enclosingBox()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 ScrollResultOneDimensional scroll(ScrollDirectionPhysical direction, ScrollG
ranularity granularity, float delta = 1) | 36 ScrollResult scroll(ScrollGranularity granularity, const FloatSize& delta) |
| 37 { | 37 { |
| 38 return toBox()->scroll(direction, granularity, delta); | 38 return toBox()->scroll(granularity, delta); |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 LayoutBox* toBox() | 42 LayoutBox* toBox() |
| 43 { | 43 { |
| 44 return toLayoutBox(layoutObject()); | 44 return toLayoutBox(layoutObject()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 const LayoutBox* toBox() const | 47 const LayoutBox* toBox() const |
| 48 { | 48 { |
| 49 return toLayoutBox(layoutObject()); | 49 return toLayoutBox(layoutObject()); |
| 50 } | 50 } |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace blink | 53 } // namespace blink |
| 54 | 54 |
| 55 #endif // LayoutBoxItem_h | 55 #endif // LayoutBoxItem_h |
| OLD | NEW |