WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94020
[CSS Shaders] Change the default compositing mode and the default CSS value for <fragmentShader>
https://bugs.webkit.org/show_bug.cgi?id=94020
Summary
[CSS Shaders] Change the default compositing mode and the default CSS value f...
Max Vujovic
Reported
2012-08-14 13:58:26 PDT
The spec has changed: - The default compositing mode is now source-atop, not source-over. - The default value for fragmentShader is now "mix(<default-fragment-shader> normal source-atop)", not "<default-fragment-shader>".
https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#fragmentShader-attribute
Attachments
Patatch not for formal review
(33.13 KB, patch)
2012-10-29 13:55 PDT
,
Michelangelo De Simone
no flags
Details
Formatted Diff
Diff
Patch
(52.43 KB, patch)
2012-10-29 16:09 PDT
,
Michelangelo De Simone
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Michelangelo De Simone
Comment 1
2012-10-29 13:55:16 PDT
Created
attachment 171304
[details]
Patatch not for formal review
Max Vujovic
Comment 2
2012-10-29 14:06:54 PDT
Comment on
attachment 171304
[details]
Patatch not for formal review Thanks for the patch! A couple of comments: View in context:
https://bugs.webkit.org/attachment.cgi?id=171304&action=review
> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:924 > + if (program->programType() == PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE) {
To avoid nesting this if statement, we could do something like: if (!program->fragmentShader()) { shadersList->append(cssValuePool().createIdentifierValue(CSSValueNone)); } else if (program->programType() == PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE) { ... } else { shadersList->append(program->fragmentShader()->cssValue()); } It looks prettier, but it might be less clear than the original, so I'm not sure.
> Source/WebCore/css/StyleResolver.cpp:4780 > + unsigned shadersListLength = shadersList->length();
Don't extract this into a local var unless you use it twice.
> Source/WebCore/css/StyleResolver.cpp:4788 > + programType = PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE;
Set this default value when you declare the local var programType.
> LayoutTests/css3/filters/resources/empty-shader.fs:-1 > -void main()
Nice. It's good we don't need this shader anymore.
WebKit Review Bot
Comment 3
2012-10-29 14:47:43 PDT
Comment on
attachment 171304
[details]
Patatch not for formal review
Attachment 171304
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/14627279
New failing tests: css3/filters/custom/custom-filter-property-computed-style.html
Michelangelo De Simone
Comment 4
2012-10-29 14:50:44 PDT
(In reply to
comment #2
)
> > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:924 > > + if (program->programType() == PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE) { > To avoid nesting this if statement, we could do something like: > > if (!program->fragmentShader()) { > shadersList->append(cssValuePool().createIdentifierValue(CSSValueNone)); > } else if (program->programType() == PROGRAM_TYPE_BLENDS_ELEMENT_TEXTURE) { > ... > } else { > shadersList->append(program->fragmentShader()->cssValue()); > } > > It looks prettier, but it might be less clear than the original, so I'm not sure.
Neither am I. I'll leave it as it is for now, waiting for other feedbacks.
> > Source/WebCore/css/StyleResolver.cpp:4780 > > + unsigned shadersListLength = shadersList->length(); > Don't extract this into a local var unless you use it twice.
It is indeed (assert and branch), that's the reason why I changed it.
> Set this default value when you declare the local var programType.
Oops, my fault, I just forgot it there.:)
> > LayoutTests/css3/filters/resources/empty-shader.fs:-1 > > -void main() > Nice. It's good we don't need this shader anymore.
Getting rid of old stuff is always nice.:)
Michelangelo De Simone
Comment 5
2012-10-29 16:09:16 PDT
Created
attachment 171332
[details]
Patch
WebKit Review Bot
Comment 6
2012-10-30 04:24:11 PDT
Comment on
attachment 171332
[details]
Patch Clearing flags on attachment: 171332 Committed
r132892
: <
http://trac.webkit.org/changeset/132892
>
WebKit Review Bot
Comment 7
2012-10-30 04:24:15 PDT
All reviewed patches have been landed. Closing bug.
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