Title: [102283] trunk/Source/WebKit/chromium
Revision
102283
Author
commit-qu...@webkit.org
Date
2011-12-07 16:32:51 -0800 (Wed, 07 Dec 2011)

Log Message

Exposing boundsInScreenSpace in WebElement.
https://bugs.webkit.org/show_bug.cgi?id=71579

Exposing boundsInScreenSpace through a new function,
boundsInViewportSpace, to assist in moving the Autofill UI out of
WebKit in Chromium. Renamed the exposed function to provide a better
meaning of what the function does in the Chromium code.
More information can be found at:
http://crbug.com/51644

Patch by Chris Sharp <csh...@chromium.org> on 2011-12-07
Reviewed by Darin Fisher.

* public/WebElement.h:
* src/WebElement.cpp:
(WebKit::WebElement::boundsInViewportSpace):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (102282 => 102283)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-12-08 00:28:55 UTC (rev 102282)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-12-08 00:32:51 UTC (rev 102283)
@@ -1,3 +1,22 @@
+2011-12-07  Chris Sharp  <csh...@chromium.org>
+        
+        Exposing boundsInScreenSpace in WebElement.
+        https://bugs.webkit.org/show_bug.cgi?id=71579
+
+        Exposing boundsInScreenSpace through a new function,
+        boundsInViewportSpace, to assist in moving the Autofill UI out of
+        WebKit in Chromium. Renamed the exposed function to provide a better
+        meaning of what the function does in the Chromium code.
+        More information can be found at:
+        http://crbug.com/51644
+
+
+        Reviewed by Darin Fisher.
+
+        * public/WebElement.h:
+        * src/WebElement.cpp:
+        (WebKit::WebElement::boundsInViewportSpace):
+
 2011-12-07  Adam Klein  <ad...@chromium.org>
 
         [MutationObservers] Enable in Chromium trunk

Modified: trunk/Source/WebKit/chromium/public/WebElement.h (102282 => 102283)


--- trunk/Source/WebKit/chromium/public/WebElement.h	2011-12-08 00:28:55 UTC (rev 102282)
+++ trunk/Source/WebKit/chromium/public/WebElement.h	2011-12-08 00:32:51 UTC (rev 102283)
@@ -39,6 +39,7 @@
 
 namespace WebKit {
 class WebNamedNodeMap;
+struct WebRect;
 
     // Provides access to some properties of a DOM element node.
     class WebElement : public WebNode {
@@ -67,6 +68,12 @@
         // "Content-Language" header as a fallback.
         WEBKIT_EXPORT WebString computeInheritedLanguage() const;
 
+        // Returns the bounds of the element in viewport space. The bounds
+        // have been adjusted to include any transformations. This view is
+        // also called the Root View in WebKit.
+        // This function will update the layout if required.
+        WEBKIT_EXPORT WebRect boundsInViewportSpace();
+
 #if WEBKIT_IMPLEMENTATION
         WebElement(const WTF::PassRefPtr<WebCore::Element>&);
         WebElement& operator=(const WTF::PassRefPtr<WebCore::Element>&);

Modified: trunk/Source/WebKit/chromium/src/WebElement.cpp (102282 => 102283)


--- trunk/Source/WebKit/chromium/src/WebElement.cpp	2011-12-08 00:28:55 UTC (rev 102282)
+++ trunk/Source/WebKit/chromium/src/WebElement.cpp	2011-12-08 00:32:51 UTC (rev 102283)
@@ -29,6 +29,7 @@
  */
 
 #include "config.h"
+#include "platform/WebRect.h"
 #include "WebElement.h"
 #include "WebDocument.h"
 
@@ -108,6 +109,11 @@
     return WebDocument(constUnwrap<Element>()->document());
 }
 
+WebRect WebElement::boundsInViewportSpace()
+{
+    return unwrap<Element>()->boundsInRootViewSpace();
+}
+
 WebElement::WebElement(const PassRefPtr<Element>& elem)
     : WebNode(elem)
 {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to