Bug 136026 - calc() doesn't work for SVG CSS properties
Summary: calc() doesn't work for SVG CSS properties
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dirk Schulze
URL:
Keywords:
Depends on:
Blocks: 136014 16662
  Show dependency treegraph
 
Reported: 2014-08-17 11:37 PDT by Dirk Schulze
Modified: 2014-08-18 11:18 PDT (History)
7 users (show)

See Also:


Attachments
Patch (34.79 KB, patch)
2014-08-18 00:41 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (522.53 KB, application/zip)
2014-08-18 02:22 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (578.98 KB, application/zip)
2014-08-18 02:40 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 (501.01 KB, application/zip)
2014-08-18 04:51 PDT, Build Bot
no flags Details
Patch (36.30 KB, patch)
2014-08-18 04:57 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.