Bug 136026

Summary: calc() doesn't work for SVG CSS properties
Product: WebKit Reporter: Dirk Schulze <krit>
Component: SVGAssignee: Dirk Schulze <krit>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, dino, rniwa, simon.fraser, syoichi, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 136014, 16662    
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
none
Patch none

Description Dirk Schulze 2014-08-17 11:37:13 PDT
calc() doesn't work for SVG CSS properties. It is one of the few patches that can be tagged as "for starters". The code is in SVGCSSParser already but commented out. It seems to work perfectly.

Since people asked for calc() on stroke-width and stroke-dasharray-offset, it would be really cool to see the fix in the upcoming version of Safari. If only we knew someone who is working on Safari. :)

Writing some tests today and upload the patch afterwards.
Comment 1 Dirk Schulze 2014-08-18 00:41:02 PDT
Created attachment 236745 [details]
Patch
Comment 2 Dirk Schulze 2014-08-18 00:50:29 PDT
The patch can not be back ported without the function SVGLengthContext::valueForLength from http://trac.webkit.org/changeset/171341

Without this function, calc(100% + 100px) wouldn't work.
Comment 3 Build Bot 2014-08-18 02:22:19 PDT
Comment on attachment 236745 [details]
Patch

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

New failing tests:
fast/css/getComputedStyle/computed-style-without-renderer.html
fast/css/getComputedStyle/computed-style.html
fast/loader/redirect-to-invalid-url-using-javascript-disallowed-after-load.html
Comment 4 Build Bot 2014-08-18 02:22:22 PDT
Created attachment 236749 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 5 Build Bot 2014-08-18 02:40:16 PDT
Comment on attachment 236745 [details]
Patch

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

New failing tests:
fast/css/getComputedStyle/computed-style-without-renderer.html
fast/css/getComputedStyle/computed-style.html
fast/loader/redirect-to-invalid-url-using-javascript-disallowed-after-load.html
Comment 6 Build Bot 2014-08-18 02:40:19 PDT
Created attachment 236750 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 7 Build Bot 2014-08-18 04:51:34 PDT
Comment on attachment 236745 [details]
Patch

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

New failing tests:
fast/css/getComputedStyle/computed-style-without-renderer.html
fast/css/getComputedStyle/computed-style.html
fast/loader/redirect-to-invalid-url-using-javascript-disallowed-after-load.html
Comment 8 Build Bot 2014-08-18 04:51:38 PDT
Created attachment 236756 [details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 9 Dirk Schulze 2014-08-18 04:57:11 PDT
Created attachment 236758 [details]
Patch
Comment 10 Andreas Kling 2014-08-18 09:26:08 PDT
Comment on attachment 236758 [details]
Patch

r=me
Comment 11 WebKit Commit Bot 2014-08-18 11:18:33 PDT
Comment on attachment 236758 [details]
Patch

Clearing flags on attachment: 236758

Committed r172711: <http://trac.webkit.org/changeset/172711>
Comment 12 WebKit Commit Bot 2014-08-18 11:18:38 PDT
All reviewed patches have been landed.  Closing bug.