Index: third_party/WebKit/Source/core/input/ScrollManager.cpp |
diff --git a/third_party/WebKit/Source/core/input/ScrollManager.cpp b/third_party/WebKit/Source/core/input/ScrollManager.cpp |
index d5b475c34fd52f8cc325bae80041b754bb44fd06..9d7d5a800ecf5f3ec7dbed669966130da1ee8b9f 100644 |
--- a/third_party/WebKit/Source/core/input/ScrollManager.cpp |
+++ b/third_party/WebKit/Source/core/input/ScrollManager.cpp |
@@ -19,6 +19,8 @@ |
#include "core/page/scrolling/ScrollState.h" |
#include "core/paint/PaintLayer.h" |
#include "platform/PlatformGestureEvent.h" |
+#include "wtf/PtrUtil.h" |
+#include <memory> |
namespace blink { |
@@ -246,7 +248,7 @@ ScrollResult ScrollManager::scrollBox(LayoutBox* box, |
// using parts of the scroll customization framework on just this element. |
computeScrollChainForSingleNode(*node, m_currentScrollChain); |
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData()); |
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData()); |
scrollStateData->delta_x = delta.width(); |
scrollStateData->delta_y = delta.height(); |
scrollStateData->position_x = position.x(); |
@@ -326,7 +328,7 @@ WebInputEventResult ScrollManager::handleGestureScrollBegin(const PlatformGestur |
passScrollGestureEventToWidget(gestureEvent, m_scrollGestureHandlingNode->layoutObject()); |
if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) { |
m_currentScrollChain.clear(); |
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData()); |
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData()); |
scrollStateData->position_x = gestureEvent.position().x(); |
scrollStateData->position_y = gestureEvent.position().y(); |
scrollStateData->is_beginning = true; |
@@ -380,7 +382,7 @@ WebInputEventResult ScrollManager::handleGestureScrollUpdate(const PlatformGestu |
} |
if (handleScrollCustomization) { |
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData()); |
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData()); |
scrollStateData->delta_x = delta.width(); |
scrollStateData->delta_y = delta.height(); |
scrollStateData->delta_granularity = ScrollByPrecisePixel; |
@@ -445,7 +447,7 @@ WebInputEventResult ScrollManager::handleGestureScrollEnd(const PlatformGestureE |
if (node) { |
passScrollGestureEventToWidget(gestureEvent, node->layoutObject()); |
if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) { |
- OwnPtr<ScrollStateData> scrollStateData = adoptPtr(new ScrollStateData()); |
+ std::unique_ptr<ScrollStateData> scrollStateData = wrapUnique(new ScrollStateData()); |
scrollStateData->is_ending = true; |
scrollStateData->is_in_inertial_phase = gestureEvent.inertialPhase() == ScrollInertialPhaseMomentum; |
scrollStateData->from_user_input = true; |