Bug 126148

Summary: Support <box> values computed style for 'clip-path' property
Product: WebKit Reporter: Dirk Schulze <krit>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, dino, d-r, dstockwell, esprehn+autocc, fmalita, glenn, gyuyoung.kim, kling, kondapallykalyan, macpherson, menard, pdr, rniwa, schenney, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 126147    
Bug Blocks: 126207    
Attachments:
Description Flags
Patch
none
Patch
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
none
Patch
simon.fraser: review+, simon.fraser: commit-queue-
Patch for landing none

Description Dirk Schulze 2013-12-22 23:34:13 PST
Support <box> values computed style for 'clip-path' property
Comment 1 Dirk Schulze 2013-12-25 14:19:23 PST
Created attachment 220001 [details]
Patch
Comment 2 WebKit Commit Bot 2013-12-25 14:22:02 PST
Attachment 220001 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt', u'LayoutTests/fast/masking/parsing-clip-path-shape.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/BasicShapeFunctions.cpp', u'Source/WebCore/css/CSSComputedStyleDeclaration.cpp', u'Source/WebCore/css/DeprecatedStyleBuilder.cpp', u'Source/WebCore/rendering/ClipPathOperation.h', u'Source/WebCore/rendering/shapes/ShapeInfo.h', u'Source/WebCore/rendering/style/BasicShapes.cpp', u'Source/WebCore/rendering/style/BasicShapes.h', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/rendering/ClipPathOperation.h:46:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/rendering/ClipPathOperation.h:47:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/rendering/ClipPathOperation.h:159:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dirk Schulze 2013-12-25 14:47:28 PST
Created attachment 220003 [details]
Patch

Fix styling
Comment 4 WebKit Commit Bot 2013-12-25 14:49:33 PST
Attachment 220003 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt', u'LayoutTests/fast/masking/parsing-clip-path-shape.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/BasicShapeFunctions.cpp', u'Source/WebCore/css/CSSComputedStyleDeclaration.cpp', u'Source/WebCore/css/DeprecatedStyleBuilder.cpp', u'Source/WebCore/page/animation/CSSPropertyAnimation.cpp', u'Source/WebCore/rendering/ClipPathOperation.h', u'Source/WebCore/rendering/RenderLayer.cpp', u'Source/WebCore/rendering/shapes/ShapeInfo.h', u'Source/WebCore/rendering/style/BasicShapes.cpp', u'Source/WebCore/rendering/style/BasicShapes.h', u'Source/WebCore/rendering/svg/SVGRenderingContext.cpp', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/rendering/ClipPathOperation.h:158:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Dirk Schulze 2013-12-25 14:57:19 PST
(In reply to comment #4)
> Attachment 220003 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt', u'LayoutTests/fast/masking/parsing-clip-path-shape.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/BasicShapeFunctions.cpp', u'Source/WebCore/css/CSSComputedStyleDeclaration.cpp', u'Source/WebCore/css/DeprecatedStyleBuilder.cpp', u'Source/WebCore/page/animation/CSSPropertyAnimation.cpp', u'Source/WebCore/rendering/ClipPathOperation.h', u'Source/WebCore/rendering/RenderLayer.cpp', u'Source/WebCore/rendering/shapes/ShapeInfo.h', u'Source/WebCore/rendering/style/BasicShapes.cpp', u'Source/WebCore/rendering/style/BasicShapes.h', u'Source/WebCore/rendering/svg/SVGRenderingContext.cpp', '--commit-queue']" exit_code: 1
> ERROR: Source/WebCore/rendering/ClipPathOperation.h:158:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
> Total errors found: 1 in 14 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

Ok, that is funny. One message wants me to do one thing, after that I shall revert the change :)

I'd land with the brace on its own line.
Comment 6 Build Bot 2013-12-25 17:20:44 PST
Comment on attachment 220003 [details]
Patch

Attachment 220003 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5731827130040320

New failing tests:
css3/masking/clip-path-animation.html
Comment 7 Build Bot 2013-12-25 17:20:48 PST
Created attachment 220014 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 8 Build Bot 2013-12-25 18:53:48 PST
Comment on attachment 220003 [details]
Patch

Attachment 220003 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5277655813324800

New failing tests:
css3/masking/clip-path-animation.html
Comment 9 Build Bot 2013-12-25 18:53:53 PST
Created attachment 220019 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 10 Ryosuke Niwa 2013-12-25 19:51:23 PST
Looks like some test is failing on Mac WK1?
Comment 11 Dirk Schulze 2013-12-25 23:34:59 PST
(In reply to comment #10)
> Looks like some test is failing on Mac WK1?

Yes. Will check it locally and upload a new patch if necessary.
Comment 12 Dirk Schulze 2013-12-26 00:08:23 PST
Created attachment 220028 [details]
Patch

Member variable m_referenceBox from ShapeClipPathOperation wasn't initialized correctly.
Comment 13 WebKit Commit Bot 2013-12-26 00:10:03 PST
Attachment 220028 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast/masking/parsing-clip-path-shape-expected.txt', u'LayoutTests/fast/masking/parsing-clip-path-shape.html', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/BasicShapeFunctions.cpp', u'Source/WebCore/css/CSSComputedStyleDeclaration.cpp', u'Source/WebCore/css/DeprecatedStyleBuilder.cpp', u'Source/WebCore/page/animation/CSSPropertyAnimation.cpp', u'Source/WebCore/rendering/ClipPathOperation.h', u'Source/WebCore/rendering/RenderLayer.cpp', u'Source/WebCore/rendering/shapes/ShapeInfo.h', u'Source/WebCore/rendering/style/BasicShapes.cpp', u'Source/WebCore/rendering/style/BasicShapes.h', u'Source/WebCore/rendering/svg/SVGRenderingContext.cpp', '--commit-queue']" exit_code: 1
ERROR: Source/WebCore/rendering/ClipPathOperation.h:160:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Simon Fraser (smfr) 2014-01-01 22:44:01 PST
Comment on attachment 220028 [details]
Patch

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2869
> +                ReferenceClipPathOperation& referenceOperation = *toReferenceClipPathOperation(operation);

I think it would be slightly better to say
ReferenceClipPathOperation& referenceOperation = toReferenceClipPathOperation(*operation);

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2875
> +                ShapeClipPathOperation& shapeOperation = *toShapeClipPathOperation(operation);

Ditto

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2881
> +                BoxClipPathOperation& boxOperation = *toBoxClipPathOperation(operation);

Ditto

> Source/WebCore/rendering/ClipPathOperation.h:148
> +    const Path& path(const FloatRect&)

This is confusing. Is it going to return path that just contains the given rect? Should it be called pathForRect()? Why does this change m_path?
Comment 15 Dirk Schulze 2014-01-02 09:33:27 PST
Created attachment 220230 [details]
Patch for landing
Comment 16 WebKit Commit Bot 2014-01-02 10:08:06 PST
Comment on attachment 220230 [details]
Patch for landing

Clearing flags on attachment: 220230

Committed r161209: <http://trac.webkit.org/changeset/161209>
Comment 17 WebKit Commit Bot 2014-01-02 10:08:11 PST
All reviewed patches have been landed.  Closing bug.