Bug 123145 - [WK2][GTK] enable-media-stream Setting
Summary: [WK2][GTK] enable-media-stream Setting
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 79203
  Show dependency treegraph
 
Reported: 2013-10-22 02:36 PDT by Philippe Normand
Modified: 2013-10-31 08:33 PDT (History)
9 users (show)

See Also:


Attachments
[wk2] mediastream setting (14.36 KB, patch)
2013-10-22 02:47 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
[wk2] mediastream setting (14.13 KB, patch)
2013-10-22 02:51 PDT, Philippe Normand
cgarcia: review-
Details | Formatted Diff | Diff
[wk2] mediastream setting (14.18 KB, patch)
2013-10-23 00:01 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
[wk2] mediastream setting (14.19 KB, patch)
2013-10-25 08:31 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
[wk2] mediastream setting (14.11 KB, patch)
2013-10-30 11:05 PDT, Philippe Normand
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2013-10-22 02:36:15 PDT
I think it'd be good to have a enable-media-stream setting, similar to the ones for webgl and webaudio. I prepared a patch, including the necessary bits for the GTK port.
Comment 1 Philippe Normand 2013-10-22 02:47:24 PDT
Created attachment 214827 [details]
[wk2] mediastream setting
Comment 2 WebKit Commit Bot 2013-10-22 02:48:16 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 WebKit Commit Bot 2013-10-22 02:48:24 PDT
Attachment 214827 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/page/Settings.in', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/Shared/WebPreferencesStore.h', u'Source/WebKit2/UIProcess/API/C/WKPreferences.cpp', u'Source/WebKit2/UIProcess/API/C/WKPreferences.h', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp', u'Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h', u'Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt', u'Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitSettings.cpp', u'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitSettings.h"
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1154:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1156:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1157:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1158:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1159:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 5 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Philippe Normand 2013-10-22 02:51:06 PDT
Created attachment 214828 [details]
[wk2] mediastream setting
Comment 5 Carlos Garcia Campos 2013-10-22 03:25:49 PDT
Comment on attachment 214828 [details]
[wk2] mediastream setting

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

Thanks for the patch. API looks good to me, except for the mediastream -> media_stream change. WebKit2 cross-platform changes require a wk2 owner approval. Units tests are missing too, please add a test for get/set to the TestWebKitSettings test.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:139
> +    PROP_ENABLE_MEDIASTREAM

This should be MEDIA_STREAM

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1146
> +     *

There's an extra line here.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1152
> +     */

Since: 2.4

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2832
> + * Returns: %TRUE If mediastream support is enabled or %FALSE otherwise.
> + * Since: 2.2

Leave and extra line between this. 2.2 was already released, this should be 2.4

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2834
> +gboolean webkit_settings_get_enable_mediastream(WebKitSettings* settings)

it should be media_stream. The property is media-stream and the C API is MediaStream

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2847
> + * Set the #WebKitSettings:enable-media-stream property.
> + * Since: 2.2

Same here.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2849
> +void webkit_settings_set_enable_mediastream(WebKitSettings* settings, gboolean enabled)

media_stream
Comment 6 Philippe Normand 2013-10-22 03:32:19 PDT
(In reply to comment #5)
> (From update of attachment 214828 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=214828&action=review
> 
> Thanks for the patch. API looks good to me, except for the mediastream -> media_stream change. WebKit2 cross-platform changes require a wk2 owner approval. Units tests are missing too, please add a test for get/set to the TestWebKitSettings test.
> 

Cool, thanks for the review! I added a test, did you see it?
Anyway, I'll update the patch.
Comment 7 Carlos Garcia Campos 2013-10-22 03:50:00 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > (From update of attachment 214828 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=214828&action=review
> > 
> > Thanks for the patch. API looks good to me, except for the mediastream -> media_stream change. WebKit2 cross-platform changes require a wk2 owner approval. Units tests are missing too, please add a test for get/set to the TestWebKitSettings test.
> > 
> 
> Cool, thanks for the review! I added a test, did you see it?

Oops, sorry, I missed it, I reviewed it too fast.

> Anyway, I'll update the patch.

Thanks
Comment 8 Philippe Normand 2013-10-23 00:01:49 PDT
Created attachment 214934 [details]
[wk2] mediastream setting
Comment 9 Philippe Normand 2013-10-23 01:44:08 PDT
Comment on attachment 214934 [details]
[wk2] mediastream setting

This is not all working yet.
Comment 10 Carlos Garcia Campos 2013-10-23 01:55:40 PDT
(In reply to comment #9)
> (From update of attachment 214934 [details])
> This is not all working yet.

What doesn't work?
Comment 11 Philippe Normand 2013-10-23 02:16:30 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > (From update of attachment 214934 [details] [details])
> > This is not all working yet.
> 
> What doesn't work?

Right now the thing is a RuntimeEnabledFeature, not a Setting. I need to find where to change that logic in all involved code paths...
Comment 12 Philippe Normand 2013-10-25 08:31:03 PDT
Created attachment 215178 [details]
[wk2] mediastream setting
Comment 13 Philippe Normand 2013-10-29 00:49:10 PDT
Hi Anders, can you please review this patch?
Comment 14 Philippe Normand 2013-10-30 11:05:16 PDT
Created attachment 215528 [details]
[wk2] mediastream setting
Comment 15 Philippe Normand 2013-10-31 08:33:37 PDT
Committed r158360: <http://trac.webkit.org/changeset/158360>