Bug 93384

Summary: Evolution, empathy no longer build with webkint 1.9.6: webkit_dom_html_element_set_class_name is gone
Product: WebKit Reporter: David Ronis <David.Ronis>
Component: DOMAssignee: Erik Arvidsson <arv>
Status: RESOLVED FIXED    
Severity: Critical CC: abarth, arv, ojan, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Provide again accessors for className none

Description David Ronis 2012-08-07 12:23:52 PDT
I'm trying to upgrade evolution(git/master) and/or empathy-3.5.5 after upgrading webkit to 1.9.6 (from 1.9.5).  The builds die with things like:

 CC     libemiscwidgets_la-e-web-view.lo
e-web-view.c: In function 'web_view_update_document_highlights':
e-web-view.c:472:3: error: implicit declaration of function 'webkit_dom_html_element_set_class_name' [-Werror=implicit-function-declaration]
e-web-view.c:472:3: warning: nested extern declaration of 'webkit_dom_html_element_set_class_name' [-Wnested-externs]
cc1: some warnings being treated as errors
Comment 1 Alexey Proskuryakov 2012-08-07 15:55:40 PDT
The API moved from HTMLElement to Element in bug 93014.
Comment 2 Erik Arvidsson 2012-08-07 15:58:33 PDT
Fix coming.
Comment 3 Erik Arvidsson 2012-08-07 15:59:53 PDT
This is the GTK/GObject bindings. Right?
Comment 4 Erik Arvidsson 2012-08-07 16:17:34 PDT
Created attachment 157036 [details]
Patch
Comment 5 WebKit Review Bot 2012-08-07 18:46:59 PDT
Comment on attachment 157036 [details]
Patch

Clearing flags on attachment: 157036

Committed r124966: <http://trac.webkit.org/changeset/124966>
Comment 6 WebKit Review Bot 2012-08-07 18:47:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Xan Lopez 2012-08-08 05:39:32 PDT
I think this fix is wrong. The GObject bindings *do* have inheritance, but the C accessors for a property do not automagically appear in all subclasses, only in the one where the property is initially defined. So if Element has 'class-name', you get:

webkit_dom_element_get_class_name

but not 

webkit_dom_html_element_get_class_name

being HTMLElement a subclass of Element.

What you can do, in any class, is:

g_object_get (element, 'class-name', &name, NULL)

for any element in the hierarchy.

By adding the property twice in the class hierarchy we are just going to mess things up, the right fix is:

- Remove this patch.
- Add a custom accessor for 'class-name' in the HTMLElement GObject wrapper in Source/WebCore/bindings/gobject/WebKitDOMCustom.[cpp,h], that just forwards to the accessor in Element.

I can do this.
Comment 8 Xan Lopez 2012-08-08 07:05:42 PDT
Created attachment 157209 [details]
Provide again accessors for className

Something like this should do the trick.
Comment 9 WebKit Review Bot 2012-08-08 07:09:00 PDT
Attachment 157209 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/bindings/gobject/WebKitDOMCustom.h:33:  The parameter name "element" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/bindings/gobject/WebKitDOMCustom.h:34:  The parameter name "element" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Adam Barth 2012-08-08 08:15:25 PDT
Comment on attachment 157209 [details]
Provide again accessors for className

ok
Comment 11 WebKit Review Bot 2012-08-08 11:34:23 PDT
Comment on attachment 157209 [details]
Provide again accessors for className

Clearing flags on attachment: 157209

Committed r125056: <http://trac.webkit.org/changeset/125056>
Comment 12 WebKit Review Bot 2012-08-08 11:34:28 PDT
All reviewed patches have been landed.  Closing bug.