Bug 123899

Summary: [GTK] Use deprecation guards around deprecated API in GObject DOM bindings
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: BindingsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, gustavo, mrobinson
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

Description Carlos Garcia Campos 2013-11-06 09:38:29 PST
Do not include deprecated API when compiling with WEBKIT_DISABLE_DEPRECATED option.
Comment 1 Carlos Garcia Campos 2013-11-06 09:40:08 PST
Created attachment 216185 [details]
Patch
Comment 2 Martin Robinson 2013-11-06 09:48:55 PST
Comment on attachment 216185 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=216185&action=review

Looking good, with one small nit about the comment style.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:1009
> +        push(@hBody, "#endif /* WEBKIT_DISABLE_DEPRECATED */\n");

See below.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:1234
> +        push(@cBody, "#endif /* WEBKIT_DISABLE_DEPRECATED */\n");

See below.

> Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:167
> +#endif /* WEBKIT_DISABLE_DEPRECATED */

I think we typically use C++ style comments for this sort of thing.
Comment 3 Carlos Garcia Campos 2013-11-06 09:58:04 PST
(In reply to comment #2)
> (From update of attachment 216185 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=216185&action=review
> 
> Looking good, with one small nit about the comment style.
> 
> > Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:1009
> > +        push(@hBody, "#endif /* WEBKIT_DISABLE_DEPRECATED */\n");
> 
> See below.
> 
> > Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:1234
> > +        push(@cBody, "#endif /* WEBKIT_DISABLE_DEPRECATED */\n");
> 
> See below.
> 
> > Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:167
> > +#endif /* WEBKIT_DISABLE_DEPRECATED */
> 
> I think we typically use C++ style comments for this sort of thing.

Yes, that's what I thought, but I checked the feature guards and they all use /* */.
Comment 4 Martin Robinson 2013-11-06 10:08:40 PST
(In reply to comment #3)

> Yes, that's what I thought, but I checked the feature guards and they all use /* */.

I think this is just an oversight. The bindings are trending toward following the style guidelines over time. :)
Comment 5 Carlos Garcia Campos 2013-11-06 10:12:51 PST
(In reply to comment #4)
> (In reply to comment #3)
> 
> > Yes, that's what I thought, but I checked the feature guards and they all use /* */.
> 
> I think this is just an oversight. The bindings are trending toward following the style guidelines over time. :)

Yes, I guess, I'll change it before landing then.
Comment 6 Martin Robinson 2013-11-06 10:14:41 PST
(In reply to comment #5)

> Yes, I guess, I'll change it before landing then.

Cool. Thanks for the patch!
Comment 7 Carlos Garcia Campos 2013-11-07 05:28:38 PST
(In reply to comment #6)
> (In reply to comment #5)
> 
> > Yes, I guess, I'll change it before landing then.
> 
> Cool. Thanks for the patch!

hmm, is it really ok to use // in public headers that can be included from C code? or do you want me to change only the comments in the cpp file?
Comment 8 Martin Robinson 2013-11-07 08:05:02 PST
Sorry. Only the CPP code.
Comment 9 Carlos Garcia Campos 2013-11-08 00:07:33 PST
Committed r158907: <http://trac.webkit.org/changeset/158907>