Title: [125056] trunk/Source/WebCore
Revision
125056
Author
[email protected]
Date
2012-08-08 11:34:08 -0700 (Wed, 08 Aug 2012)

Log Message

Evolution, empathy no longer build with webkint 1.9.6:  webkit_dom_html_element_set_class_name is gone
https://bugs.webkit.org/show_bug.cgi?id=93384

Patch by Xan Lopez <[email protected]> on 2012-08-08
Reviewed by Adam Barth.

Provide custom backwards compatibility wrappers for HTMLElement
className accessors, since the attribute was moved to Element. The
previous fix attempted to define the attribute twice (once in each
class), but this is wrong, just provide again the old accessors
making them forward to the new methods.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_class_name): provide again
get_class_name for backwards compatibility.
(webkit_dom_html_element_set_class_name): provide again
set_class_name for backwards compatibility.
* bindings/gobject/WebKitDOMCustom.h: ditto.
* html/HTMLElement.idl: remove the className attribute
definition. Since it's already present in Element this will break
our bindings.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125055 => 125056)


--- trunk/Source/WebCore/ChangeLog	2012-08-08 18:29:02 UTC (rev 125055)
+++ trunk/Source/WebCore/ChangeLog	2012-08-08 18:34:08 UTC (rev 125056)
@@ -1,3 +1,26 @@
+2012-08-08  Xan Lopez  <[email protected]>
+
+        Evolution, empathy no longer build with webkint 1.9.6:  webkit_dom_html_element_set_class_name is gone
+        https://bugs.webkit.org/show_bug.cgi?id=93384
+
+        Reviewed by Adam Barth.
+
+        Provide custom backwards compatibility wrappers for HTMLElement
+        className accessors, since the attribute was moved to Element. The
+        previous fix attempted to define the attribute twice (once in each
+        class), but this is wrong, just provide again the old accessors
+        making them forward to the new methods.
+
+        * bindings/gobject/WebKitDOMCustom.cpp:
+        (webkit_dom_html_element_get_class_name): provide again
+        get_class_name for backwards compatibility.
+        (webkit_dom_html_element_set_class_name): provide again
+        set_class_name for backwards compatibility.
+        * bindings/gobject/WebKitDOMCustom.h: ditto.
+        * html/HTMLElement.idl: remove the className attribute
+        definition. Since it's already present in Element this will break
+        our bindings.
+
 2012-08-07  Ojan Vafai  <[email protected]>
 
         percentage height/width values in quirks mode are incorrectly resolved in flexbox children

Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp (125055 => 125056)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp	2012-08-08 18:29:02 UTC (rev 125055)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp	2012-08-08 18:34:08 UTC (rev 125056)
@@ -49,7 +49,19 @@
     return webkit_dom_blob_slice(self, start, end, content_type);
 }
 
+gchar*
+webkit_dom_html_element_get_class_name(WebKitDOMHTMLElement* element)
+{
+    return webkit_dom_element_get_class_name(WEBKIT_DOM_ELEMENT(element));
+}
+
 void
+webkit_dom_html_element_set_class_name(WebKitDOMHTMLElement* element, const gchar* value)
+{
+    webkit_dom_element_set_class_name(WEBKIT_DOM_ELEMENT(element), value);
+}
+
+void
 webkit_dom_html_form_element_dispatch_form_change(WebKitDOMHTMLFormElement* self)
 {
     g_warning("The onformchange functionality has been removed from the DOM spec, this function does nothing.");

Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h (125055 => 125056)


--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h	2012-08-08 18:29:02 UTC (rev 125055)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.h	2012-08-08 18:34:08 UTC (rev 125056)
@@ -30,6 +30,8 @@
 
 /* Compatibility */
 WEBKIT_API WebKitDOMBlob* webkit_dom_blob_webkit_slice(WebKitDOMBlob* self, gint64 start, gint64 end, const gchar* content_type);
+WEBKIT_API gchar* webkit_dom_html_element_get_class_name(WebKitDOMHTMLElement* element);
+WEBKIT_API void webkit_dom_html_element_set_class_name(WebKitDOMHTMLElement* element, const gchar* value);
 WEBKIT_API void webkit_dom_html_form_element_dispatch_form_change(WebKitDOMHTMLFormElement* self);
 WEBKIT_API void webkit_dom_html_form_element_dispatch_form_input(WebKitDOMHTMLFormElement* self);
 

Modified: trunk/Source/WebCore/html/HTMLElement.idl (125055 => 125056)


--- trunk/Source/WebCore/html/HTMLElement.idl	2012-08-08 18:29:02 UTC (rev 125055)
+++ trunk/Source/WebCore/html/HTMLElement.idl	2012-08-08 18:34:08 UTC (rev 125056)
@@ -92,11 +92,6 @@
         readonly attribute DOMString titleDisplayString;
 #endif
 
-#if defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT // Keep on HTMLElement for backwards compat.
-        attribute [Reflect=class] DOMString className;
-#endif
-
-
         void click();
     };
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to