WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
93405
[CSS Shaders] Invalid shaders should act as pass-through filters
https://bugs.webkit.org/show_bug.cgi?id=93405
Summary
[CSS Shaders] Invalid shaders should act as pass-through filters
Alexandru Chiculita
Reported
2012-08-07 15:56:37 PDT
If the CSS Shader fails to compile the FECustomFilter should act as a pass-through. Right now garbage/uninitialized memory is shown instead.
Attachments
Patch V1
(8.86 KB, patch)
2012-08-07 18:14 PDT
,
Alexandru Chiculita
no flags
Details
Formatted Diff
Diff
Patch V2
(8.86 KB, patch)
2012-08-07 18:16 PDT
,
Alexandru Chiculita
dino
: review+
Details
Formatted Diff
Diff
Patch V3
(11.37 KB, patch)
2012-08-08 16:00 PDT
,
Alexandru Chiculita
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alexandru Chiculita
Comment 1
2012-08-07 18:14:39 PDT
Created
attachment 157067
[details]
Patch V1 No CQ+ because this is going to be updated to unpremultiplied calls after 92758 lands.
Alexandru Chiculita
Comment 2
2012-08-07 18:16:31 PDT
Created
attachment 157068
[details]
Patch V2 Removed empty line.
Dean Jackson
Comment 3
2012-08-07 18:51:57 PDT
Comment on
attachment 157068
[details]
Patch V2 View in context:
https://bugs.webkit.org/attachment.cgi?id=157068&action=review
> LayoutTests/css3/filters/custom/invalid-custom-filter-shader-expected.html:10 > + function runTest() > + { > + // We need to run the tests after the downloading succeeded or fails. > + if (window.testRunner) > + window.testRunner.notifyDone(); > + }
Why do we need this in the ref test? (I don't really understand how this works - you don't wait here)
> Source/WebCore/platform/graphics/filters/FECustomFilter.cpp:130 > +void FECustomFilter::cleanupShaderResult()
I don't like the name "cleanup" (it's actually two words, so would be "cleanUp"). Maybe "reset" or "clear"? Sorry, I don't have a good suggestion.
> Source/WebCore/platform/graphics/filters/FECustomFilter.cpp:142 > +bool FECustomFilter::tryToApplyShader()
I don't like this name much either :) Saying "try to" is strange. Maybe just "applyShader"? That would make the platformApplySoftware into something like: if (!applyShader()) clearShaderResult();
Alexandru Chiculita
Comment 4
2012-08-08 09:38:41 PDT
(In reply to
comment #3
)
> (From update of
attachment 157068
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=157068&action=review
> > > LayoutTests/css3/filters/custom/invalid-custom-filter-shader-expected.html:10 > > + function runTest() > > + { > > + // We need to run the tests after the downloading succeeded or fails. > > + if (window.testRunner) > > + window.testRunner.notifyDone(); > > + } > > Why do we need this in the ref test? (I don't really understand how this works - you don't wait here)
I think we need it so that the images are all loaded by the time the snapshot is taken. I forgot the waitUntilDone call and it seems it worked without it. I suppose it would have made the test flacky.
> > > Source/WebCore/platform/graphics/filters/FECustomFilter.cpp:130 > > +void FECustomFilter::cleanupShaderResult() > > I don't like the name "cleanup" (it's actually two words, so would be "cleanUp"). Maybe "reset" or "clear"? Sorry, I don't have a good suggestion. > > > Source/WebCore/platform/graphics/filters/FECustomFilter.cpp:142 > > +bool FECustomFilter::tryToApplyShader() > > I don't like this name much either :) Saying "try to" is strange. > > Maybe just "applyShader"? That would make the platformApplySoftware into something like: > > if (!applyShader()) > clearShaderResult();
Thanks, will use that. Thanks for the review!
Alexandru Chiculita
Comment 5
2012-08-08 16:00:56 PDT
Created
attachment 157317
[details]
Patch V3 Posting it back for review because I've added more code for Safari Mac. It seems like the generated expected result had slightly different colors. I suppose that's coming from the FilterEffect data conversion back to an ImageBuffer. I've added a "grayscale(0)" effect on the images in the expected result, just to trigger the same kind of errors on the generated image.
WebKit Review Bot
Comment 6
2012-08-08 17:56:29 PDT
Comment on
attachment 157317
[details]
Patch V3 Clearing flags on attachment: 157317 Committed
r125128
: <
http://trac.webkit.org/changeset/125128
>
WebKit Review Bot
Comment 7
2012-08-08 17:56:33 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