Last Comment Bug 627885 - -moz-radial-gradient doesn't support explicitly defined size
: -moz-radial-gradient doesn't support explicitly defined size
Status: RESOLVED DUPLICATE of bug 712474
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: unspecified
: All All
-- normal with 5 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Jet Villegas (:jet)
Mentors:
http://geeksbynature.dk/bugs/moz-radi...
Depends on: 798062
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-21 14:58 PST by Christian Sonne [:cers]
Modified: 2013-10-22 01:31 PDT (History)
15 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (1015 bytes, text/html)
2011-09-07 18:20 PDT, j.j.
no flags Details
testcase (1015 bytes, text/html)
2011-09-07 18:24 PDT, j.j.
no flags Details
Implement explicit size in -moz-radial-gradent (14.78 KB, patch)
2011-10-29 08:20 PDT, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Tests (22.76 KB, patch)
2011-10-29 08:21 PDT, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
grep 'INFO TEST-START |' <unpatched test result> (34.93 KB, text/plain)
2011-10-29 18:12 PDT, Masatoshi Kimura [:emk]
no flags Details
grep 'INFO TEST-START |' <patched test result> (32.11 KB, text/plain)
2011-10-29 18:16 PDT, Masatoshi Kimura [:emk]
no flags Details
Reduce test_value_cloning test output (1.38 KB, patch)
2011-10-30 00:55 PDT, Masatoshi Kimura [:emk]
dbaron: review+
philringnalda: checkin+
Details | Diff | Splinter Review
Implement explicit size and new syntax in -moz-radial-gradent (36.25 KB, patch)
2011-11-21 18:04 PST, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Tests (70.24 KB, patch)
2011-11-21 18:05 PST, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Implement explicit size and new syntax in -moz-radial-gradent (38.27 KB, patch)
2011-11-22 23:44 PST, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Implement explicit size and new syntax in -moz-radial-gradent (39.30 KB, patch)
2011-11-23 01:40 PST, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Tests (70.20 KB, patch)
2011-11-25 19:37 PST, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Using correct unprefixed radial-gradient syntax (902 bytes, text/html)
2013-03-11 10:33 PDT, Masatoshi Kimura [:emk]
no flags Details

Description User image Christian Sonne [:cers] 2011-01-21 14:58:39 PST
User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110120 Firefox/4.0b10pre
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110120 Firefox/4.0b10pre

As per the current W3C draft, and the new WebKit implementation of the radial-gradient syntax, the shape and size of the gradient can be defined both using size constants (supported by both Firefox and WebKit) and explicitly "by providing two lengths or percentages. These measure the length of the horizontal and vertical axes of the ellipse, respectively." (W3C)

Reproducible: Always

Steps to Reproduce:
1. Load demo
Actual Results:  
Blank rectangle show, and in the error console:
Warning: Error in parsing value for 'background-image'.  Declaration dropped.

Expected Results:  
Radial gradient displayed.
Comment 1 User image Christian Sonne [:cers] 2011-01-21 15:11:00 PST
Forgot to mention, the specific example uses:
-moz-radial-gradient(center, 5em 40px, white, black);
Comment 2 User image David Baron :dbaron: ⌚️UTC-8 2011-01-21 19:25:53 PST
Yep, Tab added this to the draft a few weeks ago; hopefully we'll be able to do this relatively soon after Firefox 4, though I can't promise anything.
Comment 3 User image j.j. 2011-09-07 18:20:08 PDT
Created attachment 559021 [details]
testcase
Comment 4 User image j.j. 2011-09-07 18:24:07 PDT
Created attachment 559022 [details]
testcase
Comment 5 User image Masatoshi Kimura [:emk] 2011-10-29 08:20:17 PDT
Created attachment 570480 [details] [diff] [review]
Implement explicit size in -moz-radial-gradent
Comment 6 User image Masatoshi Kimura [:emk] 2011-10-29 08:21:26 PDT
Created attachment 570481 [details] [diff] [review]
Tests

When I pushed the patch to tryserver, debug builds failed on Mochitest4 becase the log was too large.
https://tbpl.mozilla.org/?tree=Try&rev=a76aaf7fbe4b
> Output exceeded 52428800 bytes, remaining output has been truncated
> program finished with exit code 0
How can I sort out this?
Comment 7 User image David Baron :dbaron: ⌚️UTC-8 2011-10-29 10:09:16 PDT
Did this patch cause an assertion to fire frequently, filling up the log, or cause an infinite loop of output?
Comment 8 User image Masatoshi Kimura [:emk] 2011-10-29 16:44:24 PDT
(In reply to David Baron [:dbaron] from comment #7)
> Did this patch cause an assertion to fire frequently, filling up the log, or
> cause an infinite loop of output?
The log file size was nearly 50MB even without the patch.
This patch just adds a few test cases to property_database.js. So I think it just happened to over the limit.
Comment 9 User image Masatoshi Kimura [:emk] 2011-10-29 18:12:57 PDT
Created attachment 570510 [details]
grep 'INFO TEST-START |' <unpatched test result>
Comment 10 User image Masatoshi Kimura [:emk] 2011-10-29 18:16:55 PDT
Created attachment 570511 [details]
grep 'INFO TEST-START |' <patched test result>

test_transitions_per_property is particularly large which includes property_database.js. (Test cases grow 42784 to 49714)
Comment 11 User image Masatoshi Kimura [:emk] 2011-10-29 18:27:33 PDT
test_value_cloning also wastes the log size because it outputs large "data:" URIs to the log. It took approximately 20 Mbytes!
Comment 12 User image Masatoshi Kimura [:emk] 2011-10-30 00:55:28 PDT
Created attachment 570531 [details] [diff] [review]
Reduce test_value_cloning test output

Debug mochitests 4 no longer fail with this patch.
Comment 13 User image David Baron :dbaron: ⌚️UTC-8 2011-11-15 12:27:12 PST
Comment on attachment 570531 [details] [diff] [review]
Reduce test_value_cloning test output

r=dbaron.  Sorry for the delay getting to this.
Comment 14 User image David Baron :dbaron: ⌚️UTC-8 2011-11-15 14:44:52 PST
I'm a bit hesitant about implementing the current draft of explicit size -- the addition of this feature to the draft made the syntax unreadable, and as a result the draft has been revised substantially.
Comment 15 User image Masatoshi Kimura [:emk] 2011-11-16 23:19:11 PST
Comment on attachment 570480 [details] [diff] [review]
Implement explicit size in -moz-radial-gradent

Oh, I didn't notice radial-gradient syntax has been changed once again.
http://dev.w3.org/csswg/css3-images/#radial-gradients
Clearing the review request.
Comment 16 User image Masatoshi Kimura [:emk] 2011-11-21 18:04:53 PST
Created attachment 576050 [details] [diff] [review]
Implement explicit size and new syntax in -moz-radial-gradent
Comment 17 User image Masatoshi Kimura [:emk] 2011-11-21 18:05:25 PST
Created attachment 576051 [details] [diff] [review]
Tests
Comment 18 User image Masatoshi Kimura [:emk] 2011-11-21 18:25:17 PST
Comment on attachment 576050 [details] [diff] [review]
Implement explicit size and new syntax in -moz-radial-gradent

The explicit size is only defined in new syntax. OTOH, angle is only supported in legacy syntax. It made the patch a bit complicate.
I wish CSS WG would not play with the gradient syntax any longer...
Comment 19 User image Masatoshi Kimura [:emk] 2011-11-22 23:44:05 PST
Created attachment 576416 [details] [diff] [review]
Implement explicit size and new syntax in -moz-radial-gradent

Preserving the syntax type. It will improve the compatibility with existing contents which will not expect that .style/getComputedStyle() will serialize properties with new syntax.
Comment 20 User image Masatoshi Kimura [:emk] 2011-11-23 01:40:56 PST
Created attachment 576428 [details] [diff] [review]
Implement explicit size and new syntax in -moz-radial-gradent

Sorry, the previous patch didn't compile.
Comment 21 User image Masatoshi Kimura [:emk] 2011-11-23 06:01:02 PST
https://tbpl.mozilla.org/?tree=Try&rev=73827e2e8148
Comment 22 User image Masatoshi Kimura [:emk] 2011-11-25 19:37:28 PST
Created attachment 577037 [details] [diff] [review]
Tests

Unbitrotted
Comment 23 User image Phil Ringnalda (:philor) 2011-11-28 22:08:21 PST
Comment on attachment 570531 [details] [diff] [review]
Reduce test_value_cloning test output

https://hg.mozilla.org/integration/mozilla-inbound/rev/44ed0b73a421
Comment 24 User image Marco Bonardo [::mak] 2011-11-29 05:04:44 PST
https://hg.mozilla.org/mozilla-central/rev/44ed0b73a421
Comment 25 User image David Baron :dbaron: ⌚️UTC-8 2011-12-21 11:19:02 PST
So the spec has changed a good bit since you requested review.  I think it might be stable now, though it might also be worth either (a) waiting a little or (b) asking Tab if he thinks it's now ready for implementation.
Comment 26 User image Masatoshi Kimura [:emk] 2011-12-21 12:40:55 PST
(In reply to David Baron [:dbaron] from comment #25)
> So the spec has changed a good bit since you requested review.  I think it
> might be stable now, though it might also be worth either (a) waiting a
> little or (b) asking Tab if he thinks it's now ready for implementation.
I will not post a new patch until the spec actually becomes CR, at least.
The current grammar can no longer co-exist with the legacy one.
Comment 27 User image Lazar Sumar [:nonsensickle] 2011-12-21 14:00:41 PST
I opened a new bug for the new syntax at https://bugzilla.mozilla.org/show_bug.cgi?id=712474 (before finding this one)

dbaron, could you decide if it can be considered a duplicate of this bug?
Comment 28 User image Jean-Yves Perrier [:teoli] 2012-07-23 23:30:46 PDT
I think this has been fixed by bug 712414. Reopen if you disagree.

*** This bug has been marked as a duplicate of bug 712474 ***
Comment 29 User image Antti29 2013-03-11 08:08:56 PDT
This bug is still not fixed, as demostrated at http://geeksbynature.dk/bugs/moz-radial-gradient/
Comment 30 User image Masatoshi Kimura [:emk] 2013-03-11 08:15:51 PDT
-moz-radial-fradient has never supported (and would never support) explicit size. You need to use unprefixed radial-gradient to use explicit size.
Comment 31 User image Antti29 2013-03-11 10:17:39 PDT
Here is the same example without the prefix: http://jsfiddle.net/CXTVh/

(for some reason I got a warning for the "center" so I replaced that)
Comment 32 User image Masatoshi Kimura [:emk] 2013-03-11 10:33:11 PDT
Created attachment 723542 [details]
Using correct unprefixed radial-gradient syntax

Just replacing and copy & pasting will not produce the correct unprefixed syntax.
You must have actually missed http://dev.w3.org/csswg/css3-images/#radial-gradient-syntax even if the source mentions the URL.

Note You need to log in before you can comment on or make changes to this bug.