WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
72378
[CSSShaders] Implement the style cached resources and computed style for the shader urls
https://bugs.webkit.org/show_bug.cgi?id=72378
Summary
[CSSShaders] Implement the style cached resources and computed style for the ...
Alexandru Chiculita
Reported
2011-11-15 04:47:30 PST
This patch will add the CustomFilterOperation and add the code in CSSStyleSelector for creating it. The only parsed arguments will be the urls for the shaders. Also it should add code for the Computed style, so that we can test the functionality.
Attachments
Patch V1
(62.43 KB, patch)
2011-11-15 07:15 PST
,
Alexandru Chiculita
dino
: review-
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch V2
(62.43 KB, patch)
2011-11-15 10:09 PST
,
Alexandru Chiculita
dino
: review+
dino
: commit-queue-
Details
Formatted Diff
Diff
Patch V3
(62.26 KB, patch)
2011-11-15 10:56 PST
,
Alexandru Chiculita
no flags
Details
Formatted Diff
Diff
Patch for landing
(64.13 KB, patch)
2011-11-15 22:34 PST
,
Alexandru Chiculita
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Alexandru Chiculita
Comment 1
2011-11-15 07:15:48 PST
Created
attachment 115163
[details]
Patch V1
WebKit Review Bot
Comment 2
2011-11-15 08:11:33 PST
Comment on
attachment 115163
[details]
Patch V1
Attachment 115163
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10484359
Alexandru Chiculita
Comment 3
2011-11-15 10:09:47 PST
Created
attachment 115190
[details]
Patch V2 Fixed the Chromium gypi file
Dean Jackson
Comment 4
2011-11-15 10:30:25 PST
Comment on
attachment 115163
[details]
Patch V1 View in context:
https://bugs.webkit.org/attachment.cgi?id=115163&action=review
r- up front for the chromium build issue, otherwise looks good. I wonder if we should retitle the bug because it now does a lot more than just computed style.
> LayoutTests/css3/filters/script-tests/custom-filter-property-computed-style.js:1 > +description("Test the parsing of the custom() function of the -webkit-filter property.");
This needs updating.
> LayoutTests/css3/filters/script-tests/custom-filter-property-computed-style.js:82 > +testFilterRule("Custom with vertex shader", > + "custom(url(vertex.shader))", "custom(url(vertex.shader))"); > + > +testFilterRule("Custom with fragment shader", > + "custom(none url(fragment.shader))", "custom(none url(fragment.shader))"); > + > +testFilterRule("Custom with both shaders", > + "custom(url(vertex.shader) url(fragment.shader))", "custom(url(vertex.shader) url(fragment.shader))"); > + > +testFilterRule("Multiple with fragment shader", > + "grayscale() custom(none url(fragment.shader)) sepia()", "grayscale(1) custom(none url(fragment.shader)) sepia(1)", > + ["WebKitCSSFilterValue.CSS_FILTER_GRAYSCALE", > + "WebKitCSSFilterValue.CSS_FILTER_CUSTOM", > + "WebKitCSSFilterValue.CSS_FILTER_SEPIA"], > + ["grayscale(1)", > + "custom(none url(fragment.shader))", > + "sepia(1)"]);
Nit: some indentation differences up there.
> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:66 > +#include <algorithm>
Is there a reason for this?
> Source/WebCore/css/CSSStyleSelector.h:211 > + StyleShader* styleShader(CSSValue*); > + StyleShader* cachedOrPendingFromValue(WebKitCSSShaderValue*);
I wonder if this should be named cachedOrPendingStyleShaderFromValue ?
> Source/WebCore/rendering/style/StyleShader.h:57 > + bool m_isCachedShader:1; > + bool m_isPendingShader:1;
I think we typically separate the : and num with spaces.
Dean Jackson
Comment 5
2011-11-15 10:31:59 PST
oops! patch was updated as I was reviewing :)
Dean Jackson
Comment 6
2011-11-15 10:32:59 PST
Comment on
attachment 115190
[details]
Patch V2 r+ with the changes from the previous review. I do think the bug needs a better title.
Alexandru Chiculita
Comment 7
2011-11-15 10:49:23 PST
I will post a new patch in a few moments.
> > LayoutTests/css3/filters/script-tests/custom-filter-property-computed-style.js:1 > > +description("Test the parsing of the custom() function of the -webkit-filter property."); > > This needs updating.
Ok.
> > > LayoutTests/css3/filters/script-tests/custom-filter-property-computed-style.js:82 > > +testFilterRule("Custom with vertex shader", > > + "custom(url(vertex.shader))", "custom(url(vertex.shader))"); > > + > > +testFilterRule("Custom with fragment shader", > > + "custom(none url(fragment.shader))", "custom(none url(fragment.shader))"); > > + > > +testFilterRule("Custom with both shaders", > > + "custom(url(vertex.shader) url(fragment.shader))", "custom(url(vertex.shader) url(fragment.shader))"); > > + > > +testFilterRule("Multiple with fragment shader", > > + "grayscale() custom(none url(fragment.shader)) sepia()", "grayscale(1) custom(none url(fragment.shader)) sepia(1)", > > + ["WebKitCSSFilterValue.CSS_FILTER_GRAYSCALE", > > + "WebKitCSSFilterValue.CSS_FILTER_CUSTOM", > > + "WebKitCSSFilterValue.CSS_FILTER_SEPIA"], > > + ["grayscale(1)", > > + "custom(none url(fragment.shader))", > > + "sepia(1)"]); > Nit: some indentation differences up there.
Ok.
> > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:66 > > +#include <algorithm> > > Is there a reason for this?
Good catch. I will remove it. I've actually took the big patch posted on the #71446 and deleted some code. It was used for std::sort, to sort the parameters by name. Sorting the parameters is not really required, but it makes testing easier.
> > Source/WebCore/css/CSSStyleSelector.h:211 > > + StyleShader* styleShader(CSSValue*); > > + StyleShader* cachedOrPendingFromValue(WebKitCSSShaderValue*); > > I wonder if this should be named cachedOrPendingStyleShaderFromValue ?
Ok. cachedOrPendingStyleShaderFromValue makes sense.
> > Source/WebCore/rendering/style/StyleShader.h:57 > > + bool m_isCachedShader:1; > > + bool m_isPendingShader:1; > > I think we typically separate the : and num with spaces.
Ok. That was copied from StyleImage.h, so I thought it was correct. It seems like both styles are used in WebKit's code (ie. CSSValue.h uses space), so I assume that the new style is to use spaces.
Alexandru Chiculita
Comment 8
2011-11-15 10:56:42 PST
Created
attachment 115202
[details]
Patch V3
Dean Jackson
Comment 9
2011-11-15 11:44:26 PST
(In reply to
comment #7
)
> > > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:66 > > > +#include <algorithm> > > > > Is there a reason for this? > Good catch. I will remove it. I've actually took the big patch posted on the #71446 and deleted some code. It was used for std::sort, to sort the parameters by name. Sorting the parameters is not really required, but it makes testing easier.
Cool.
> > > Source/WebCore/rendering/style/StyleShader.h:57 > > > + bool m_isCachedShader:1; > > > + bool m_isPendingShader:1; > > > > I think we typically separate the : and num with spaces. > > Ok. That was copied from StyleImage.h, so I thought it was correct. It seems like both styles are used in WebKit's code (ie. CSSValue.h uses space), so I assume that the new style is to use spaces.
Yeah, I'm not sure myself.
Alexandru Chiculita
Comment 10
2011-11-15 12:05:40 PST
Is everything ok with the last patch? Can you r+ and cq+ please?
Dean Jackson
Comment 11
2011-11-15 12:07:35 PST
(In reply to
comment #10
)
> Is everything ok with the last patch? Can you r+ and cq+ please?
Yep, doing so now.
Dean Jackson
Comment 12
2011-11-15 12:07:58 PST
Comment on
attachment 115202
[details]
Patch V3 View in context:
https://bugs.webkit.org/attachment.cgi?id=115202&action=review
> Source/WebCore/css/CSSStyleSelector.cpp:5519 > + operations.operations().append(operation);
Reading this line makes my head hurt :) I wonder if we should rename the operations() accessor on FilterOperations. What do you think? (or we could put the append method on FilterOperations)
Alexandru Chiculita
Comment 13
2011-11-15 12:21:17 PST
(In reply to
comment #12
)
> (From update of
attachment 115202
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=115202&action=review
> > > Source/WebCore/css/CSSStyleSelector.cpp:5519 > > + operations.operations().append(operation); > > Reading this line makes my head hurt :) I wonder if we should rename the operations() accessor on FilterOperations. What do you think? (or we could put the append method on FilterOperations)
It looks like there's a lot of operations.operations().append in CSSStyleSelector.cpp. CSS Transforms have the same issue. Yes adding an append() method on the FilterOperations sound great. Also, operationAt() might be useful.
Dean Jackson
Comment 14
2011-11-15 12:39:36 PST
(In reply to
comment #13
)
> (In reply to
comment #12
) > > (From update of
attachment 115202
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=115202&action=review
> > > > > Source/WebCore/css/CSSStyleSelector.cpp:5519 > > > + operations.operations().append(operation); > > > > Reading this line makes my head hurt :) I wonder if we should rename the operations() accessor on FilterOperations. What do you think? (or we could put the append method on FilterOperations) > > It looks like there's a lot of operations.operations().append in CSSStyleSelector.cpp. CSS Transforms have the same issue. > > Yes adding an append() method on the FilterOperations sound great. Also, operationAt() might be useful.
OK. I filed
https://bugs.webkit.org/show_bug.cgi?id=72406
Radar WebKit Bug Importer
Comment 15
2011-11-15 12:40:23 PST
<
rdar://problem/10450040
>
WebKit Review Bot
Comment 16
2011-11-15 13:01:39 PST
Comment on
attachment 115202
[details]
Patch V3 Rejecting
attachment 115202
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: n/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc First, rewinding head to replay your work on top of it... Fast-forwarded master to refs/remotes/origin/master. Updating chromium port dependencies using gclient... ________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' ________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium' Updating webkit projects from gyp files... Full output:
http://queues.webkit.org/results/10310664
Adam Barth
Comment 17
2011-11-15 13:19:44 PST
Looks like the patch didn't apply. Not sure why the bot produced a junky error message.
Alexandru Chiculita
Comment 18
2011-11-15 22:34:20 PST
Created
attachment 115323
[details]
Patch for landing
Alexandru Chiculita
Comment 19
2011-11-15 22:35:24 PST
(In reply to
comment #18
)
> Created an attachment (id=115323) [details] > Patch for landing
I've rebased the patch.
WebKit Review Bot
Comment 20
2011-11-15 23:51:20 PST
Comment on
attachment 115323
[details]
Patch for landing Clearing flags on attachment: 115323 Committed
r100416
: <
http://trac.webkit.org/changeset/100416
>
WebKit Review Bot
Comment 21
2011-11-15 23:51:27 PST
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