Summary: | [GTK] TextTrack kind and mode attributes are enums since r166180 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | Bindings | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | gustavo, pnormand | ||||
Priority: | P2 | Keywords: | Gtk | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 131672 | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2014-04-27 01:53:11 PDT
Created attachment 230257 [details]
Patch
Comment on attachment 230257 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=230257&action=review Looks good with a few minor suggestions. > Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:74 > + gchar* result = convertToUTF8String(item->kind()); > + return result; Can you just return convertToUTF8String(item->kind()); ? > Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:103 > + WebCore::TextTrack* item = WebKit::core(self); > + WTF::String convertedValue = WTF::String::fromUTF8(value); > + item->setMode(convertedValue); Can't this just be WebKit::core(self)->setMode(WTF::String::fromUTF8(value)); ? (In reply to comment #2) > (From update of attachment 230257 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=230257&action=review > > Looks good with a few minor suggestions. Thanks > > Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:74 > > + gchar* result = convertToUTF8String(item->kind()); > > + return result; > > Can you just return convertToUTF8String(item->kind()); ? Sure, this is actually generated code, but added manually. I think this happens in the generated code because if the method raises exceptions there's code to deal with them, between the two lines. > > Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp:103 > > + WebCore::TextTrack* item = WebKit::core(self); > > + WTF::String convertedValue = WTF::String::fromUTF8(value); > > + item->setMode(convertedValue); > > Can't this just be WebKit::core(self)->setMode(WTF::String::fromUTF8(value)); ? Ditto. Committed r167876: <http://trac.webkit.org/changeset/167876> |