Title: [88718] trunk/Source/WebCore
- Revision
- 88718
- Author
- enr...@apple.com
- Date
- 2011-06-13 15:38:03 -0700 (Mon, 13 Jun 2011)
Log Message
Frame::visiblePositionForPoint returns null position if the point is over an imagemap.
https://bugs.webkit.org/show_bug.cgi?id=62562
<rdar://problem/9313885>
Patch by Morgan Winer <mwi...@apple.com> on 2011-06-13
Reviewed by Enrica Casucci.
The innerNode() of an imageMap is an area, and doesn't have a renderer and
therefore can't report a position.
Every result's innerNonSharedNode() should be the same as the innerNode(),
except for imageMaps, which will have the actual image as its innerNonSharedNode(),
and will therefore have a renderer and can report a position.
There are no layout tests for this, since it can be tested only at API level.
* page/Frame.cpp:
(WebCore::Frame::visiblePositionForPoint): Changing innerNode() to innerNonSharedNode().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (88717 => 88718)
--- trunk/Source/WebCore/ChangeLog 2011-06-13 22:37:16 UTC (rev 88717)
+++ trunk/Source/WebCore/ChangeLog 2011-06-13 22:38:03 UTC (rev 88718)
@@ -1,3 +1,22 @@
+2011-06-13 Morgan Winer <mwi...@apple.com>
+
+ Reviewed by Enrica Casucci.
+
+ Frame::visiblePositionForPoint returns null position if the point is over an imagemap.
+ https://bugs.webkit.org/show_bug.cgi?id=62562
+ <rdar://problem/9313885>
+
+ The innerNode() of an imageMap is an area, and doesn't have a renderer and
+ therefore can't report a position.
+ Every result's innerNonSharedNode() should be the same as the innerNode(),
+ except for imageMaps, which will have the actual image as its innerNonSharedNode(),
+ and will therefore have a renderer and can report a position.
+
+ There are no layout tests for this, since it can be tested only at API level.
+
+ * page/Frame.cpp:
+ (WebCore::Frame::visiblePositionForPoint): Changing innerNode() to innerNonSharedNode().
+
2011-06-13 Lucas De Marchi <lucas.demar...@profusion.mobi>
Reviewed by Eric Seidel.
Modified: trunk/Source/WebCore/page/Frame.cpp (88717 => 88718)
--- trunk/Source/WebCore/page/Frame.cpp 2011-06-13 22:37:16 UTC (rev 88717)
+++ trunk/Source/WebCore/page/Frame.cpp 2011-06-13 22:38:03 UTC (rev 88718)
@@ -858,7 +858,7 @@
VisiblePosition Frame::visiblePositionForPoint(const IntPoint& framePoint)
{
HitTestResult result = eventHandler()->hitTestResultAtPoint(framePoint, true);
- Node* node = result.innerNode();
+ Node* node = result.innerNonSharedNode();
if (!node)
return VisiblePosition();
RenderObject* renderer = node->renderer();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes