Bug 71401

Summary: [CSS Shaders] Use CSS transform parsing code within CSS Shader
Product: WebKit Reporter: Dean Jackson <dino>
Component: CSSAssignee: Alexandru Chiculita <achicu>
Status: RESOLVED FIXED    
Severity: Normal CC: achicu, cmarcelo, cmarrin, dglazkov, jberlin, jnetterfield, macpherson, menard, michelangelo, peter+ews, simon.fraser, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 71392, 94728    
Attachments:
Description Flags
Patch
none
Patch V1
none
Patch V2
peter+ews: commit-queue-
Archive of layout-test-results from gce-cr-linux-06
none
Patch V3 dino: review+, dino: commit-queue-

Description Dean Jackson 2011-11-02 14:07:54 PDT
Shaders use transforms as a parameter value. We need slight changes to the parseTransform code so that it doesn't expect to be called as an entire property.
Comment 1 Radar WebKit Bug Importer 2011-11-02 14:08:17 PDT
<rdar://problem/10385857>
Comment 2 Joshua Netterfield 2012-08-23 15:32:59 PDT
*** Bug 94726 has been marked as a duplicate of this bug. ***
Comment 3 Joshua Netterfield 2012-08-24 07:19:07 PDT
Created attachment 160418 [details]
Patch
Comment 4 Joshua Netterfield 2012-08-24 07:20:19 PDT
Comment on attachment 160418 [details]
Patch

Wrong bug.
Comment 5 Alexandru Chiculita 2012-08-24 17:01:52 PDT
Created attachment 160523 [details]
Patch V1
Comment 6 Alexandru Chiculita 2012-08-24 17:03:54 PDT
The style checker gots confused when returning a PassRefPtr:

Source/WebCore/css/StyleResolver.cpp:5257:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]

PassRefPtr<CustomFilterParameter> StyleResolver::parseCustomFilterTransformParameter(const String& name, CSSValueList* values)

Source/WebCore/css/StyleResolver.cpp:5266:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]

PassRefPtr<CustomFilterParameter> StyleResolver::parseCustomFilterParameter(const String& name, CSSValue* parameterValue)
Comment 7 Alexandru Chiculita 2012-08-24 17:47:59 PDT
Created attachment 160532 [details]
Patch V2

Rebased
Comment 8 WebKit Review Bot 2012-08-24 18:25:12 PDT
Attachment 160532 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1
Source/WebCore/css/StyleResolver.cpp:5264:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
Source/WebCore/css/StyleResolver.cpp:5273:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
Total errors found: 2 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Peter Beverloo (cr-android ews) 2012-08-24 19:49:17 PDT
Comment on attachment 160532 [details]
Patch V2

Attachment 160532 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/13601298
Comment 10 WebKit Review Bot 2012-08-24 20:01:25 PDT
Comment on attachment 160532 [details]
Patch V2

Attachment 160532 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13597353

New failing tests:
css3/filters/custom/effect-custom-transform-parameters.html
css3/filters/custom/custom-filter-property-computed-style.html
Comment 11 WebKit Review Bot 2012-08-24 20:01:30 PDT
Created attachment 160548 [details]
Archive of layout-test-results from gce-cr-linux-06

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-06  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 12 Alexandru Chiculita 2012-08-28 16:55:29 PDT
Created attachment 161092 [details]
Patch V3
Comment 13 WebKit Review Bot 2012-08-28 16:58:58 PDT
Attachment 161092 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1
Source/WebCore/css/StyleResolver.cpp:5265:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
Source/WebCore/css/StyleResolver.cpp:5274:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Alexandru Chiculita 2012-08-28 17:00:32 PDT
(In reply to comment #13)
> Attachment 161092 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css3..." exit_code: 1
> Source/WebCore/css/StyleResolver.cpp:5265:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
> Source/WebCore/css/StyleResolver.cpp:5274:  Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]
> Total errors found: 2 in 21 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

I've added https://bugs.webkit.org/show_bug.cgi?id=95266 to track the style checker issue. That is a return value and not a local variable.
Comment 15 Alexandru Chiculita 2012-08-28 17:01:52 PDT
Comment on attachment 161092 [details]
Patch V3

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

>> Source/WebCore/css/StyleResolver.cpp:5265
>> +PassRefPtr<CustomFilterParameter> StyleResolver::parseCustomFilterTransformParameter(const String& name, CSSValueList* values)
> 
> Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]

The style message seems to be invalid. I've added https://bugs.webkit.org/show_bug.cgi?id=95266 to track it.

>> Source/WebCore/css/StyleResolver.cpp:5274
>> +PassRefPtr<CustomFilterParameter> StyleResolver::parseCustomFilterParameter(const String& name, CSSValue* parameterValue)
> 
> Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html).  [readability/pass_ptr] [5]

The style message seems to be invalid. I've added https://bugs.webkit.org/show_bug.cgi?id=95266 to track it.
Comment 16 Dean Jackson 2012-08-28 17:27:22 PDT
Comment on attachment 161092 [details]
Patch V3

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

> Source/WebCore/css/StyleResolver.cpp:5297
> +        return parseCustomFilterNumberParamter(name, values);

Seems we missed the typo in the name of this method. We might as well fix it now.

> Source/WebCore/css/StyleResolver.h:267
>      PassRefPtr<CustomFilterParameter> parseCustomFilterNumberParamter(const String& name, CSSValueList*);

See above - typo here and since we're fixing above and below it...

> Source/WebCore/platform/graphics/filters/FECustomFilter.cpp:277
> +        // The viewport is a box with the size of 1 unit, so we are scalling up here to make sure that translations happen using real pixels

typo pixel not pixels
Comment 17 Alexandru Chiculita 2012-08-28 18:58:29 PDT
(In reply to comment #16)
> (From update of attachment 161092 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=161092&action=review
> 
> > Source/WebCore/css/StyleResolver.cpp:5297
> > +        return parseCustomFilterNumberParamter(name, values);
> 
> Seems we missed the typo in the name of this method. We might as well fix it now.
> 
Nice catch.

> > Source/WebCore/css/StyleResolver.h:267
> >      PassRefPtr<CustomFilterParameter> parseCustomFilterNumberParamter(const String& name, CSSValueList*);
> 
> See above - typo here and since we're fixing above and below it...
> 
> > Source/WebCore/platform/graphics/filters/FECustomFilter.cpp:277
> > +        // The viewport is a box with the size of 1 unit, so we are scalling up here to make sure that translations happen using real pixels
> 
> typo pixel not pixels

Thanks, Dean!
Comment 18 Alexandru Chiculita 2012-08-29 13:55:28 PDT
Landed in http://trac.webkit.org/changeset/127046 .
Comment 19 Jessie Berlin 2012-08-29 17:01:18 PDT
(In reply to comment #18)
> Landed in http://trac.webkit.org/changeset/127046 .

This immediately started failing on the Apple Lion Debug WK1 bots:
http://build.webkit.org/results/Apple%20Lion%20Debug%20WK1%20(Tests)/r127046%20(2347)/results.html

Please investigate. If you can't fix it, please file a bug and add it to test expectations.
Comment 20 Dean Jackson 2012-08-29 17:15:42 PDT
This is an impressively small image failure, but it is consistent. Adding the expectation.
Comment 21 Alexandru Chiculita 2012-08-29 17:35:06 PDT
(In reply to comment #20)
> This is an impressively small image failure, but it is consistent. Adding the expectation.

I've added the following patch:
https://bugs.webkit.org/show_bug.cgi?id=95407
Comment 22 Dean Jackson 2012-08-29 17:39:18 PDT
expectations updated in http://trac.webkit.org/changeset/127068
Comment 23 Alexandru Chiculita 2012-08-29 17:41:23 PDT
(In reply to comment #22)
> expectations updated in http://trac.webkit.org/changeset/127068

http://trac.webkit.org/changeset/127069 :)
Comment 24 Arvid Nilsson 2012-09-04 17:32:22 PDT
*** Bug 94726 has been marked as a duplicate of this bug. ***