[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:10:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ebaefe36c7f6ecdb0fc0b08f76525aa33482a4e6
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 2 23:17:01 2002 +0000

    	Fix for 3032557, wsj.com DHTML elements in the wrong position.
    	This patch adds support for img.x and img.y (a Mozilla extension
    	from NS4 days), which is used by the site to position the menus.
    
    	r=kocienda on the patch.
    
            * khtml/dom/html_image.cpp:
            (HTMLImageElement::x):
            (HTMLImageElement::y):
            * khtml/dom/html_image.h:
            * khtml/ecma/kjs_html.cpp:
            (KJS::HTMLElement::getValueProperty):
            * khtml/ecma/kjs_html.h:
            * khtml/ecma/kjs_html.lut.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 44d33b6..6ab04e3 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,22 @@
 2002-12-02  David Hyatt  <hyatt at apple.com>
 
+	Fix for 3032557, wsj.com DHTML elements in the wrong position.
+	This patch adds support for img.x and img.y (a Mozilla extension
+	from NS4 days), which is used by the site to position the menus.
+
+	r=kocienda on the patch.
+	
+        * khtml/dom/html_image.cpp:
+        (HTMLImageElement::x):
+        (HTMLImageElement::y):
+        * khtml/dom/html_image.h:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLElement::getValueProperty):
+        * khtml/ecma/kjs_html.h:
+        * khtml/ecma/kjs_html.lut.h:
+
+2002-12-02  David Hyatt  <hyatt at apple.com>
+
 	Undo my changes to margin collapsing for blocks inside inlines.
 	Although they may be correct in a strict mode, they don't
 	work with the real-world Web.  For now, I'm just backing out
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 44d33b6..6ab04e3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,22 @@
 2002-12-02  David Hyatt  <hyatt at apple.com>
 
+	Fix for 3032557, wsj.com DHTML elements in the wrong position.
+	This patch adds support for img.x and img.y (a Mozilla extension
+	from NS4 days), which is used by the site to position the menus.
+
+	r=kocienda on the patch.
+	
+        * khtml/dom/html_image.cpp:
+        (HTMLImageElement::x):
+        (HTMLImageElement::y):
+        * khtml/dom/html_image.h:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLElement::getValueProperty):
+        * khtml/ecma/kjs_html.h:
+        * khtml/ecma/kjs_html.lut.h:
+
+2002-12-02  David Hyatt  <hyatt at apple.com>
+
 	Undo my changes to margin collapsing for blocks inside inlines.
 	Although they may be correct in a strict mode, they don't
 	work with the real-world Web.  For now, I'm just backing out
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 44d33b6..6ab04e3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,22 @@
 2002-12-02  David Hyatt  <hyatt at apple.com>
 
+	Fix for 3032557, wsj.com DHTML elements in the wrong position.
+	This patch adds support for img.x and img.y (a Mozilla extension
+	from NS4 days), which is used by the site to position the menus.
+
+	r=kocienda on the patch.
+	
+        * khtml/dom/html_image.cpp:
+        (HTMLImageElement::x):
+        (HTMLImageElement::y):
+        * khtml/dom/html_image.h:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLElement::getValueProperty):
+        * khtml/ecma/kjs_html.h:
+        * khtml/ecma/kjs_html.lut.h:
+
+2002-12-02  David Hyatt  <hyatt at apple.com>
+
 	Undo my changes to margin collapsing for blocks inside inlines.
 	Although they may be correct in a strict mode, they don't
 	work with the real-world Web.  For now, I'm just backing out
diff --git a/WebCore/khtml/dom/html_image.cpp b/WebCore/khtml/dom/html_image.cpp
index 3771e31..0b86102 100644
--- a/WebCore/khtml/dom/html_image.cpp
+++ b/WebCore/khtml/dom/html_image.cpp
@@ -331,6 +331,28 @@ void HTMLImageElement::setWidth( long value )
     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, QString::number(value));
 }
 
+long HTMLImageElement::x() const
+{
+    if (impl && impl->renderer()) {
+        int x = 0;
+        int y = 0;
+        impl->renderer()->absolutePosition(x,y);
+        return x;
+    }
+    return 0;
+}
+
+long HTMLImageElement::y() const
+{
+    if (impl && impl->renderer()) {
+        int x = 0;
+        int y = 0;
+        impl->renderer()->absolutePosition(x,y);
+        return y;
+    }
+    return 0;
+}
+
 // --------------------------------------------------------------------------
 
 HTMLMapElement::HTMLMapElement() : HTMLElement()
diff --git a/WebCore/khtml/dom/html_image.h b/WebCore/khtml/dom/html_image.h
index 4dc39e8..430e0fb 100644
--- a/WebCore/khtml/dom/html_image.h
+++ b/WebCore/khtml/dom/html_image.h
@@ -358,6 +358,11 @@ public:
      */
     void setWidth( long );
 
+    /**
+     * Non-standard extensions to match Mozilla/Gecko.  Not part of the real ImgElement DOM.
+     */
+    long x() const;
+    long y() const;
 };
 
 // --------------------------------------------------------------------------
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index 89565dc..94a0516 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -818,7 +818,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const
   blur		KJS::HTMLElement::AnchorBlur		DontDelete|Function 0
   focus		KJS::HTMLElement::AnchorFocus		DontDelete|Function 0
 @end
- at begin HTMLImageElementTable 12
+ at begin HTMLImageElementTable 14
   name		KJS::HTMLElement::ImageName		DontDelete
   align		KJS::HTMLElement::ImageAlign		DontDelete
   alt		KJS::HTMLElement::ImageAlt		DontDelete
@@ -831,6 +831,8 @@ const ClassInfo* KJS::HTMLElement::classInfo() const
   useMap	KJS::HTMLElement::ImageUseMap		DontDelete
   vspace	KJS::HTMLElement::ImageVspace		DontDelete
   width		KJS::HTMLElement::ImageWidth		DontDelete
+  x         KJS::HTMLElement::ImageX            DontDelete|ReadOnly
+  y         KJS::HTMLElement::ImageY            DontDelete|ReadOnly
 @end
 @begin HTMLObjectElementTable 20
   form		  KJS::HTMLElement::ObjectForm		  DontDelete|ReadOnly
@@ -1469,6 +1471,8 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
     case ImageUseMap:          return getString(image.useMap());
     case ImageVspace:          return Number(image.vspace());
     case ImageWidth:           return Number(image.width());
+    case ImageX:               return Number(image.x());
+    case ImageY:               return Number(image.y());
     }
   }
   break;
diff --git a/WebCore/khtml/ecma/kjs_html.h b/WebCore/khtml/ecma/kjs_html.h
index b43d8cd..ef71ac5 100644
--- a/WebCore/khtml/ecma/kjs_html.h
+++ b/WebCore/khtml/ecma/kjs_html.h
@@ -112,7 +112,7 @@ namespace KJS {
            AnchorRev, AnchorTabIndex, AnchorTarget, AnchorText, AnchorBlur,
            ImageName, ImageAlign, ImageHspace, ImageVspace, ImageUseMap, ImageAlt,
            ImageLowSrc, ImageWidth, ImageIsMap, ImageBorder, ImageHeight,
-           ImageLongDesc, ImageSrc, ObjectHspace, ObjectHeight, ObjectAlign,
+           ImageLongDesc, ImageSrc, ImageX, ImageY, ObjectHspace, ObjectHeight, ObjectAlign,
            ObjectBorder, ObjectCode, ObjectType, ObjectVspace, ObjectArchive,
            ObjectDeclare, ObjectForm, ObjectCodeBase, ObjectCodeType, ObjectData,
            ObjectName, ObjectStandby, ObjectTabIndex, ObjectUseMap, ObjectWidth, ObjectContentDocument,
diff --git a/WebCore/khtml/ecma/kjs_html.lut.h b/WebCore/khtml/ecma/kjs_html.lut.h
index 6fe6f2c..f499240 100644
--- a/WebCore/khtml/ecma/kjs_html.lut.h
+++ b/WebCore/khtml/ecma/kjs_html.lut.h
@@ -624,25 +624,26 @@ namespace KJS {
 const struct HashEntry HTMLImageElementTableEntries[] = {
    { 0, 0, 0, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "border", KJS::HTMLElement::ImageBorder, DontDelete, 0, &HTMLImageElementTableEntries[14] },
-   { 0, 0, 0, 0, 0 },
-   { "hspace", KJS::HTMLElement::ImageHspace, DontDelete, 0, &HTMLImageElementTableEntries[15] },
+   { "isMap", KJS::HTMLElement::ImageIsMap, DontDelete, 0, 0 },
+   { "height", KJS::HTMLElement::ImageHeight, DontDelete, 0, &HTMLImageElementTableEntries[14] },
    { 0, 0, 0, 0, 0 },
-   { "vspace", KJS::HTMLElement::ImageVspace, DontDelete, 0, 0 },
-   { "align", KJS::HTMLElement::ImageAlign, DontDelete, 0, &HTMLImageElementTableEntries[16] },
+   { "align", KJS::HTMLElement::ImageAlign, DontDelete, 0, 0 },
+   { "src", KJS::HTMLElement::ImageSrc, DontDelete, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "name", KJS::HTMLElement::ImageName, DontDelete, 0, &HTMLImageElementTableEntries[12] },
+   { "border", KJS::HTMLElement::ImageBorder, DontDelete, 0, &HTMLImageElementTableEntries[18] },
+   { "y", KJS::HTMLElement::ImageY, DontDelete|ReadOnly, 0, 0 },
    { 0, 0, 0, 0, 0 },
-   { "longDesc", KJS::HTMLElement::ImageLongDesc, DontDelete, 0, 0 },
-   { "alt", KJS::HTMLElement::ImageAlt, DontDelete, 0, &HTMLImageElementTableEntries[13] },
-   { "height", KJS::HTMLElement::ImageHeight, DontDelete, 0, 0 },
-   { "isMap", KJS::HTMLElement::ImageIsMap, DontDelete, 0, 0 },
-   { "src", KJS::HTMLElement::ImageSrc, DontDelete, 0, &HTMLImageElementTableEntries[17] },
+   { "name", KJS::HTMLElement::ImageName, DontDelete, 0, 0 },
+   { "hspace", KJS::HTMLElement::ImageHspace, DontDelete, 0, &HTMLImageElementTableEntries[16] },
+   { "alt", KJS::HTMLElement::ImageAlt, DontDelete, 0, 0 },
+   { "longDesc", KJS::HTMLElement::ImageLongDesc, DontDelete, 0, &HTMLImageElementTableEntries[15] },
    { "useMap", KJS::HTMLElement::ImageUseMap, DontDelete, 0, 0 },
-   { "width", KJS::HTMLElement::ImageWidth, DontDelete, 0, 0 }
+   { "vspace", KJS::HTMLElement::ImageVspace, DontDelete, 0, &HTMLImageElementTableEntries[17] },
+   { "width", KJS::HTMLElement::ImageWidth, DontDelete, 0, 0 },
+   { "x", KJS::HTMLElement::ImageX, DontDelete|ReadOnly, 0, 0 }
 };
 
-const struct HashTable HTMLImageElementTable = { 2, 18, HTMLImageElementTableEntries, 12 };
+const struct HashTable HTMLImageElementTable = { 2, 19, HTMLImageElementTableEntries, 14 };
 
 }; // namespace
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list