Implement support for the WinIE clientLeft and clientTop extensions.
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Sep 2006 04:55:03 +0000 (04:55 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Sep 2006 04:55:03 +0000 (04:55 +0000)
        Reviewed by aroben

        * dom/Element.cpp:
        (WebCore::Element::clientLeft):
        (WebCore::Element::clientTop):
        * dom/Element.h:
        * dom/Element.idl:
        * rendering/RenderObject.h:
        (WebCore::RenderObject::clientLeft):
        (WebCore::RenderObject::clientTop):

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

WebCore/ChangeLog
WebCore/dom/Element.cpp
WebCore/dom/Element.h
WebCore/dom/Element.idl

index 9e46c519a6951d1fb071f27e213cbf2912793fdd..1ebfe31ac4ed23791a72871a5c9d82fdbc32f139 100644 (file)
@@ -1,3 +1,18 @@
+2006-09-09  David Hyatt  <hyatt@apple.com>
+
+        Implement support for the WinIE clientLeft and clientTop extensions.
+
+        Reviewed by aroben
+
+        * dom/Element.cpp:
+        (WebCore::Element::clientLeft):
+        (WebCore::Element::clientTop):
+        * dom/Element.h:
+        * dom/Element.idl:
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::clientLeft):
+        (WebCore::RenderObject::clientTop):
+
 2006-09-09  Sam Weinig  <sam.weinig@gmail.com>
 
         Reviewed by Eric.
index e08c44c040946de3448f70143cf0661e64559005..32941fe7a3a39f5c01f79e628b445b5d671e934d 100644 (file)
@@ -223,6 +223,24 @@ Element* Element::offsetParent()
     return 0;
 }
 
+int Element::clientLeft()
+{
+    document()->updateLayoutIgnorePendingStylesheets();
+
+    if (RenderObject* rend = renderer())
+        return rend->clientLeft();
+    return 0;
+}
+
+int Element::clientTop()
+{
+    document()->updateLayoutIgnorePendingStylesheets();
+
+    if (RenderObject* rend = renderer())
+        return rend->clientTop();
+    return 0;
+}
+
 int Element::clientWidth()
 {
     document()->updateLayoutIgnorePendingStylesheets();
index 4128eaddb440f92b0f60a974368f351c5636d940..edbc71a5b19bb588dc31e04f2bdc945991b6a5a9 100644 (file)
@@ -77,6 +77,8 @@ public:
     int offsetWidth();
     int offsetHeight();
     Element* offsetParent();
+    int clientLeft();
+    int clientTop();
     int clientWidth();
     int clientHeight();
     int scrollLeft();
index ed0bbf791707de109e3ffbaf0878e9f8f3664fec..4b73b5a3e40be47d304bcad640a4444c294b4d35 100644 (file)
@@ -87,6 +87,10 @@ module core {
 
         readonly attribute Element offsetParent;
 
+        readonly attribute long clientLeft;
+        
+        readonly attribute long clientTop;
+
         readonly attribute long clientWidth;
 
         readonly attribute long clientHeight;