Bug 116043 - [GTK][CSS Regions] Provide web setting to control CSS regions run time
Summary: [GTK][CSS Regions] Provide web setting to control CSS regions run time
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-13 10:29 PDT by Anton Obzhirov
Modified: 2021-05-06 01:53 PDT (History)
11 users (show)

See Also:


Attachments
Patch (14.01 KB, patch)
2013-05-13 10:44 PDT, Anton Obzhirov
cgarcia: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Obzhirov 2013-05-13 10:29:43 PDT
Provide web setting to control CSS regions run time
Comment 1 Anton Obzhirov 2013-05-13 10:32:44 PDT
Needed to add run time enabling/disabling of CSS regions for GTK port in order to play with CSS regions.
Comment 2 Anton Obzhirov 2013-05-13 10:44:39 PDT
Created attachment 201581 [details]
Patch
Comment 3 WebKit Commit Bot 2013-05-13 10:47:02 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 4 Martin Robinson 2013-05-13 10:58:38 PDT
I wonder how useful it is make this configurable... Perhaps we should just have it so that when it's turned on at compile-time, it's enabled at runtime. At some point in the future it won't make sense to have support for disabling CSS regions in the API. It's even a liability since the setting may go away some day.
Comment 5 Carlos Garcia Campos 2013-05-13 10:58:49 PDT
Comment on attachment 201581 [details]
Patch

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

Thanks for the patch. I'm not sure if we want to add new API to WebKit1 which is currently in maintenance mode. I would split the patch into one for wk1 and one for wk2 in any case so that it can be discussed separately.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:34
> +#include "RuntimeEnabledFeatures.h"

Please use  angle-bracket form for WebCore header file includes.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1113
> +     * Since: 2.0

This should be 2.2, 2.0 was already released.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:1120
> +            TRUE,

I don't think we want this to be enabled by default, at least not for now.

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

Since 2.2.

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

Since 2.2.

> Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp:2779
> +#if ENABLE(CSS_REGIONS)
> +    WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled(enabled);
> +#endif

Do we really need to do this in the UI process too?
Comment 6 Martin Robinson 2013-05-13 11:02:59 PDT
(In reply to comment #5)

> I don't think we want this to be enabled by default, at least not for now.

This isn't a huge liability since we don't turn it on in release builds. I'm pretty sure this shouldn't even be configurable in the long-term.  CSS features are generally not turned on and off at runtime. This setting is useful for other browsers, because they can ship a stable release and still allow developers to play with the setting. They also don't have to worry about API stability as much (notice that this is a private API in WebKit2).  Given that, I'm fairly confidant we should not expose this and instead, enable CSS regions when they are turned on at compile-time.
Comment 7 Gustavo Noronha (kov) 2013-05-13 11:11:43 PDT
Agree with Martin. If we want to allow experimentation with features such as this one we should probably use a way that does not impact the API for each feature. Perhaps an environment variable that can be set with feature names, for instance?
Comment 8 Martin Robinson 2013-05-13 11:13:10 PDT
(In reply to comment #7)
> Agree with Martin. If we want to allow experimentation with features such as this one we should probably use a way that does not impact the API for each feature. Perhaps an environment variable that can be set with feature names, for instance?

I'd feel more comfortable with that, for sure. :)
Comment 9 Carlos Garcia Campos 2013-05-13 11:15:29 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > Agree with Martin. If we want to allow experimentation with features such as this one we should probably use a way that does not impact the API for each feature. Perhaps an environment variable that can be set with feature names, for instance?
> 
> I'd feel more comfortable with that, for sure. :)

Agree, the public API is not the right the place for this temporary convenient settings to play with experimental features.
Comment 10 Anton Obzhirov 2013-05-15 09:45:06 PDT
In this case I would suggest just to keep compilation time flag to disable/enable it: --enable-css-regions.
Comment 11 Anton Obzhirov 2013-05-23 07:45:13 PDT
After talking to Gustavo on IRC it doesn't make sense to proceed with this patch any longer because ENABLE_CSS_REGIONS already can be enabled/disabled in WebKitFeatures