Bug 86060

Summary: WebKitDOMHTMLMediaElement.cpp - 'HTMLMediaElement' is not a member of 'WebCore'
Product: WebKit Reporter: Noel <noel.vellemans>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, haraken, japhet, mrobinson, noel.vellemans, sriram.neelakandan, webkit.review.bot, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
configure.log and buildlog.txt
none
proposed patch
none
updated patch with re-baselined tests none

Noel
Reported 2012-05-09 23:59:18 PDT
Created attachment 141095 [details] configure.log and buildlog.txt Webkit-Gtk 1.8.1 (and newer 1.9.2) build-failure in DOM bindings. I've been working on CROSS-Compiling WebKit-GTK (1.8.1) for an ARM-device. Almost everything is building fine (except for some minor details). I've managed to get it compiled (by commenting some stuff out) but I guess the best-solution is to solve the problem correctly. I'm must say I'm not familiar with the WEBKIT code at all so I do not have any clue what the real reason of these minor-problems is. But I guess it has something to do with #ifdefs that are not in the correct place. And off course depending on the options you select at configure time it might be the case that is compiling (or not compiling). Building with these configure options (see attachement config.log) fails on the following files /DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp /DerivedSources/webkit/WebKitDOMTimeRanges.cpp /DerivedSources/webkit/WebKitDOMTimeRanges.cpp (see buiuldlog.txt) These are the "HACKS" I did to get it compiled. I know it is not be the correct solution, but I just wanted to report them, this way it can be solved into one of the next releases. diff --git a/DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp b/DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp index ab4672b..9fb956d 100644 --- a/DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp +++ b/DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp @@ -144,6 +144,7 @@ static void webkit_dom_html_media_element_finalize(GObject* object) static void webkit_dom_html_media_element_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec) { +#if (0) /* NVL */ WebCore::JSMainThreadNullState state; WebKitDOMHTMLMediaElement* self = WEBKIT_DOM_HTML_MEDIA_ELEMENT(object); WebCore::HTMLMediaElement* coreSelf = WebKit::core(self); @@ -224,11 +225,16 @@ static void webkit_dom_html_media_element_set_property(GObject* object, guint pr G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } +#else + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); +#endif + } static void webkit_dom_html_media_element_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec) { +#if (0) /* NVL */ WebCore::JSMainThreadNullState state; WebKitDOMHTMLMediaElement* self = WEBKIT_DOM_HTML_MEDIA_ELEMENT(object); WebCore::HTMLMediaElement* coreSelf = WebKit::core(self); @@ -395,6 +401,10 @@ static void webkit_dom_html_media_element_get_property(GObject* object, guint pr G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } +#else + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); +#endif + } diff --git a/DerivedSources/webkit/WebKitDOMMediaError.cpp b/DerivedSources/webkit/WebKitDOMMediaError.cpp index a3cd01e..eb4ba69 100644 --- a/DerivedSources/webkit/WebKitDOMMediaError.cpp +++ b/DerivedSources/webkit/WebKitDOMMediaError.cpp @@ -115,6 +115,8 @@ static void webkit_dom_media_error_set_property(GObject* object, guint prop_id, static void webkit_dom_media_error_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec) { +#if (0) /* NVL */ + WebCore::JSMainThreadNullState state; WebKitDOMMediaError* self = WEBKIT_DOM_MEDIA_ERROR(object); WebCore::MediaError* coreSelf = WebKit::core(self); @@ -128,6 +130,9 @@ static void webkit_dom_media_error_get_property(GObject* object, guint prop_id, G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } +#else + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); +#endif } diff --git a/DerivedSources/webkit/WebKitDOMTimeRanges.cpp b/DerivedSources/webkit/WebKitDOMTimeRanges.cpp index 812cb55..929d793 100644 --- a/DerivedSources/webkit/WebKitDOMTimeRanges.cpp +++ b/DerivedSources/webkit/WebKitDOMTimeRanges.cpp @@ -115,6 +115,7 @@ static void webkit_dom_time_ranges_set_property(GObject* object, guint prop_id, static void webkit_dom_time_ranges_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec) { +#if (0) /* NVL */ WebCore::JSMainThreadNullState state; WebKitDOMTimeRanges* self = WEBKIT_DOM_TIME_RANGES(object); WebCore::TimeRanges* coreSelf = WebKit::core(self); @@ -128,6 +129,10 @@ static void webkit_dom_time_ranges_get_property(GObject* object, guint prop_id, G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; } +#else + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); +#endif + } Regards, Noel
Attachments
configure.log and buildlog.txt (16.80 KB, application/x-gzip)
2012-05-09 23:59 PDT, Noel
no flags
proposed patch (720 bytes, patch)
2012-05-11 08:25 PDT, Sriram Neelakandan
no flags
updated patch with re-baselined tests (9.26 KB, patch)
2012-05-14 02:21 PDT, Sriram Neelakandan
no flags
Sriram Neelakandan
Comment 1 2012-05-11 08:25:30 PDT
Created attachment 141422 [details] proposed patch attached is a proposed patch for the fix will attach a proper git-diff with changelong and test fix in a short while .. my git repo is slightly old .. and my pull is damn slow !
Sriram Neelakandan
Comment 2 2012-05-11 08:29:29 PDT
Noel, I will appreciate your help, if you could please manually patch the fix attached and confirm if that fixes your problem ?
Noel
Comment 3 2012-05-13 02:16:51 PDT
(In reply to comment #2) > Noel, > > I will appreciate your help, if you could please manually patch the fix attached and confirm if that fixes your problem ? Hi Sriram, I did your described patch manually, this leads for example to the following code that is generated automaticaly. [ $conditionGuardStart ... $conditionGuardEnd into CodeGeneratorGObject.pm ] Not working fine ...but it is going in the good direction. Please have a look at my findings, << code snip begin >> static void webkit_dom_html_media_element_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec) { WebCore::JSMainThreadNullState state; #if ENABLE(VIDEO) WebKitDOMHTMLMediaElement* self = WEBKIT_DOM_HTML_MEDIA_ELEMENT(object); WebCore::HTMLMediaElement* coreSelf = WebKit::core(self); #endif // ENABLE(VIDEO) switch (prop_id) { case PROP_SRC: { coreSelf->setAttribute(WebCore::HTMLNames::srcAttr, WTF::String::fromUTF8(g_value_get_string(value))); break; } case PROP_PRELOAD: { coreSelf->setPreload(WTF::String::fromUTF8(g_value_get_string(value))); break; } << code snip end >> If you have a look at this code you will see that it did change conditionaly some lines, but that it is not compilable. the case statment still uses the coreSelf-> which is not in there because it is in the #if ENABLE(VIDEO) ... #endif // ENABLE(VIDEO) Build log snip . DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp: In function 'void webkit_dom_html_media_element_set_property(GObject*, guint, const GValue*, GParamSpec*)': DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:156:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:161:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:167:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:172:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:177:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:182:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:187:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:192:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:198:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:203:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:208:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:213:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:218:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:223:9: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp: In function 'void webkit_dom_html_media_element_get_property(GObject*, guint, GValue*, GParamSpec*)': DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:243:16: error: 'MediaError' is not a member of 'WebCore' DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:243:16: error: 'MediaError' is not a member of 'WebCore' DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:243:35: error: template argument 1 is invalid DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:243:41: error: invalid type in declaration before '=' token DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:243:43: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:244:51: error: request for member 'get' in 'ptr', which is of non-class type 'int' DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:249:56: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:254:56: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:259:33: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:264:56: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:269:43: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:270:56: error: no matching function for call to 'kit(WebCore::TimeRanges*)' ./Source/WebCore/bindings/gobject/WebKitDOMBinding.h:38:16: note: candidates are: WebKitDOMNode* WebKit::kit(WebCore::Node*) ./Source/WebCore/bindings/gobject/WebKitDOMBinding.h:39:19: note: WebKitDOMElement* WebKit::kit(WebCore::Element*) ./Source/WebCore/bindings/gobject/WebKitDOMBinding.h:40:17: note: WebKitDOMEvent* WebKit::kit(WebCore::Event*) ./Source/WebCore/bindings/gobject/WebKitDOMBinding.h:41:23: note: WebKitDOMEventTarget* WebKit::kit(WebCore::EventTarget*) DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:275:33: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:280:36: error: 'coreSelf' was not declared in this scope DerivedSources/webkit/WebKitDOMHTMLMediaElement.cpp:285:34: error: 'coreSelf' was not declared in this scope Kind regards, If I can do some more testing, please do not hesitate. Noel
Sriram Neelakandan
Comment 4 2012-05-13 02:31:21 PDT
(In reply to comment #3) > #if ENABLE(VIDEO) > WebKitDOMHTMLMediaElement* self = WEBKIT_DOM_HTML_MEDIA_ELEMENT(object); > WebCore::HTMLMediaElement* coreSelf = WebKit::core(self); > #endif // ENABLE(VIDEO) > > switch (prop_id) { > case PROP_SRC: > { > coreSelf->setAttribute(WebCore::HTMLNames::srcAttr, WTF::String::fromUTF8(g_value_get_string(value))); > break; > } Some thing is wrong here. You seem to be not using the latest GeneratorGObject.pm There has been a fix already for the property generator, which has landed in r11542 <http://trac.webkit.org/changeset/115442> Also please see the bug : https://bugs.webkit.org/show_bug.cgi?id=85068 for more details My patch is on top of r115442
Noel
Comment 5 2012-05-13 02:40:53 PDT
(In reply to comment #4) > (In reply to comment #3) > > #if ENABLE(VIDEO) > > WebKitDOMHTMLMediaElement* self = WEBKIT_DOM_HTML_MEDIA_ELEMENT(object); > > WebCore::HTMLMediaElement* coreSelf = WebKit::core(self); > > #endif // ENABLE(VIDEO) > > > > switch (prop_id) { > > case PROP_SRC: > > { > > coreSelf->setAttribute(WebCore::HTMLNames::srcAttr, WTF::String::fromUTF8(g_value_get_string(value))); > > break; > > } > > > Some thing is wrong here. You seem to be not using the latest GeneratorGObject.pm > > There has been a fix already for the property generator, which has landed in r11542 <http://trac.webkit.org/changeset/115442> > > Also please see the bug : https://bugs.webkit.org/show_bug.cgi?id=85068 for more details > > My patch is on top of r115442 OK, you are correct I did the patch on the official 1.8.1 version (this was also the version where I reported the bug for). Give me some more time to test on the latest GIT .. I'll keep you informed, Thanks for the support so far, Noel
Sriram Neelakandan
Comment 6 2012-05-14 02:21:03 PDT
Created attachment 141670 [details] updated patch with re-baselined tests
Zan Dobersek
Comment 7 2012-05-14 03:01:06 PDT
(In reply to comment #6) > Created an attachment (id=141670) [details] > updated patch with re-baselined tests Looks good, CC-ing Martin for a review.
WebKit Review Bot
Comment 8 2012-05-14 08:27:40 PDT
Comment on attachment 141670 [details] updated patch with re-baselined tests Clearing flags on attachment: 141670 Committed r116949: <http://trac.webkit.org/changeset/116949>
WebKit Review Bot
Comment 9 2012-05-14 08:27:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.