Title: [113962] trunk
Revision
113962
Author
[email protected]
Date
2012-04-12 04:12:10 -0700 (Thu, 12 Apr 2012)

Log Message

[Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
https://bugs.webkit.org/show_bug.cgi?id=83428

Patch by Zalan Bujtas <[email protected]> on 2012-04-12
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
coordinates. It is already done at ScrollView base class and this patch copies the logic to the
FrameView subclass.
Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.

Test: touchadjustment/iframe-with-mainframe-scroll-offset.html

* page/EventHandler.cpp:
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/EventHandler.h:
(EventHandler):
* page/FrameView.cpp:
(WebCore::FrameView::convertFromRenderer):
(WebCore::FrameView::convertToRenderer):
* page/GestureTapHighlighter.cpp:
* testing/Internals.cpp:
(WebCore::Internals::setDelegatesScrolling):
(WebCore::Internals::touchPositionAdjustedToBestClickableNode):
(WebCore::Internals::bestZoomableAreaForTouchPoint):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit2:

When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
coordinates. It is already done at ScrollView base class and this patch copies the logic to the
FrameView subclass.
Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):
(WebKit::WebPage::findZoomableAreaForPoint):

LayoutTests:

* touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset-expected.txt: Added.
* touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html: Added.
* touchadjustment/zoom-basic.html:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (113961 => 113962)


--- trunk/LayoutTests/ChangeLog	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/LayoutTests/ChangeLog	2012-04-12 11:12:10 UTC (rev 113962)
@@ -1,3 +1,14 @@
+2012-04-12  Zalan Bujtas  <[email protected]>
+
+        [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
+        https://bugs.webkit.org/show_bug.cgi?id=83428
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset-expected.txt: Added.
+        * touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html: Added.
+        * touchadjustment/zoom-basic.html:
+
 2012-04-12  Csaba Osztrogonác  <[email protected]>
 
         [Qt] Unreviewed gardening after r113945, update platform specific expected files.

Added: trunk/LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset-expected.txt (0 => 113962)


--- trunk/LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset-expected.txt	2012-04-12 11:12:10 UTC (rev 113962)
@@ -0,0 +1,14 @@
+
+Test iframe with main frame scroll offset case of tap-to-zoom mechanics.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS zoomableArea.top is 600
+PASS zoomableArea.left is 100
+PASS zoomableArea.width is 200
+PASS zoomableArea.height is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html (0 => 113962)


--- trunk/LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html	                        (rev 0)
+++ trunk/LayoutTests/touchadjustment/scroll-delegation/iframe-with-mainframe-scroll-offset.html	2012-04-12 11:12:10 UTC (rev 113962)
@@ -0,0 +1,72 @@
+<html>
+<head>
+    <script src=""
+    <style>
+        #scrolloffsetcontainer {
+            position: absolute;
+            top: 500px;
+            height: 1000px;
+        }
+        body {
+            margin: 0px;
+        }
+    </style>
+</head>
+<body _onload_="runTests()">
+
+<div id=scrolloffsetcontainer>
+    <iframe frameborder='0px' src=''>
+    </iframe>
+    <p id='description'></p>
+    <div id='console'></div>
+</div>
+
+<script>
+    function testRoundTouch(x, y, radius)
+    {
+        var x = x - radius;
+        var y = y - radius;
+        var width = radius * 2;
+        var height = radius * 2;
+        var zoomableRect = internals.bestZoomableAreaForTouchPoint(x, y, width, height, document);
+        return zoomableRect;
+    }
+
+    function testDirectTouches()
+    {
+        zoomableArea = testRoundTouch(100, 600, 10);
+        shouldEvaluateTo('zoomableArea.top', 600);
+        shouldEvaluateTo('zoomableArea.left', 100);
+        shouldEvaluateTo('zoomableArea.width', 200);
+        shouldEvaluateTo('zoomableArea.height', 100);
+    }
+
+    function runTests()
+    {
+        if (window.layoutTestController && window.internals && internals.touchNodeAdjustedToBestClickableNode && internals.setDelegatesScrolling) {
+            description('Test iframe with main frame scroll offset case of tap-to-zoom mechanics.');
+            window.scrollBy(0,500);
+            internals.setDelegatesScrolling(true, document);
+            layoutTestController.dumpAsText();
+            layoutTestController.waitUntilDone();
+            testDirectTouches();
+            isSuccessfullyParsed();
+            layoutTestController.notifyDone();
+        }
+    }
+</script>
+</body>
+</html>

Modified: trunk/LayoutTests/touchadjustment/zoom-basic.html (113961 => 113962)


--- trunk/LayoutTests/touchadjustment/zoom-basic.html	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/LayoutTests/touchadjustment/zoom-basic.html	2012-04-12 11:12:10 UTC (rev 113962)
@@ -3,8 +3,7 @@
     <script src=""
     <style>
         #div0 { position: absolute; left: 50px; top: 50px; width: 300px; height: 300px; box-sizing: border-box; }
-        #div1 { position: absolute; left: 50px; top: 50
-px; width: 200px; height: 100px; box-sizing: border-box; }
+        #div1 { position: absolute; left: 50px; top: 50px; width: 200px; height: 100px; box-sizing: border-box; }
         #div2 { position: absolute; left: 50px; top: 150px; width: 200px; height: 100px; padding: 10px; box-sizing: border-box; }
     </style>
 </head>
@@ -69,4 +68,4 @@
     }
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: trunk/Source/WebCore/ChangeLog (113961 => 113962)


--- trunk/Source/WebCore/ChangeLog	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/ChangeLog	2012-04-12 11:12:10 UTC (rev 113962)
@@ -1,3 +1,34 @@
+2012-04-12  Zalan Bujtas  <[email protected]>
+
+        [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
+        https://bugs.webkit.org/show_bug.cgi?id=83428
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
+        coordinates. It is already done at ScrollView base class and this patch copies the logic to the
+        FrameView subclass.
+        Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.
+
+        Test: touchadjustment/iframe-with-mainframe-scroll-offset.html
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::bestClickableNodeForTouchPoint):
+        (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
+        * page/EventHandler.h:
+        (EventHandler):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::convertFromRenderer):
+        (WebCore::FrameView::convertToRenderer):
+        * page/GestureTapHighlighter.cpp:
+        * testing/Internals.cpp:
+        (WebCore::Internals::setDelegatesScrolling):
+        (WebCore::Internals::touchPositionAdjustedToBestClickableNode):
+        (WebCore::Internals::bestZoomableAreaForTouchPoint):
+        * testing/Internals.h:
+        (Internals):
+        * testing/Internals.idl:
+
 2012-04-12  Zoltan Horvath  <[email protected]>
 
         [Qt] Two canvas tests fail with QT_IMAGE_DECODER=0 setup

Modified: trunk/Source/WebCore/WebCore.exp.in (113961 => 113962)


--- trunk/Source/WebCore/WebCore.exp.in	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-04-12 11:12:10 UTC (rev 113962)
@@ -150,6 +150,7 @@
 __ZN7WebCore10ShadowTree20removeAllShadowRootsEv
 __ZN7WebCore10ScrollView17setUseFixedLayoutEb
 __ZN7WebCore10ScrollView18setFixedLayoutSizeERKNS_7IntSizeE
+__ZN7WebCore10ScrollView21setDelegatesScrollingEb
 __ZN7WebCore10ScrollView20setCanHaveScrollbarsEb
 __ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb
 __ZN7WebCore10ScrollView24windowResizerRectChangedEv

Modified: trunk/Source/WebCore/page/EventHandler.cpp (113961 => 113962)


--- trunk/Source/WebCore/page/EventHandler.cpp	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/page/EventHandler.cpp	2012-04-12 11:12:10 UTC (rev 113962)
@@ -2468,24 +2468,24 @@
 #endif
 
 #if ENABLE(TOUCH_ADJUSTMENT)
-void EventHandler::bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode)
+bool EventHandler::bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode)
 {
     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
     HitTestResult result = hitTestResultAtPoint(touchCenter, /*allowShadowContent*/ false, /*ignoreClipping*/ false, DontHitTestScrollbars, hitType, touchRadius);
 
     IntRect touchRect = result.rectForPoint(touchCenter);
     RefPtr<StaticHashSetNodeList> nodeList = StaticHashSetNodeList::adopt(result.rectBasedTestResult());
-    findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, *nodeList.get());
+    return findBestClickableCandidate(targetNode, targetPoint, touchCenter, touchRect, *nodeList.get());
 }
 
-void EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode)
+bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode)
 {
     HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
     HitTestResult result = hitTestResultAtPoint(touchCenter, /*allowShadowContent*/ false, /*ignoreClipping*/ false, DontHitTestScrollbars, hitType, touchRadius);
 
     IntRect touchRect = result.rectForPoint(touchCenter);
     RefPtr<StaticHashSetNodeList> nodeList = StaticHashSetNodeList::adopt(result.rectBasedTestResult());
-    findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, *nodeList.get());
+    return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, *nodeList.get());
 }
 #endif
 

Modified: trunk/Source/WebCore/page/EventHandler.h (113961 => 113962)


--- trunk/Source/WebCore/page/EventHandler.h	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/page/EventHandler.h	2012-04-12 11:12:10 UTC (rev 113962)
@@ -168,8 +168,8 @@
 #endif
 
 #if ENABLE(TOUCH_ADJUSTMENT)
-    void bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode);
-    void bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode);
+    bool bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode);
+    bool bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode);
 #endif
 
 #if ENABLE(CONTEXT_MENUS)

Modified: trunk/Source/WebCore/page/FrameView.cpp (113961 => 113962)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-04-12 11:12:10 UTC (rev 113962)
@@ -3249,7 +3249,8 @@
     IntRect rect = renderer->localToAbsoluteQuad(FloatRect(rendererRect)).enclosingBoundingBox();
 
     // Convert from page ("absolute") to FrameView coordinates.
-    rect.moveBy(-scrollPosition());
+    if (!delegatesScrolling())
+        rect.moveBy(-scrollPosition());
 
     return rect;
 }
@@ -3259,7 +3260,8 @@
     IntRect rect = viewRect;
     
     // Convert from FrameView coords into page ("absolute") coordinates.
-    rect.moveBy(scrollPosition());
+    if (!delegatesScrolling())
+        rect.moveBy(scrollPosition());
 
     // FIXME: we don't have a way to map an absolute rect down to a local quad, so just
     // move the rect for now.
@@ -3272,16 +3274,18 @@
     IntPoint point = roundedIntPoint(renderer->localToAbsolute(rendererPoint, false, true /* use transforms */));
 
     // Convert from page ("absolute") to FrameView coordinates.
-    point.moveBy(-scrollPosition());
+    if (!delegatesScrolling())
+        point.moveBy(-scrollPosition());
     return point;
 }
 
 IntPoint FrameView::convertToRenderer(const RenderObject* renderer, const IntPoint& viewPoint) const
 {
     IntPoint point = viewPoint;
-    
+
     // Convert from FrameView coords into page ("absolute") coordinates.
-    point += IntSize(scrollX(), scrollY());
+    if (!delegatesScrolling())
+        point += IntSize(scrollX(), scrollY());
 
     return roundedIntPoint(renderer->absoluteToLocal(point, false, true /* use transforms */));
 }

Modified: trunk/Source/WebCore/page/GestureTapHighlighter.cpp (113961 => 113962)


--- trunk/Source/WebCore/page/GestureTapHighlighter.cpp	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/page/GestureTapHighlighter.cpp	2012-04-12 11:12:10 UTC (rev 113962)
@@ -55,7 +55,7 @@
 
     Frame* mainFrame = containingFrame->page()->mainFrame();
 
-    LayoutPoint mainFramePoint = mainFrame->view()->rootViewToContents(containingFrame->view()->contentsToRootView(IntPoint()));
+    LayoutPoint mainFramePoint = mainFrame->view()->windowToContents(containingFrame->view()->contentsToWindow(IntPoint()));
     return mainFramePoint;
 }
 

Modified: trunk/Source/WebCore/testing/Internals.cpp (113961 => 113962)


--- trunk/Source/WebCore/testing/Internals.cpp	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/testing/Internals.cpp	2012-04-12 11:12:10 UTC (rev 113962)
@@ -647,7 +647,17 @@
     return range->text();
 }
 
+void Internals::setDelegatesScrolling(bool enabled, Document* document, ExceptionCode& ec)
+{
+    // Delegate scrolling is valid only on mainframe's view.
+    if (!document || !document->view() || !document->page() || document->page()->mainFrame() != document->frame()) {
+        ec = INVALID_ACCESS_ERR;
+        return;
+    }
 
+    document->view()->setDelegatesScrolling(enabled);
+}
+
 #if ENABLE(TOUCH_ADJUSTMENT)
 PassRefPtr<WebKitPoint> Internals::touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
 {
@@ -662,6 +672,9 @@
     Node* targetNode;
     IntPoint adjustedPoint;
     document->frame()->eventHandler()->bestClickableNodeForTouchPoint(point, radius, adjustedPoint, targetNode);
+    if (targetNode)
+        adjustedPoint = targetNode->document()->view()->contentsToWindow(adjustedPoint);
+
     return WebKitPoint::create(adjustedPoint.x(), adjustedPoint.y());
 }
 
@@ -691,10 +704,12 @@
     IntSize radius(width / 2, height / 2);
     IntPoint point(x + radius.width(), y + radius.height());
 
-
     Node* targetNode;
     IntRect zoomableArea;
     document->frame()->eventHandler()->bestZoomableAreaForTouchPoint(point, radius, zoomableArea, targetNode);
+    if (targetNode)
+        zoomableArea = targetNode->document()->view()->contentsToWindow(zoomableArea);
+
     return ClientRect::create(zoomableArea);
 }
 #endif

Modified: trunk/Source/WebCore/testing/Internals.h (113961 => 113962)


--- trunk/Source/WebCore/testing/Internals.h	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/testing/Internals.h	2012-04-12 11:12:10 UTC (rev 113962)
@@ -120,6 +120,7 @@
     unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
     String rangeAsText(const Range*, ExceptionCode&);
 
+    void setDelegatesScrolling(bool enabled, Document*, ExceptionCode&);
 #if ENABLE(TOUCH_ADJUSTMENT)
     PassRefPtr<WebKitPoint> touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document*, ExceptionCode&);
     Node* touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document*, ExceptionCode&);

Modified: trunk/Source/WebCore/testing/Internals.idl (113961 => 113962)


--- trunk/Source/WebCore/testing/Internals.idl	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebCore/testing/Internals.idl	2012-04-12 11:12:10 UTC (rev 113962)
@@ -93,6 +93,7 @@
         unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
         DOMString rangeAsText(in Range range) raises (DOMException);
 
+        void setDelegatesScrolling(in boolean enabled, in Document document) raises (DOMException);
 #if defined(ENABLE_TOUCH_ADJUSTMENT) && ENABLE_TOUCH_ADJUSTMENT
         WebKitPoint touchPositionAdjustedToBestClickableNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);
         Node touchNodeAdjustedToBestClickableNode(in long x, in long y, in long width, in long height, in Document document) raises (DOMException);

Modified: trunk/Source/WebKit2/ChangeLog (113961 => 113962)


--- trunk/Source/WebKit2/ChangeLog	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebKit2/ChangeLog	2012-04-12 11:12:10 UTC (rev 113962)
@@ -1,3 +1,19 @@
+2012-04-12  Zalan Bujtas  <[email protected]>
+
+        [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset.
+        https://bugs.webkit.org/show_bug.cgi?id=83428
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting
+        coordinates. It is already done at ScrollView base class and this patch copies the logic to the
+        FrameView subclass.
+        Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::highlightPotentialActivation):
+        (WebKit::WebPage::findZoomableAreaForPoint):
+
 2012-04-11  Andy Estes  <[email protected]>
 
         Remove an autorelease pool made redundant by r113923.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (113961 => 113962)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2012-04-12 11:12:10 UTC (rev 113962)
@@ -1456,14 +1456,19 @@
 #if PLATFORM(QT)
 void WebPage::highlightPotentialActivation(const IntPoint& point, const IntSize& area)
 {
-    Node* activationNode = 0;
-    Frame* mainframe = m_page->mainFrame();
-    IntPoint adjustedPoint;
+    if (point == IntPoint::zero()) {
+        // An empty point deactivates the highlighting.
+        tapHighlightController().hideHighlight();
+    } else {
+        Frame* mainframe = m_page->mainFrame();
+        Node* activationNode = 0;
+        Node* adjustedNode = 0;
+        IntPoint adjustedPoint;
 
-    if (point != IntPoint::zero()) {
-        Node* adjustedNode = 0;
 #if ENABLE(TOUCH_ADJUSTMENT)
-        mainframe->eventHandler()->bestClickableNodeForTouchPoint(point, IntSize(area.width() / 2, area.height() / 2), adjustedPoint, adjustedNode);
+        if (!mainframe->eventHandler()->bestClickableNodeForTouchPoint(point, IntSize(area.width() / 2, area.height() / 2), adjustedPoint, adjustedNode))
+            return;
+
 #else
         HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
         adjustedNode = result.innerNode();
@@ -1481,12 +1486,10 @@
             else if (activationNode)
                 break;
         }
+
+        if (activationNode)
+            tapHighlightController().highlight(activationNode);
     }
-
-    if (activationNode)
-        tapHighlightController().highlight(activationNode);
-    else
-        tapHighlightController().hideHighlight();
 }
 #endif
 
@@ -2535,17 +2538,17 @@
 #if ENABLE(TOUCH_ADJUSTMENT)
 void WebPage::findZoomableAreaForPoint(const WebCore::IntPoint& point, const WebCore::IntSize& area)
 {
-    Frame* mainframe = m_mainFrame->coreFrame();
     Node* node = 0;
     IntRect zoomableArea;
-    mainframe->eventHandler()->bestZoomableAreaForTouchPoint(point, IntSize(area.width() / 2, area.height() / 2), zoomableArea, node);
-
+    bool foundAreaForTouchPoint = m_mainFrame->coreFrame()->eventHandler()->bestZoomableAreaForTouchPoint(point, IntSize(area.width() / 2, area.height() / 2), zoomableArea, node);
     ASSERT(node);
-    if (node->document() && node->document()->frame() && node->document()->frame()->view()) {
-        const ScrollView* view = node->document()->frame()->view();
-        zoomableArea = view->contentsToWindow(zoomableArea);
-    }
 
+    if (!foundAreaForTouchPoint)
+        return;
+
+    if (node->document() && node->document()->view())
+        zoomableArea = node->document()->view()->contentsToWindow(zoomableArea);
+
     send(Messages::WebPageProxy::DidFindZoomableArea(point, zoomableArea));
 }
 

Modified: trunk/Source/WebKit2/win/WebKit2.def (113961 => 113962)


--- trunk/Source/WebKit2/win/WebKit2.def	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebKit2/win/WebKit2.def	2012-04-12 11:12:10 UTC (rev 113962)
@@ -215,6 +215,7 @@
         ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
         ?setSansSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
+        ?setDelegatesScrolling@ScrollView@WebCore@@QAEX_N@Z
         ?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z
         ?setSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setStandardFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z

Modified: trunk/Source/WebKit2/win/WebKit2CFLite.def (113961 => 113962)


--- trunk/Source/WebKit2/win/WebKit2CFLite.def	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/WebKit2/win/WebKit2CFLite.def	2012-04-12 11:12:10 UTC (rev 113962)
@@ -207,6 +207,7 @@
         ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
         ?setSansSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
+        ?setDelegatesScrolling@ScrollView@WebCore@@QAEX_N@Z
         ?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z
         ?setSerifFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setStandardFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z

Modified: trunk/Source/autotools/symbols.filter (113961 => 113962)


--- trunk/Source/autotools/symbols.filter	2012-04-12 11:01:40 UTC (rev 113961)
+++ trunk/Source/autotools/symbols.filter	2012-04-12 11:12:10 UTC (rev 113962)
@@ -109,6 +109,7 @@
 _ZN7WebCore24InspectorInstrumentation18didCancelFrameImplEPNS_19InstrumentingAgentsE;
 _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
 _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
+_ZN7WebCore10ScrollView21setDelegatesScrollingEb;
 _ZN7WebCore8Settings18setFixedFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
 _ZN7WebCore8Settings18setSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
 _ZN7WebCore8Settings20setCursiveFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to