Last Comment Bug 549809 - Rename background-origin and background-clip properties and values to match css3-background
: Rename background-origin and background-clip properties and values to match c...
Status: RESOLVED FIXED
[parity-opera][parity-webkit]
: css3, dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: ---
Assigned To: David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
:
Mentors:
Depends on: 570909 624301
Blocks: css3-background
  Show dependency treegraph
 
Reported: 2010-03-02 21:37 PST by philippe (part-time)
Modified: 2011-09-05 08:21 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
patch 1: implement -moz-background-clip: content (to be renamed in later patch) (19.23 KB, patch)
2010-06-05 09:27 PDT, David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
roc: review+
Details | Diff | Splinter Review
patch 2: remove comments representing removed no-clip value (1.14 KB, patch)
2010-06-05 09:28 PDT, David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
no flags Details | Diff | Splinter Review
patch 3: rename properties and values of background-origin and background-clip (69.57 KB, patch)
2010-06-05 09:29 PDT, David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
roc: review+
Details | Diff | Splinter Review
patch 4: uncomment already-written code for background-clip and background-origin in background shorthand (17.22 KB, patch)
2010-06-05 09:29 PDT, David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
roc: review+
Details | Diff | Splinter Review
patch 5: also rename -moz-background-size to background-size (67.76 KB, patch)
2010-06-05 09:30 PDT, David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
roc: review+
Details | Diff | Splinter Review
patch 6: re-alphabetize property-database.js (6.41 KB, patch)
2010-06-05 09:31 PDT, David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch)
no flags Details | Diff | Splinter Review

Description philippe (part-time) 2010-03-02 21:37:11 PST
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.
Comment 1 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-03-02 22:44:14 PST
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?
Comment 2 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-03-02 22:46:27 PST
We might also want to fix bug 368085 before renaming the properties.
Comment 3 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:27:50 PDT
Created attachment 449452 [details] [diff] [review]
patch 1: implement -moz-background-clip: content (to be renamed in later patch)
Comment 4 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:28:19 PDT
Created attachment 449453 [details] [diff] [review]
patch 2: remove comments representing removed no-clip value
Comment 5 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:29:19 PDT
Created attachment 449454 [details] [diff] [review]
patch 3: rename properties and values of background-origin and background-clip
Comment 6 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:29:56 PDT
Created attachment 449455 [details] [diff] [review]
patch 4: uncomment already-written code for background-clip and background-origin in background shorthand
Comment 7 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:30:34 PDT
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.
Comment 8 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:31:01 PDT
Created attachment 449457 [details] [diff] [review]
patch 6: re-alphabetize property-database.js
Comment 9 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-05 09:41:40 PDT
(In reply to comment #7)
> I should file a separate bug for adding background-size to the shorthand.

filed bug 570326
Comment 10 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2010-06-06 03:45:34 PDT
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?
Comment 11 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2010-06-06 03:47:30 PDT
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?
Comment 12 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-06 07:52:59 PDT
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.
Comment 14 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-08 19:03:31 PDT
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 Philip Chee 2010-06-08 21:23:45 PDT
Should the dev-doc-needed keyword be set?
Comment 16 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-08 21:32:03 PDT
(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)
Comment 17 Eric Shepherd [:sheppy] 2010-06-16 10:57:53 PDT
These changes to the documentation are done.

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