| OLD | NEW |
| 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 "core/page/scrolling/ScrollState.h" | 5 #include "core/page/scrolling/ScrollState.h" |
| 6 | 6 |
| 7 #include "core/dom/DOMNodeIds.h" | 7 #include "core/dom/DOMNodeIds.h" |
| 8 #include "core/dom/Element.h" | 8 #include "core/dom/Element.h" |
| 9 #include "core/dom/ExceptionCode.h" | 9 #include "core/dom/ExceptionCode.h" |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 scrollStateData->position_y = init.positionY(); | 33 scrollStateData->position_y = init.positionY(); |
| 34 scrollStateData->velocity_x = init.velocityX(); | 34 scrollStateData->velocity_x = init.velocityX(); |
| 35 scrollStateData->velocity_y = init.velocityY(); | 35 scrollStateData->velocity_y = init.velocityY(); |
| 36 scrollStateData->is_beginning = init.isBeginning(); | 36 scrollStateData->is_beginning = init.isBeginning(); |
| 37 scrollStateData->is_in_inertial_phase = init.isInInertialPhase(); | 37 scrollStateData->is_in_inertial_phase = init.isInInertialPhase(); |
| 38 scrollStateData->is_ending = init.isEnding(); | 38 scrollStateData->is_ending = init.isEnding(); |
| 39 scrollStateData->should_propagate = init.shouldPropagate(); | 39 scrollStateData->should_propagate = init.shouldPropagate(); |
| 40 scrollStateData->from_user_input = init.fromUserInput(); | 40 scrollStateData->from_user_input = init.fromUserInput(); |
| 41 scrollStateData->is_direct_manipulation = init.isDirectManipulation(); | 41 scrollStateData->is_direct_manipulation = init.isDirectManipulation(); |
| 42 scrollStateData->delta_granularity = init.deltaGranularity(); | 42 scrollStateData->delta_granularity = init.deltaGranularity(); |
| 43 ScrollState* scrollState = new ScrollState(scrollStateData.release()); | 43 ScrollState* scrollState = new ScrollState(std::move(scrollStateData)); |
| 44 return scrollState; | 44 return scrollState; |
| 45 } | 45 } |
| 46 | 46 |
| 47 ScrollState* ScrollState::create(PassOwnPtr<ScrollStateData> data) | 47 ScrollState* ScrollState::create(PassOwnPtr<ScrollStateData> data) |
| 48 { | 48 { |
| 49 ScrollState* scrollState = new ScrollState(std::move(data)); | 49 ScrollState* scrollState = new ScrollState(std::move(data)); |
| 50 return scrollState; | 50 return scrollState; |
| 51 } | 51 } |
| 52 | 52 |
| 53 ScrollState::ScrollState(PassOwnPtr<ScrollStateData> data) | 53 ScrollState::ScrollState(PassOwnPtr<ScrollStateData> data) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 { | 102 { |
| 103 m_data->set_current_native_scrolling_element(DOMNodeIds::idForNode(element))
; | 103 m_data->set_current_native_scrolling_element(DOMNodeIds::idForNode(element))
; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void ScrollState::setCurrentNativeScrollingElementById(int elementId) | 106 void ScrollState::setCurrentNativeScrollingElementById(int elementId) |
| 107 { | 107 { |
| 108 m_data->set_current_native_scrolling_element(elementId); | 108 m_data->set_current_native_scrolling_element(elementId); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |