Bug 76444 - CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
Summary: CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexandru Chiculita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 05:10 PST by Alexandru Chiculita
Modified: 2012-01-20 13:28 PST (History)
6 users (show)

See Also:


Attachments
Patch V1 (20.53 KB, patch)
2012-01-17 07:59 PST, Alexandru Chiculita
zimmermann: review+
zimmermann: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2012-01-17 05:10:04 PST
See the summary.

We need a new setting to disable the feature at runtime in order to enable CSS Shaders on more platforms. Right now shaders only build on Apple Mac platform.
Comment 1 Alexandru Chiculita 2012-01-17 07:59:19 PST
Created attachment 122771 [details]
Patch V1
Comment 2 Nikolas Zimmermann 2012-01-18 01:52:33 PST
Comment on attachment 122771 [details]
Patch V1

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

Looks sane, r=me with some comments:

> Source/WebCore/css/CSSParser.cpp:6914
> +                if (findDocument()) {

if (Document* document = findDocument()) {
    Settings* settings = document->settings()....

> Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h:83
>  // Defaults to false.

This comment is not correct, eh? Please update it to true.
Comment 3 Alexandru Chiculita 2012-01-19 23:47:39 PST
Landed in 105485: http://trac.webkit.org/changeset/105485
Closing bug.
Comment 4 Adam Roben (:aroben) 2012-01-20 11:18:48 PST
Comment on attachment 122771 [details]
Patch V1

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

> Source/WebKit/mac/WebView/WebPreferencesPrivate.h:192
> +#if ENABLE(CSS_SHADERS)
> +- (BOOL)cssCustomFilterEnabled;
> +- (void)setCSSCustomFilterEnabled:(BOOL)enabled;
> +#endif

We can't expose ENABLE() settings to WebKit clients (even those using private headers). WebKit clients don't have a way of knowing what features were enabled when WebKit was compiled. I think we need to remove the #if and always implement these methods.
Comment 5 Simon Fraser (smfr) 2012-01-20 11:44:29 PST
This (or another filters patch) broke some tests, like css3/filters/custom-filter-property-computed-style.html
Comment 6 Alexandru Chiculita 2012-01-20 12:17:36 PST
(In reply to comment #4)
> (From update of attachment 122771 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=122771&action=review
> 
> > Source/WebKit/mac/WebView/WebPreferencesPrivate.h:192
> > +#if ENABLE(CSS_SHADERS)
> > +- (BOOL)cssCustomFilterEnabled;
> > +- (void)setCSSCustomFilterEnabled:(BOOL)enabled;
> > +#endif
> 
> We can't expose ENABLE() settings to WebKit clients (even those using private headers). WebKit clients don't have a way of knowing what features were enabled when WebKit was compiled. I think we need to remove the #if and always implement these methods.

The methods in Settings.cpp are always compiled, so I just forgot to remove the ifdefs from all the places. Sorry about that, I will fix it tomorrow.
Comment 7 Simon Fraser (smfr) 2012-01-20 13:16:32 PST
Since this is breaking apple-internal builds, it needs to be fixed ASAP. I'll do it.
Comment 8 Simon Fraser (smfr) 2012-01-20 13:19:53 PST
Fixed in http://trac.webkit.org/changeset/105540.
Comment 9 Alexandru Chiculita 2012-01-20 13:28:27 PST
(In reply to comment #8)
> Fixed in http://trac.webkit.org/changeset/105540.

Thanks!