DOMHTMLInputElement::rectOnScreen() returns the wrong rect
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Nov 2009 23:37:24 +0000 (23:37 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Nov 2009 23:37:24 +0000 (23:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=31487

Reviewed by Darin Adler.

* DOMHTMLClasses.cpp:
(DOMHTMLInputElement::rectOnScreen):
Return the rect on screen, not the rect in the window.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51090 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/win/ChangeLog
WebKit/win/DOMHTMLClasses.cpp

index f57b2f7..684bf07 100644 (file)
@@ -1,3 +1,15 @@
+2009-11-12  Jon Honeycutt  <jhoneycutt@apple.com>
+
+        DOMHTMLInputElement::rectOnScreen() returns the wrong rect
+
+        https://bugs.webkit.org/show_bug.cgi?id=31487
+
+        Reviewed by Darin Adler.
+
+        * DOMHTMLClasses.cpp:
+        (DOMHTMLInputElement::rectOnScreen):
+        Return the rect on screen, not the rect in the window.
+
 2009-11-17  Brent Fulgham  <bfulgham@webkit.org>
 
         Reviewed by NOBODY - Build Fix.
index 9ce6004..11ee323 100644 (file)
@@ -1231,12 +1231,12 @@ HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::rectOnScreen(
     if (!renderer || !view)
         return E_FAIL;
 
-    IntRect coreRect = renderer->absoluteBoundingBoxRect();
-    coreRect.setLocation(view->contentsToWindow(coreRect.location()));
+    IntRect coreRect = view->contentsToScreen(renderer->absoluteBoundingBoxRect());
     rect->left = coreRect.x();
     rect->top = coreRect.y();
     rect->right = coreRect.right();
     rect->bottom = coreRect.bottom();
+
     return S_OK;
 }