Rename background-origin and background-clip properties and values to match css3-background

RESOLVED FIXED

Status

()

Core
CSS Parsing and Computation
P3
normal
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: philippe (part-time), Assigned: dbaron)

Tracking

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

Trunk
css3, dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 -)

Details

(Whiteboard: [parity-opera][parity-webkit])

Attachments

(6 attachments)

(Reporter)

Description

7 years ago
Currently Gecko supports these as [padding][border][content], the CSS3 border & background module defines them as [padding-box][border-box][content-content]

http://www.w3.org/TR/css3-background/#the-background-clip
http://www.w3.org/TR/css3-background/#the-background-origin

Opera 10.50 and WebKit (safari 4) already support this.
(Assignee)

Comment 1

7 years ago
My plan was to rename the values at the same time we renamed the properties, which we can do now that the draft is in CR.

Do we have another bug already on renaming the properties?
(Assignee)

Comment 2

7 years ago
We might also want to fix bug 368085 before renaming the properties.
(Assignee)

Updated

7 years ago
Status: UNCONFIRMED → NEW
blocking2.0: --- → ?
Ever confirmed: true
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
(Assignee)

Updated

7 years ago
Summary: Add support for the css3 border & background values for background-origin and background-clip → Rename background-origin and background-clip properties and values to match css3-background

Updated

7 years ago
Keywords: css3
Whiteboard: [parity-opera][parity-webkit]
blocking2.0: ? → -
(Assignee)

Updated

7 years ago
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
(Assignee)

Comment 3

7 years ago
Created attachment 449452 [details] [diff] [review]
patch 1: implement -moz-background-clip: content (to be renamed in later patch)
Attachment #449452 - Flags: review?(roc)
(Assignee)

Comment 4

7 years ago
Created attachment 449453 [details] [diff] [review]
patch 2: remove comments representing removed no-clip value
(Assignee)

Comment 5

7 years ago
Created attachment 449454 [details] [diff] [review]
patch 3: rename properties and values of background-origin and background-clip
Attachment #449454 - Flags: review?(roc)
(Assignee)

Comment 6

7 years ago
Created attachment 449455 [details] [diff] [review]
patch 4: uncomment already-written code for background-clip and background-origin in background shorthand
Attachment #449455 - Flags: review?(roc)
(Assignee)

Comment 7

7 years ago
Created attachment 449456 [details] [diff] [review]
patch 5: also rename -moz-background-size to background-size

I should file a separate bug for adding background-size to the shorthand.
Attachment #449456 - Flags: review?(roc)
(Assignee)

Comment 8

7 years ago
Created attachment 449457 [details] [diff] [review]
patch 6: re-alphabetize property-database.js
(Assignee)

Comment 9

7 years ago
(In reply to comment #7)
> I should file a separate bug for adding background-size to the shorthand.

filed bug 570326
Attachment #449452 - Flags: review?(roc) → review+
Attachment #449454 - Flags: review?(roc) → review+
Comment on attachment 449455 [details] [diff] [review]
patch 4: uncomment already-written code for background-clip and background-origin in background shorthand

           if (clip->mValue != origin->mValue) {
             aValue.Truncate();
             return NS_OK;
           }

Can you add a comment explaining what's happening here? I think we're deciding not to return a shorthand because the origin and clip need to be expressed separately?
Attachment #449455 - Flags: review?(roc) → review+
Attachment #449456 - Flags: review?(roc) → review+
One general comment: it seems we're not leaving aliases in place for -moz-background-size/-moz-background-origin/-moz-background-clip. So existing content could break. Should we alias the old names to the new names?
(Assignee)

Comment 12

7 years ago
I think the only time we've done that in the past was -moz-opacity, since there was a significant amount of content using it, and even then we removed it after a while.  We've taken the position that if authors were using these on the Web, they should have been doing:
  -moz-background-clip: ...
  /* other prefixes here, probably */
  background-clip: ...
all along.  Additionally, we want to minimize Gecko-specific content on the Web.
(Assignee)

Comment 13

7 years ago
http://hg.mozilla.org/mozilla-central/rev/665863f2ac31
http://hg.mozilla.org/mozilla-central/rev/0f920bd875d7
http://hg.mozilla.org/mozilla-central/rev/b5562d977e3a
http://hg.mozilla.org/mozilla-central/rev/63ccfca7cdb2
http://hg.mozilla.org/mozilla-central/rev/c0bd45ab931f
http://hg.mozilla.org/mozilla-central/rev/979aceadf808
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Comment 14

7 years ago
Also, I should file two followup bugs on things in the Editor's draft that haven't made CR yet:
 * adding origin+clip support to the shorthand (it now allows 2 values)
 * adding background-size support to the shorthand (changed since last CR, probably want to wait to implement until it hits CR again)

Comment 15

7 years ago
Should the dev-doc-needed keyword be set?
(Assignee)

Updated

7 years ago
Keywords: dev-doc-needed
(Assignee)

Comment 16

7 years ago
(In reply to comment #14)
> Also, I should file two followup bugs on things in the Editor's draft that
> haven't made CR yet:
>  * adding origin+clip support to the shorthand (it now allows 2 values)

bug 570896

>  * adding background-size support to the shorthand (changed since last CR,
> probably want to wait to implement until it hits CR again)

bug 570326 (I'd already filed it)
(Assignee)

Updated

7 years ago
Depends on: 570909
These changes to the documentation are done.
Keywords: dev-doc-needed → dev-doc-complete
Depends on: 624301
(Assignee)

Updated

7 years ago
Blocks: 631373

Updated

6 years ago
Depends on: 684672
(Assignee)

Updated

6 years ago
No longer depends on: 684672
You need to log in before you can comment on or make changes to this bug.