WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71443
[Part 3] Parse the custom() function in -webkit-filter: parse the 3d-transforms parameters
https://bugs.webkit.org/show_bug.cgi?id=71443
Summary
[Part 3] Parse the custom() function in -webkit-filter: parse the 3d-transfor...
Alexandru Chiculita
Reported
2011-11-03 01:18:02 PDT
Add parsing code for the the 3d-transforms parameters.
Attachments
Patch
(16.20 KB, patch)
2012-08-15 15:14 PDT
,
Michelangelo De Simone
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cr-linux-04
(1.40 MB, application/zip)
2012-08-15 16:06 PDT
,
WebKit Review Bot
no flags
Details
Patch
(18.54 KB, patch)
2012-08-15 17:46 PDT
,
Michelangelo De Simone
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cr-linux-07
(508.70 KB, application/zip)
2012-08-15 18:30 PDT
,
WebKit Review Bot
no flags
Details
Patch
(25.74 KB, patch)
2012-08-16 14:51 PDT
,
Michelangelo De Simone
no flags
Details
Formatted Diff
Diff
Patch
(25.96 KB, patch)
2012-08-16 15:40 PDT
,
Michelangelo De Simone
no flags
Details
Formatted Diff
Diff
Patch
(17.13 KB, patch)
2012-08-17 00:20 PDT
,
Taiju Tsuiki
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Michelangelo De Simone
Comment 1
2012-08-15 15:14:52 PDT
Created
attachment 158647
[details]
Patch
Dirk Schulze
Comment 2
2012-08-15 15:33:30 PDT
Comment on
attachment 158647
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158647&action=review
> Source/WebCore/css/CSSParser.cpp:2325 > + RefPtr<CSSValue> transformValue = parseTransform(m_valueList.get()); > + if (transformValue) { > + addProperty(propId, transformValue.release(), important);
Can we avoid passing a boolean? It is also not obvious from the name why we care about the comma. Anyway, I would rather avoid this.
> Source/WebCore/css/CSSParser.cpp:7567 > + if (arg->unit == CSSParserValue::Function && arg->function) > + parameterValue = parseTransform(argsList, true);
It looks like you are assuming that every function is a transform and then you parse it as a transform, that doesn't look quite right. What about the mat2,3,4() functions? Or texture() or array()?
> Source/WebCore/css/CSSParser.cpp:7574 > + // TODO: Implement other parameters types parsing. > + // textures:
https://bugs.webkit.org/show_bug.cgi?id=71442
> + // mat2, mat3, mat4:
https://bugs.webkit.org/show_bug.cgi?id=71444
> + RefPtr<CSSValueList> paramValueList = CSSValueList::createSpaceSeparated(); > + while ((arg = argsList->current())) { > + // If we hit a comma it means we finished this parameter's values.
The others are functions as well, how do you differ?
WebKit Review Bot
Comment 3
2012-08-15 16:06:53 PDT
Comment on
attachment 158647
[details]
Patch
Attachment 158647
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13501825
New failing tests: css3/filters/custom/custom-filter-property-parsing.html
WebKit Review Bot
Comment 4
2012-08-15 16:06:57 PDT
Created
attachment 158653
[details]
Archive of layout-test-results from gce-cr-linux-04 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-04 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Michelangelo De Simone
Comment 5
2012-08-15 17:46:33 PDT
Created
attachment 158672
[details]
Patch
WebKit Review Bot
Comment 6
2012-08-15 18:30:53 PDT
Comment on
attachment 158672
[details]
Patch
Attachment 158672
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13517166
New failing tests: css3/filters/custom/custom-filter-property-parsing.html
WebKit Review Bot
Comment 7
2012-08-15 18:30:58 PDT
Created
attachment 158680
[details]
Archive of layout-test-results from gce-cr-linux-07 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-07 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Michelangelo De Simone
Comment 8
2012-08-16 14:51:00 PDT
Created
attachment 158909
[details]
Patch
Michelangelo De Simone
Comment 9
2012-08-16 14:54:48 PDT
(In reply to
comment #2
)
> > Source/WebCore/css/CSSParser.cpp:2325 > > + RefPtr<CSSValue> transformValue = parseTransform(m_valueList.get()); > > + if (transformValue) { > > + addProperty(propId, transformValue.release(), important); > > Can we avoid passing a boolean? It is also not obvious from the name why we care about the comma. Anyway, I would rather avoid this.
Done. Present code has been slightly refactored, the parseTransform() method has been split in two to improve code reuse.
> > Source/WebCore/css/CSSParser.cpp:7567 > > + if (arg->unit == CSSParserValue::Function && arg->function) > > + parameterValue = parseTransform(argsList, true); > > It looks like you are assuming that every function is a transform and then you parse it as a transform, that doesn't look quite right. What about the mat2,3,4() functions? Or texture() or array()?
I've added a comment to reflect this: once we will implement the other functions (matN, array, texture), we shall branch for transform at the end of the future if-else-if block. In shall be something like this: if (arg->unit == CSSParserValue::Function && arg->function) { if (isMatN())... else if (isArray())... else if (isTexture()).... else [it might be a transform]..
Dirk Schulze
Comment 10
2012-08-16 15:36:54 PDT
Comment on
attachment 158909
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158909&action=review
Patch looks good to me. Just some snippets.
> Source/WebCore/css/CSSParser.cpp:7579 > // TODO: Implement other parameters types parsing. > // textures:
https://bugs.webkit.org/show_bug.cgi?id=71442
> - // 3d-transforms:
https://bugs.webkit.org/show_bug.cgi?id=71443
> // mat2, mat3, mat4:
https://bugs.webkit.org/show_bug.cgi?id=71444
> - RefPtr<CSSValueList> paramValueList = CSSValueList::createSpaceSeparated(); > - while ((arg = argsList->current())) { > - // If we hit a comma it means we finished this parameter's values. > - if (isComma(arg)) > - break; > - if (!validUnit(arg, FNumber, CSSStrictMode)) > + // array:
https://bugs.webkit.org/show_bug.cgi?id=94226
> + // 3d-transform shall be the last to be checked > + if (arg->unit == CSSParserValue::Function && arg->function) > + parameterValue = parseCustomFilterTransform(argsList);
Please move the comment in to this if statement, I think you want to check all functions in the same if statement.
Michelangelo De Simone
Comment 11
2012-08-16 15:40:09 PDT
Created
attachment 158924
[details]
Patch
WebKit Review Bot
Comment 12
2012-08-16 19:04:18 PDT
Comment on
attachment 158924
[details]
Patch Clearing flags on attachment: 158924 Committed
r125845
: <
http://trac.webkit.org/changeset/125845
>
WebKit Review Bot
Comment 13
2012-08-16 19:04:25 PDT
All reviewed patches have been landed. Closing bug.
Taiju Tsuiki
Comment 14
2012-08-17 00:20:14 PDT
Reopening to attach new patch.
Taiju Tsuiki
Comment 15
2012-08-17 00:20:21 PDT
Created
attachment 159022
[details]
Patch
Taiju Tsuiki
Comment 16
2012-08-17 00:21:50 PDT
Comment on
attachment 159022
[details]
Patch Sorry, I might upload a patch to wrong 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