WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
132228
[GTK] TextTrack kind and mode attributes are enums since
r166180
https://bugs.webkit.org/show_bug.cgi?id=132228
Summary
[GTK] TextTrack kind and mode attributes are enums since r166180
Carlos Garcia Campos
Reported
2014-04-27 01:53:11 PDT
We don't support enum values yet in GObject DOM bindings, but they are internally strings anyway, so we can keep the old implementations using strings as custom functions until we properly support enums.
Attachments
Patch
(5.09 KB, patch)
2014-04-27 01:54 PDT
,
Carlos Garcia Campos
mrobinson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2014-04-27 01:54:56 PDT
Created
attachment 230257
[details]
Patch
Martin Robinson
Comment 2
2014-04-27 04:07:43 PDT
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)); ?
Carlos Garcia Campos
Comment 3
2014-04-28 00:11:27 PDT
(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.
Carlos Garcia Campos
Comment 4
2014-04-28 01:07:29 PDT
Committed
r167876
: <
http://trac.webkit.org/changeset/167876
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug