WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
196863
[GTK][WPE] Add enable-media websetting
https://bugs.webkit.org/show_bug.cgi?id=196863
Summary
[GTK][WPE] Add enable-media websetting
Philippe Normand
Reported
2019-04-12 09:13:41 PDT
It can be useful for headless browsers, for instance.
Attachments
Patch
(10.01 KB, patch)
2019-04-12 09:17 PDT
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(10.14 KB, patch)
2019-04-15 03:23 PDT
,
Philippe Normand
mcatanzaro
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2019-04-12 09:17:02 PDT
Created
attachment 367324
[details]
Patch
EWS Watchlist
Comment 2
2019-04-12 09:19:07 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
Michael Catanzaro
Comment 3
2019-04-12 10:26:03 PDT
Comment on
attachment 367324
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=367324&action=review
Will you have a follow-up patch to make code check the setting, I presume?
> Source/WebKit/Shared/WebPreferences.yaml:531 > + condition: ENABLE(VIDEO)
Er what about audio?
> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:1510 > + * WebKitSettings:enable-media: > + * > + * > + * Enable or disable support for Media on pages. This setting is enabled by > + * default. Disabling it means <audio> and <video> elements will have > + * playback support disabled.
Media -> media Since: @2.26
> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:1516 > + _("Whether Media content should be handled"),
Media -> media
> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:3708 > + * Returns: %TRUE If media support is enabled or %FALSE otherwise.
If -> if Since: @2.26
> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:3722 > + * Set the #WebKitSettings:enable-media property.
Since: @2.26
> Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:346 > +
Remove this extra blank line.
Philippe Normand
Comment 4
2019-04-12 10:38:42 PDT
(In reply to Michael Catanzaro from
comment #3
)
> Comment on
attachment 367324
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=367324&action=review
> > Will you have a follow-up patch to make code check the setting, I presume? >
What do you mean? The patch includes a unit-test.
> > Source/WebKit/Shared/WebPreferences.yaml:531 > > + condition: ENABLE(VIDEO) > > Er what about audio? >
ENABLE(VIDEO) implies <audio>
Michael Catanzaro
Comment 5
2019-04-12 10:55:36 PDT
(In reply to Philippe Normand from
comment #4
)
> What do you mean? The patch includes a unit-test.
I mean: currently the setting does nothing. You have a patch coming to make it work, right?
Philippe Normand
Comment 6
2019-04-12 10:59:25 PDT
I tested it with MB, it works.
Philippe Normand
Comment 7
2019-04-12 11:06:16 PDT
`mediaEnabled` is handled in make_names.pl which generates HTMLElementFactory.cpp
Philippe Normand
Comment 8
2019-04-15 03:23:12 PDT
Created
attachment 367413
[details]
Patch
Michael Catanzaro
Comment 9
2019-04-15 07:20:49 PDT
Comment on
attachment 367413
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=367413&action=review
> Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp:1507 > + *
You have an extra blank line here.
Philippe Normand
Comment 10
2019-04-15 07:41:37 PDT
Committed
r244260
: <
https://trac.webkit.org/changeset/244260
>
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