Bug 81996 - Disable CSS_SHADERS in Apple builds
Summary: Disable CSS_SHADERS in Apple builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-03-22 17:15 PDT by Dean Jackson
Modified: 2012-03-23 13:20 PDT (History)
2 users (show)

See Also:


Attachments
Patch (8.91 KB, patch)
2012-03-23 07:24 PDT, Dean Jackson
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2012-03-22 17:15:53 PDT
We need to turn off shaders for Apple builds. They'll still be available with --enable-css-shaders in build-webkit (or by hardcoding yourself). We'll turn them back on soon.
Comment 1 Dean Jackson 2012-03-22 17:17:00 PDT
<rdar://problem/11092888>
Comment 2 Dean Jackson 2012-03-22 17:30:33 PDT
In fact, I'll move stuff out of FeatureDefines.xcconfig and put the ENABLE flag in Platform.h. This makes it hard to enable from the command line, but is a nicer long term solution.
Comment 3 Dean Jackson 2012-03-23 07:24:21 PDT
Created attachment 133480 [details]
Patch
Comment 4 Dean Jackson 2012-03-23 07:26:23 PDT
We could have used the runtime flag, but that would still mean the CSS parser accepts the shader input. That has the side effect that people can't author content that degrades nicely.

I'd like to hear from Alex before landing this.
Comment 5 Alexandru Chiculita 2012-03-23 09:29:23 PDT
(In reply to comment #4)
> We could have used the runtime flag, but that would still mean the CSS parser accepts the shader input. That has the side effect that people can't author content that degrades nicely.
> 
> I'd like to hear from Alex before landing this.

There is some code that disables parsing for CSS custom() function at runtime.

Here is an extract from http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/css/CSSParser.cpp in function  PassRefPtr<CSSValueList> CSSParser::parseFilter()

#if ENABLE(CSS_SHADERS)
            if (filterType == WebKitCSSFilterValue::CustomFilterOperation) {
                // Make sure parsing fails if custom filters are disabled.
                if (Document* document = findDocument()) {
                    Settings* settings = document->settings();
                    if (!settings || !settings->isCSSCustomFilterEnabled())
                        return 0;
                }
...

Anyway I think it is a good security measure to disable the compile time flag for now.
Comment 6 Simon Fraser (smfr) 2012-03-23 13:03:02 PDT
Comment on attachment 133480 [details]
Patch

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

> Tools/ChangeLog:6
> +        https://bugs.webkit.org/show_bug.cgi?id=81996
> +
> +        Reviewed by NOBODY (OOPS!).

This could use some explanation.
Comment 7 Dean Jackson 2012-03-23 13:20:36 PDT
http://trac.webkit.org/changeset/111893