Title: [177143] trunk/Source/WebCore
- Revision
- 177143
- Author
- [email protected]
- Date
- 2014-12-11 02:31:28 -0800 (Thu, 11 Dec 2014)
Log Message
[GTK] Implement sizes attribute for link tag
https://bugs.webkit.org/show_bug.cgi?id=125775
Reviewed by Martin Robinson.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_link_element_set_sizes): Add custom setter implementation.
* bindings/gobject/WebKitDOMCustomUnstable.h:
* bindings/js/JSHTMLLinkElementCustom.cpp:
(WebCore::JSHTMLLinkElement::sizes): Remove custom getter implementation.
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Mark WebKitDOMHTMLLinkElement as having custom unstable API.
* html/HTMLLinkElement.idl: Mark sizes attribute as CustomSetter
instead of Custom, since the getter can be autogenerated, and make
it available to the GObject DOM bindings too.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (177142 => 177143)
--- trunk/Source/WebCore/ChangeLog 2014-12-11 09:18:47 UTC (rev 177142)
+++ trunk/Source/WebCore/ChangeLog 2014-12-11 10:31:28 UTC (rev 177143)
@@ -1,3 +1,21 @@
+2014-12-11 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Implement sizes attribute for link tag
+ https://bugs.webkit.org/show_bug.cgi?id=125775
+
+ Reviewed by Martin Robinson.
+
+ * bindings/gobject/WebKitDOMCustom.cpp:
+ (webkit_dom_html_link_element_set_sizes): Add custom setter implementation.
+ * bindings/gobject/WebKitDOMCustomUnstable.h:
+ * bindings/js/JSHTMLLinkElementCustom.cpp:
+ (WebCore::JSHTMLLinkElement::sizes): Remove custom getter implementation.
+ * bindings/scripts/CodeGeneratorGObject.pm:
+ (HasUnstableCustomAPI): Mark WebKitDOMHTMLLinkElement as having custom unstable API.
+ * html/HTMLLinkElement.idl: Mark sizes attribute as CustomSetter
+ instead of Custom, since the getter can be autogenerated, and make
+ it available to the GObject DOM bindings too.
+
2014-12-10 Chris Dumez <[email protected]>
http://omfgdogs.info/ only animates when you resize the window
Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp (177142 => 177143)
--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp 2014-12-11 09:18:47 UTC (rev 177142)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp 2014-12-11 10:31:28 UTC (rev 177143)
@@ -21,9 +21,11 @@
#include "JSMainThreadExecState.h"
#include "SerializedScriptValue.h"
+#include "WebKitDOMDOMSettableTokenListPrivate.h"
#include "WebKitDOMDOMWindowPrivate.h"
#include "WebKitDOMHTMLInputElement.h"
#include "WebKitDOMHTMLInputElementPrivate.h"
+#include "WebKitDOMHTMLLinkElementPrivate.h"
#include "WebKitDOMHTMLTextAreaElement.h"
#include "WebKitDOMHTMLTextAreaElementPrivate.h"
#include "WebKitDOMPrivate.h"
@@ -87,3 +89,11 @@
handler->postMessage(WebCore::SerializedScriptValue::create(String::fromUTF8(message)));
return TRUE;
}
+
+void webkit_dom_html_link_element_set_sizes(WebKitDOMHTMLLinkElement* linkElement, const gchar* value)
+{
+ g_return_if_fail(WEBKIT_DOM_IS_HTML_LINK_ELEMENT(linkElement));
+ g_return_if_fail(value);
+
+ core(linkElement)->setSizes(String::fromUTF8(value));
+}
Modified: trunk/Source/WebCore/bindings/gobject/WebKitDOMCustomUnstable.h (177142 => 177143)
--- trunk/Source/WebCore/bindings/gobject/WebKitDOMCustomUnstable.h 2014-12-11 09:18:47 UTC (rev 177142)
+++ trunk/Source/WebCore/bindings/gobject/WebKitDOMCustomUnstable.h 2014-12-11 10:31:28 UTC (rev 177143)
@@ -50,6 +50,17 @@
WEBKIT_API WebKitDOMUserMessageHandler *
webkit_dom_user_message_handlers_namespace_get_handler(WebKitDOMUserMessageHandlersNamespace* self, const gchar* name);
+/**
+ * webkit_dom_html_link_element_set_sizes:
+ * @self: A #WebKitDOMHTMLLinkElement
+ * @value: a #gchar
+ *
+ * Stability: Unstable
+ * Since: 2.8
+ */
+WEBKIT_API void
+webkit_dom_html_link_element_set_sizes(WebKitDOMHTMLLinkElement* self, const gchar* value);
+
G_END_DECLS
#endif /* WEBKIT_DOM_USE_UNSTABLE_API */
Modified: trunk/Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp (177142 => 177143)
--- trunk/Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp 2014-12-11 09:18:47 UTC (rev 177142)
+++ trunk/Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp 2014-12-11 10:31:28 UTC (rev 177143)
@@ -36,11 +36,6 @@
namespace WebCore {
-JSValue JSHTMLLinkElement::sizes(ExecState* exec) const
-{
- return toJS(exec, globalObject(), impl().sizes());
-}
-
void JSHTMLLinkElement::setSizes(ExecState* exec, JSValue value)
{
impl().setSizes(valueToStringWithNullCheck(exec, value));
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (177142 => 177143)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2014-12-11 09:18:47 UTC (rev 177142)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2014-12-11 10:31:28 UTC (rev 177143)
@@ -1595,7 +1595,7 @@
sub HasUnstableCustomAPI {
my $domClassName = shift;
- return scalar(grep {$_ eq $domClassName} qw(WebKitDOMDOMWindow WebKitDOMUserMessageHandlersNamespace));
+ return scalar(grep {$_ eq $domClassName} qw(WebKitDOMDOMWindow WebKitDOMUserMessageHandlersNamespace WebKitDOMHTMLLinkElement));
}
sub WriteData {
Modified: trunk/Source/WebCore/html/HTMLLinkElement.idl (177142 => 177143)
--- trunk/Source/WebCore/html/HTMLLinkElement.idl 2014-12-11 09:18:47 UTC (rev 177142)
+++ trunk/Source/WebCore/html/HTMLLinkElement.idl 2014-12-11 10:31:28 UTC (rev 177143)
@@ -27,8 +27,8 @@
[Reflect] attribute DOMString media;
[Reflect] attribute DOMString rel;
[Reflect] attribute DOMString rev;
-#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
- [Custom] attribute DOMSettableTokenList sizes;
+#if (defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT) || (defined(LANGUAGE_GOBJECT) || LANGUAGE_GOBJECT)
+ [CustomSetter] attribute DOMSettableTokenList sizes;
#endif
[Reflect] attribute DOMString target;
[Reflect] attribute DOMString type;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes