Last Comment Bug 570896 - add support for different background-origin and background-clip in background shorthand (css3-background)
: add support for different background-origin and background-clip in background...
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla22
Assigned To: David Baron :dbaron: ⌚️UTC-10
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: css3-background
  Show dependency treegraph
 
Reported: 2010-06-08 21:31 PDT by David Baron :dbaron: ⌚️UTC-10
Modified: 2013-08-05 13:59 PDT (History)
12 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Allow separate background-origin and background-clip to be set in the background shorthand. (11.87 KB, patch)
2013-03-05 14:41 PST, David Baron :dbaron: ⌚️UTC-10
bzbarsky: review+
Details | Diff | Splinter Review

Description David Baron :dbaron: ⌚️UTC-10 2010-06-08 21:31:15 PDT
The latest editor's draft of css3-background adds the ability to specify background-clip and background-origin differently.  When this reaches CR (the current public draft is a CR, but it's not in that), we should implement it, and adjust various tests.

This requires code changes in two places: nsCSSParser::ParseBackgroundItem for parsing and nsCSSDeclaration::GetValue for the getter/serialization case, plus adjusting all the relevant tests (which there should be a bunch of).
Comment 1 David Baron :dbaron: ⌚️UTC-10 2013-03-05 14:41:14 PST
Created attachment 721472 [details] [diff] [review]
Allow separate background-origin and background-clip to be set in the background shorthand.
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2013-03-06 09:16:16 PST
Comment on attachment 721472 [details] [diff] [review]
Allow separate background-origin and background-clip to be set in the background shorthand.

>+isnot(e.style.background, "", "should have background shorthand (origin:content-box)");

Can you make that into an is() test with the right value?

r=me
Comment 3 David Baron :dbaron: ⌚️UTC-10 2013-03-06 16:52:03 PST
(In reply to Boris Zbarsky (:bz) from comment #2)
> >+isnot(e.style.background, "", "should have background shorthand (origin:content-box)");
> 
> Can you make that into an is() test with the right value?

I'd prefer not to, since there isn't really a single right value; I think things are covered well enough by the property_database.js-based tests.
Comment 4 David Baron :dbaron: ⌚️UTC-10 2013-03-07 13:07:00 PST
is comment 3 ok with you?
Comment 5 David Baron :dbaron: ⌚️UTC-10 2013-03-07 18:02:43 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/2aaba07995ed


For documentation, the spec is http://dev.w3.org/csswg/css3-background/#background ; we previously didn't support the bit about allowing 2 <box> values (we only supported 1); now we do.  The key part of the spec is:

  If one <box> value is present then it sets both ‘background-origin’
  and ‘background-clip’ to that value. If two values are present, then
  the first sets ‘background-origin’ and the second ‘background-clip’.
Comment 6 Ryan VanderMeulen [:RyanVM] 2013-03-09 16:21:18 PST
https://hg.mozilla.org/mozilla-central/rev/2aaba07995ed
Comment 7 Boris Zbarsky [:bz] (still a bit busy) 2013-03-11 07:19:58 PDT
> is comment 3 ok with you?

Yes.

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