- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8295
Dictionary pop-up panel targets the wrong word in a scrolled IFRAME
* kwq/WebCoreAXObject.mm:
(-[WebCoreAXObject doAXTextMarkerForPosition:]): Removed the addition of scroll
offsets, which is redundant for scrolled views, then changed the first view
to be the document's scrolled view instead of its scroll view (all subsequent views were
already scrolled views).
* manual-tests/dictionary-scrolled-iframe.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13754
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-04-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Eric, landed by ap.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8295
+ Dictionary pop-up panel targets the wrong word in a scrolled IFRAME
+
+ * kwq/WebCoreAXObject.mm:
+ (-[WebCoreAXObject doAXTextMarkerForPosition:]): Removed the addition of scroll
+ offsets, which is redundant for scrolled views, then changed the first view
+ to be the document's scrolled view instead of its scroll view (all subsequent views were
+ already scrolled views).
+ * manual-tests/dictionary-scrolled-iframe.html: Added.
+
2006-04-09 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
{
// convert absolute point to view coordinates
FrameView *docView = [self topView];
- NSView *view = docView->getView();
+ NSView *view = docView->getDocumentView();
RenderObject *renderer = [self topRenderer];
Node *innerNode = NULL;
NSPoint ourpoint;
// ask the document layer to hitTest
NSPoint windowCoord = [[view window] convertScreenToBase: point];
ourpoint = [view convertPoint:windowCoord fromView:nil];
- ourpoint.x += docView->contentsX();
- ourpoint.y += docView->contentsY();
RenderObject::NodeInfo nodeInfo(true, true);
renderer->layer()->hitTest(nodeInfo, IntPoint(ourpoint));
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+</head>
+<body>
+<p><b>BUG ID:</b> <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=8295">Bugzilla bug 8295</a> Dictionary pop-up panel targets the wrong word in a scrolled IFRAME</p>
+
+<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b><br>
+1. Click the inner frame’s down scroll arrow once.<br>
+2. Move the mouse pointer
+over “target”.<br>
+3. Press Command-Control-D to invoke the Dictionary pop-up panel.
+</p>
+
+<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
+The Dictionary pop-up panel will appear over “target”, giving its definition.
+</p>
+
+<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>
+The Dictionary pop-up panel will appear over “failure”, with the definition of failure.
+</p>
+
+<iframe style="background: #ffd;" src="data:text/html,Curabitur pretium, quam quis semper malesuada, est libero feugiat libero, vel fringilla orci nibh sed neque. Quisque eu nulla non nisi molestie accumsan. Etiam tellus urna, <span style=%22color: green;%22>target</span> ac, laoreet non, suscipit sed, sapien. Phasellus vehicula, sem at posuere tel failure, augue nibh molestie nisl, nec ullamcorper lacus ante vulputate pede. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris viverra augue vitae purus. Morbi sed sem. Donec dui nisi, ultrices non, pretium quis, hendrerit non, est. Donec tellus. Donec eget dui id eros pharetra rutrum. Suspendisse sodales lectus sit amet nulla. Morbi tortor arcu, convallis blandit, elementum eu, aliquet a, tellus.
+"></iframe>
+
+</body>
+</html>