| Index: Source/core/frame/PinchViewport.cpp
|
| diff --git a/Source/core/frame/PinchViewport.cpp b/Source/core/frame/PinchViewport.cpp
|
| index 48cbcf0639a7758cbc9d110a144762bcec264058..4f34e86a33203faac127a995df9c5862db556466 100644
|
| --- a/Source/core/frame/PinchViewport.cpp
|
| +++ b/Source/core/frame/PinchViewport.cpp
|
| @@ -210,6 +210,20 @@ void PinchViewport::move(const FloatSize& delta)
|
| setLocation(m_offset + delta);
|
| }
|
|
|
| +void PinchViewport::setLocationInDocument(const DoublePoint& location)
|
| +{
|
| + if (!mainFrame() || !mainFrame()->view())
|
| + return;
|
| +
|
| + FrameView* view = mainFrame()->view();
|
| +
|
| + DoublePoint currentLocation = visibleRectInDocument().location();
|
| + view->setScrollPosition(DoublePoint(location - currentLocation));
|
| +
|
| + currentLocation = visibleRectInDocument().location();
|
| + move(toFloatSize(location - currentLocation));
|
| +}
|
| +
|
| void PinchViewport::setScale(float scale)
|
| {
|
| setScaleAndLocation(scale, m_offset);
|
|
|