New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 873527 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

The serialization of motion-path: path string should use double quotes.

Reported by boris.ch...@gmail.com, Aug 12

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0

Steps to reproduce the problem:
1. Set offset-path and use path() function
   e.g. set "offset-path: path("M 10 10 Z");" to a div
2. Get the computed style of offset-path (or its specified value)
   e.g. console.log(getComputedStyle(div).offsetPath);

What is the expected behavior?
According to the spec of https://drafts.csswg.org/cssom/#serialize-a-string:
The expected value should be: path("M 10 10 Z")

What went wrong?
The actual value is: path('M 10 10 Z')

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 68.0.3440.106  Channel: n/a
OS Version: OS X 10.13
Flash Version: 

The SVG path (V1.1) spec and Motion path spec don't mention the format of the serialization. However, [https://drafts.csswg.org/cssom/#serialize-a-string] says to use double-quotes for string, so I think the web-platform tests and the result of chrome should be fixed.
 

Comment 1 Deleted

This may block Issue 654664.
Labels: Needs-Triage-M68
Cc: krajshree@chromium.org
Labels: Triaged-ET Needs-Feedback
boris.chiou@ - Thanks for filing the issue...!!

Could you please provide a sample test file/url to test the issue from TE-end. This will help us in triaging the issue further.

Thanks...!!
About the test, we could check the web-platform tests [1]. For path() function, Eric (from Google) wrote this tests, but he used single quotes, instead of double quotes, so Google Chrome could pass the tests, but this may not be correct because the serialization of a string should use double quotes [2], according to the spec.
In other words, in [1], it tries to parse this SVG Path, |path('m 0 0 h -100')|, and checking the output by |path('m 0 0 h -100')|. However, we should and I'd like to update the wpt to use double-quotes and check if the output is |path("m 0 0 h -1")|.

[1] https://github.com/web-platform-tests/wpt/blob/aaac36358ac55215fbb28d62d235470859001e91/css/motion/parsing/offset-path-parsing-valid.html#L24-L25
[2] https://drafts.csswg.org/cssom/#serialize-a-string
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 13

Cc: swarnasree.mukkala@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Unconfirmed)
Owner: f...@opera.com
Status: Started (was: Available)
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85683b62dc35f1f2e323c6384cb3a0bb193330d2

commit 85683b62dc35f1f2e323c6384cb3a0bb193330d2
Author: Fredrik Söderquist <fs@opera.com>
Date: Fri Sep 07 21:13:52 2018

Serialize the path() function with double quotes

Per https://drafts.csswg.org/cssom/#serialize-a-string double quotes
should be used when serializing strings.

Bug:  873527 
Change-Id: I3b7a3c6425c6a5d0d6f96399663f5ae8b3929a59
Reviewed-on: https://chromium-review.googlesource.com/1213171
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589652}
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/animations/responsive/animations-responsive-d.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/animations/responsive/animations-responsive-offset-path.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/css-parser/d-parsing.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/css-parser/offset-path-parsing.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/css3/motion-path/offset-path.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/css3/motion-path/offset.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/external/wpt/css/motion/parsing/offset-parsing-valid.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/external/wpt/css/motion/parsing/offset-path-parsing-valid-expected.txt
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/external/wpt/svg/path/property/d-interpolation-discrete.svg
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/external/wpt/svg/path/property/d-interpolation-relative-absolute.svg
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/external/wpt/svg/path/property/d-interpolation-single.svg
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/external/wpt/svg/path/property/getComputedStyle.svg
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/WebKit/LayoutTests/svg/css/path-element.html
[modify] https://crrev.com/85683b62dc35f1f2e323c6384cb3a0bb193330d2/third_party/blink/renderer/core/css/css_path_value.cc

Status: Fixed (was: Started)

Sign in to add a comment