Title: [118912] trunk/Source/WebKit/blackberry
Revision
118912
Author
[email protected]
Date
2012-05-30 04:57:20 -0700 (Wed, 30 May 2012)

Log Message

[BlackBerry] Browser crashed when selecting in textarea
https://bugs.webkit.org/show_bug.cgi?id=87484

The function FatFingers::checkForText() uses host node's whole text
to checkFingerIntersection(). We should not give the text of shadow
nodes to it.

Patch by Sean Wang <[email protected]> on 2012-05-30
Reviewed by Antonio Gomes.

* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::getNodesFromRect): Avoid returning
shadow nodes when the context is Text node.

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (118911 => 118912)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-05-30 11:01:51 UTC (rev 118911)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-05-30 11:57:20 UTC (rev 118912)
@@ -1,3 +1,18 @@
+2012-05-30  Sean Wang  <[email protected]>
+
+        [BlackBerry] Browser crashed when selecting in textarea
+        https://bugs.webkit.org/show_bug.cgi?id=87484
+
+        The function FatFingers::checkForText() uses host node's whole text
+        to checkFingerIntersection(). We should not give the text of shadow
+        nodes to it.
+
+        Reviewed by Antonio Gomes.
+
+        * WebKitSupport/FatFingers.cpp:
+        (BlackBerry::WebKit::FatFingers::getNodesFromRect): Avoid returning
+        shadow nodes when the context is Text node.
+
 2012-05-30  Zoltan Horvath  <[email protected]>
 
         [Qt] Set WebCore imagedecoders as default and add fallback to QImageDecoder

Modified: trunk/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp (118911 => 118912)


--- trunk/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp	2012-05-30 11:01:51 UTC (rev 118911)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp	2012-05-30 11:57:20 UTC (rev 118912)
@@ -492,7 +492,10 @@
     getPaddings(topPadding, rightPadding, bottomPadding, leftPadding);
 
     HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
-    HitTestResult result(contentPos, topPadding, rightPadding, bottomPadding, leftPadding, HitTestShadowDOM);
+    // The user functions checkForText() and findIntersectingRegions() uses the Node.wholeText() to checkFingerIntersection()
+    // not the text in its shadow tree.
+    ShadowContentFilterPolicy allowShadow = m_targetType == Text ? DoNotAllowShadowContent : AllowShadowContent;
+    HitTestResult result(contentPos, topPadding, rightPadding, bottomPadding, leftPadding, allowShadow);
 
     document->renderView()->layer()->hitTest(request, result);
     intersectedNodes = result.rectBasedTestResult();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to