Closed Bug 570896 Opened 11 years ago Closed 8 years ago

add support for different background-origin and background-clip in background shorthand (css3-background)

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: dbaron, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

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).
Assignee: nobody → dbaron
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
Attachment #721472 - Flags: review?(bzbarsky) → review+
(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.
is comment 3 ok with you?
Flags: needinfo?(bzbarsky)
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’.
Keywords: dev-doc-needed
https://hg.mozilla.org/mozilla-central/rev/2aaba07995ed
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
> is comment 3 ok with you?

Yes.
Flags: needinfo?(bzbarsky)
See Also: → 1592164
You need to log in before you can comment on or make changes to this bug.