2010-08-02 Xan Lopez <xlopez@igalia.com>
authorxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Aug 2010 23:43:04 +0000 (23:43 +0000)
committerxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Aug 2010 23:43:04 +0000 (23:43 +0000)
        Reviewed by Gustavo Noronha.

        [GTK] Add support for the Audio element in the DOM bindings
        https://bugs.webkit.org/show_bug.cgi?id=43313

        Add new files to the build.

        * GNUmakefile.am:

WebCore:

2010-08-02  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        [GTK] Add support for the Audio element in the DOM bindings
        https://bugs.webkit.org/show_bug.cgi?id=43313

        The IDL definition of some HTMLMediaElement methods does not match
        the C++ implementation API, take this fact into account when
        generating the bindings.

        * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
        (WebKit::createAudioWrapper):
        (WebKit::createHTMLElementWrapper):
        * bindings/scripts/CodeGeneratorGObject.pm:

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

ChangeLog
GNUmakefile.am
WebCore/ChangeLog
WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp
WebCore/bindings/scripts/CodeGeneratorGObject.pm

index 0bf4ed6..2c1643b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-02  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for the Audio element in the DOM bindings
+        https://bugs.webkit.org/show_bug.cgi?id=43313
+
+        Add new files to the build.
+
+        * GNUmakefile.am:
+
 2010-08-02  Chris Fleizach  <cfleizach@apple.com>
 
         Reviewed by David Kilzer.
index ff24a0b..27d8d4e 100644 (file)
@@ -375,6 +375,7 @@ webkitgtk_built_h_api += \
        DerivedSources/webkit/WebKitDOMHTMLAnchorElement.h \
        DerivedSources/webkit/WebKitDOMHTMLAppletElement.h \
        DerivedSources/webkit/WebKitDOMHTMLAreaElement.h \
+       DerivedSources/webkit/WebKitDOMHTMLAudioElement.h \
        DerivedSources/webkit/WebKitDOMHTMLBaseElement.h \
        DerivedSources/webkit/WebKitDOMHTMLBaseFontElement.h \
        DerivedSources/webkit/WebKitDOMHTMLBlockquoteElement.h \
@@ -408,6 +409,7 @@ webkitgtk_built_h_api += \
        DerivedSources/webkit/WebKitDOMHTMLLinkElement.h \
        DerivedSources/webkit/WebKitDOMHTMLMapElement.h \
        DerivedSources/webkit/WebKitDOMHTMLMarqueeElement.h \
+       DerivedSources/webkit/WebKitDOMHTMLMediaElement.h \
        DerivedSources/webkit/WebKitDOMHTMLMenuElement.h \
        DerivedSources/webkit/WebKitDOMHTMLMetaElement.h \
        DerivedSources/webkit/WebKitDOMHTMLModElement.h \
@@ -432,6 +434,8 @@ webkitgtk_built_h_api += \
        DerivedSources/webkit/WebKitDOMHTMLTitleElement.h \
        DerivedSources/webkit/WebKitDOMHTMLTableRowElement.h \
        DerivedSources/webkit/WebKitDOMHTMLUListElement.h \
+       DerivedSources/webkit/WebKitDOMMediaError.h \
+       DerivedSources/webkit/WebKitDOMTimeRanges.h \
        DerivedSources/webkit/WebKitDOMValidityState.h \
        DerivedSources/webkit/WebKitDOMDOMApplicationCache.h \
        DerivedSources/webkit/WebKitDOMBarInfo.h \
@@ -536,6 +540,8 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMHTMLAppletElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLAreaElement.cpp \
        DerivedSources/webkit/WebKitDOMHTMLAreaElementPrivate.h \
+       DerivedSources/webkit/WebKitDOMHTMLAudioElement.cpp \
+       DerivedSources/webkit/WebKitDOMHTMLAudioElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLBaseElement.cpp \
        DerivedSources/webkit/WebKitDOMHTMLBaseElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLBaseFontElement.cpp \
@@ -602,6 +608,8 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMHTMLMapElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLMarqueeElement.cpp \
        DerivedSources/webkit/WebKitDOMHTMLMarqueeElementPrivate.h \
+       DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp \
+       DerivedSources/webkit/WebKitDOMHTMLMediaElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLMenuElement.cpp \
        DerivedSources/webkit/WebKitDOMHTMLMenuElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLMetaElement.cpp \
@@ -652,6 +660,8 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMHTMLUListElementPrivate.h \
        DerivedSources/webkit/WebKitDOMLocation.cpp \
        DerivedSources/webkit/WebKitDOMLocationPrivate.h \
+       DerivedSources/webkit/WebKitDOMMediaError.cpp \
+       DerivedSources/webkit/WebKitDOMMediaErrorPrivate.h \
        DerivedSources/webkit/WebKitDOMMediaList.cpp \
        DerivedSources/webkit/WebKitDOMMediaListPrivate.h \
        DerivedSources/webkit/WebKitDOMMemoryInfo.cpp \
@@ -687,6 +697,8 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMStyleSheetPrivate.h \
        DerivedSources/webkit/WebKitDOMText.cpp \
        DerivedSources/webkit/WebKitDOMTextPrivate.h \
+       DerivedSources/webkit/WebKitDOMTimeRanges.cpp \
+       DerivedSources/webkit/WebKitDOMTimeRangesPrivate.h \
        DerivedSources/webkit/WebKitDOMTreeWalker.cpp \
        DerivedSources/webkit/WebKitDOMTreeWalkerPrivate.h \
        DerivedSources/webkit/WebKitDOMValidityState.cpp \
index 5148f68..1275d8b 100644 (file)
@@ -1,3 +1,19 @@
+2010-08-02  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [GTK] Add support for the Audio element in the DOM bindings
+        https://bugs.webkit.org/show_bug.cgi?id=43313
+
+        The IDL definition of some HTMLMediaElement methods does not match
+        the C++ implementation API, take this fact into account when
+        generating the bindings.
+
+        * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
+        (WebKit::createAudioWrapper):
+        (WebKit::createHTMLElementWrapper):
+        * bindings/scripts/CodeGeneratorGObject.pm:
+
 2010-08-02  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Sam Weinig.
index 1513b66..44928eb 100644 (file)
@@ -37,6 +37,7 @@
 #include "HTMLAnchorElement.h"
 #include "HTMLAppletElement.h"
 #include "HTMLAreaElement.h"
+#include "HTMLAudioElement.h"
 #include "HTMLBRElement.h"
 #include "HTMLBaseElement.h"
 #include "HTMLBaseFontElement.h"
@@ -95,6 +96,7 @@
 #include "webkit/WebKitDOMHTMLAnchorElementPrivate.h"
 #include "webkit/WebKitDOMHTMLAppletElementPrivate.h"
 #include "webkit/WebKitDOMHTMLAreaElementPrivate.h"
+#include "webkit/WebKitDOMHTMLAudioElementPrivate.h"
 #include "webkit/WebKitDOMHTMLBRElementPrivate.h"
 #include "webkit/WebKitDOMHTMLBaseElementPrivate.h"
 #include "webkit/WebKitDOMHTMLBaseFontElementPrivate.h"
@@ -175,6 +177,11 @@ static gpointer createAreaWrapper(PassRefPtr<HTMLElement> element)
     return wrapHTMLAreaElement(static_cast<HTMLAreaElement*>(element.get()));
 }
 
+static gpointer createAudioWrapper(PassRefPtr<HTMLElement> element)
+{
+    return wrapHTMLAudioElement(static_cast<HTMLAudioElement*>(element.get()));
+}
+
 static gpointer createBaseWrapper(PassRefPtr<HTMLElement> element)
 {
     return wrapHTMLBaseElement(static_cast<HTMLBaseElement*>(element.get()));
@@ -446,6 +453,7 @@ gpointer createHTMLElementWrapper(PassRefPtr<WebCore::HTMLElement> element)
     if (map.isEmpty()) {
        map.set(aTag.localName().impl(), createAnchorWrapper);
        map.set(appletTag.localName().impl(), createAppletWrapper);
+       map.set(audioTag.localName().impl(), createAudioWrapper);
        map.set(areaTag.localName().impl(), createAreaWrapper);
        map.set(baseTag.localName().impl(), createBaseWrapper);
        map.set(basefontTag.localName().impl(), createBaseFontWrapper);
index ae4ac39..bc5aace 100644 (file)
@@ -822,6 +822,15 @@ sub GenerateFunction {
         }
     }
 
+    # Not quite sure what to do with this yet, but we need to take into
+    # account the difference in parameters between the IDL file and the
+    # actual implementation.
+    if ($function->signature->extendedAttributes->{"NeedsUserGestureCheck"}) {
+        $functionSig .= ", gboolean isUserGesture";
+        $callImplParams .= ", " if $callImplParams;
+        $callImplParams .= "false";
+    }
+
     if ($returnType ne "void" && $returnValueIsGDOMType && $functionSigType ne "DOMObject") {
         if ($functionSigType ne "EventTarget") {
             $implIncludes{"webkit/WebKitDOM${functionSigType}Private.h"} = 1;