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

RESOLVED FIXED in mozilla22

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

Trunk
mozilla22
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
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)

Updated

6 years ago
Blocks: 631373
(Assignee)

Comment 1

4 years ago
Created attachment 721472 [details] [diff] [review]
Allow separate background-origin and background-clip to be set in the background shorthand.
Attachment #721472 - Flags: review?(bzbarsky)
(Assignee)

Updated

4 years ago
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+
(Assignee)

Comment 3

4 years ago
(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.
(Assignee)

Comment 4

4 years ago
is comment 3 ok with you?
Flags: needinfo?(bzbarsky)
(Assignee)

Comment 5

4 years ago
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
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
> is comment 3 ok with you?

Yes.
Flags: needinfo?(bzbarsky)
Doc updated:
https://developer.mozilla.org/en-US/docs/Web/CSS/background
and
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/22
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.