New issue
Advanced search Search tips

Issue 880733 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

conic-gradients wont render if a color-hint is used

Reported by keithjcl...@gmail.com, Sep 5

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36

Steps to reproduce the problem:
Visit https://keithclark.co.uk/articles/single-element-pure-css-pie-charts/ and scroll through the examples

What is the expected behavior?
Every examples should contain a pie chart

What went wrong?
The examples aren't rendering because a color-hint is being used to create a "hard" colour stop. Removing the color-hint fixes examples but results in gradient interpolation from the previous color-stop.

This does NOT work:
background-image: conic-gradient(#d44 72deg, #fc3 0 234deg, #ac0 0);

This does work:
background-image: conic-gradient(#d44 72deg, #fc3 234deg, #ac0 0);

Did this work before? Yes 68, when the feature was behind a flag

Does this work in other browsers? N/A

Chrome version: 69.0.3497.81  Channel: stable
OS Version: OS X 10.13.6
Flash Version:
 
Labels: Needs-Triage-M69
Labels: Needs-Bisect
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Needs-Feedback
Thanks for filing the issue!

Unable to reproduce the issue on reported chrome version 69.0.3497.81 using Mac 10.13.1 with the below mentioned steps.
1. Launched Chrome
2. Navigated to https://keithclark.co.uk/articles/single-element-pure-css-pie-charts/
3. Scrolled down the page
We were able to see the Conic gradients i.e., pie charts in the page. As mentioned in C#0, that a version prior to this release was working fine, hence checked in chrome version 68.0.3440.106. Attaching the behaviour of both the versions.

@Reporter: Could you please have a look at the screen cast and let us know if anything missed from our end, It would be helpful if clarified on the behaviour of M68(68.0.3440.106) shown in screen cast, where it says, "Conic-gradients are not supported in this browser". Providing a screencast/screenshot of the expected/actual behaviour would be more helpful in triaging the issue further in better way. 
880733.mp4
7.0 MB View Download
TE@, those are just empty circles, not conical gradients.
You need to enable chrome://flags/#enable-experimental-web-platform-features
M68 is behaving correctly in your case. You'll need the experimental web platform features flag enabled to see the examples because they are wrapped in a CSS feature query which detects conic-gradient support...

@supports (background: conic-gradient(red, blue)) {
  /* hide the "not supported message" and show examples */
}
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 6

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
Here's how the those discs should look in M69
Screen Shot 2018-09-06 at 08.33.58.png
107 KB View Download
Cc: fmalita@chromium.org
Labels: OS-Linux OS-Windows
The reason for this is that the following feature didn't ship yet:

https://www.chromestatus.com/feature/5712111258828800

(It did appear to have gotten 3 LGTM's though, so it ought to be no problem shipping.)

So when you tested this (conic-gradient) while it was behind a flag, it may have been that case that you got this other feature too (if you didn't specifically enable one or the other.)

+fmalita
Yep, that's it! If I enable enable experimental web platform features in M69 the pie charts work as expected. It's confusing to have two linked features exposed behind the same flag.

The majority of community articles I've seen documenting conic-gradient make reference to these colour stops so shipping conical gradient support without them may well cause confusion for other developers.

The take away here for me is when using @supports to feature test, use the *exact* syntax you're intending to apply in the block test. Doing that would have kept the page looking like M68.

That said, I would have raised the same bug anyway as I hadn't noticed/considered that CSS gradient colour stops were a separate feature.
Yes, we should get this out the door ASAP. IIRC there were some tests that needed writing/exporting to WPT - I do see some tests like that at [1] though, so maybe we managed that already (in which case it's just a matter of flipping the switch.)

[1] https://wpt.fyi/results/css/css-images/gradient/color-stops-parsing.html?complete=true
FYI: I'm planning to fix my examples with something along the lines of:

@supports (background: conic-gradient(red, blue)) {
  .pie {
    background-image: conic-gradient(#d44 72deg, #fc3 0 234deg, #ac0 0);
  }

  /* This is a fallback for browsers that DON'T yet support the double-position colour stop syntax */
  @supports not (background: conic-gradient(red, blue 0 0)) {
    .pie {
      background-image: conic-gradient(#d44 72deg, #fc3 72deg, #fc3 234deg, #ac0 0);
    }
  }
}

This will obviously make the examples I linked to above work. I'm happy to create a standalone test case if you need one.
I think we have coverage for this already, but thanks anyway! =)
Labels: -Needs-Bisect
Removing the Needs-Bisect label as this is already being investigated and root cause is already identified in C#8, please add it back if this still requires bisect.
Status: Available (was: Unconfirmed)
Project Member

Comment 15 by bugdroid1@chromium.org, Sep 17

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 18

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

commit 50689e69f63fb991c09387f486d4105abfa91988
Author: Fredrik Söderquist <fs@opera.com>
Date: Tue Sep 18 13:58:52 2018

Ship CSS gradient color stop double-position syntax

Intent-to-Ship thread:

 https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/8B9FbeTBIK0/DNkC2pz-AAAJ

Also removing the actual feature and corresponding check, because it's
only used in a single spot, so if the feature should need to be
unshipped it ought to be a fairly trivial revert.

Bug:  707047 ,  880733 
Change-Id: Ie854d7fd9f7a22e9c6144668a37f694dd1c508ee
Reviewed-on: https://chromium-review.googlesource.com/1230018
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#592028}
[modify] https://crrev.com/50689e69f63fb991c09387f486d4105abfa91988/third_party/blink/renderer/core/css/parser/css_property_parser_helpers.cc
[modify] https://crrev.com/50689e69f63fb991c09387f486d4105abfa91988/third_party/blink/renderer/platform/runtime_enabled_features.json5

Owner: f...@opera.com
Status: Fixed (was: Available)
Labels: Needs-Feedback
Tried checking the issue on reported chrome version 69.0.3497.81 using Mac 10.13.1, Observed the conic-gradients rendered properly with out any issues. Attaching the screen cast of the same for reference.

@Fredrik Söderquist: As we couldn't reproduce the issue from our end, Please help us in verifying the fix.

Thanks!
880733 CL.mp4
2.6 MB View Download
Status: Verified (was: Fixed)
As indicated in c#11, the author "fixed" the site, so it would work in M69 as well. So to verify one needs to check that the expected rule applies. I verified that the correct rule was used on trunk.
Labels: -Type-Bug-Regression Type-Bug

Sign in to add a comment