New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 172051 link

Starred by 23 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Feature



Sign in to add a comment

Support CSS3 all shorthand property (e.g. all: default)

Reported by ja...@kifi.com, Jan 24 2013

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17

Example URL:
http://jsfiddle.net/4ZwjV/1/

Steps to reproduce the problem:
Visit http://jsfiddle.net/4ZwjV/1/ and notice that the 2nd paragraph's background is yellow. It shouldn't be.

What is the expected behavior?
The 2nd paragraph is inside a DIV with all:default set, so rules declared outside the DIV shouldn't affect the contents of the DIV.

What went wrong?
Chrome does not yet support the all CSS3 shorthand property.

Does it occur on multiple sites: Yes

Is it a problem playing media? No

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? No 

Chrome version: 24.0.1312.52  Channel: stable
OS Version: OS X 10.8.2

http://www.w3.org/TR/css3-cascade/#all-shorthand
 

Comment 1 by ja...@kifi.com, Jan 24 2013

I think this is worth supporting even though CSS Cascading and Inheritance Level 3 is still at Working Draft status because it would be particularly helpful to developers of Chrome extensions that insert a widget into arbitrary pages, so that page style rules can't affect the widget. It would be a lighter-weight alternative to an iframe.

Comment 2 by tkent@chromium.org, Jan 25 2013

Labels: -Type-Bug Type-Feature WebKit-CSS
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-Webkit -WebKit-CSS Cr-Content Cr-Content-CSS
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 5 2013

Labels: -Cr-Content Cr-Blink
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 6 2013

Labels: -Cr-Content-CSS Cr-Blink-CSS

Comment 6 by christop...@gmx.com, Aug 26 2013

Today is deadline for Last Call (http://www.w3.org/TR/css3-cascade/)

It's about time for implementation... (extension developers who are using injected standalone content in web pages will thank you for it!)

Comment 7 by christop...@gmx.com, Aug 26 2013

btw: this is not a Mac-only-issue (label!)

Comment 8 by ja...@kifi.com, Sep 30 2013

Work on the CSS3 all shorthand property has begun in Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=842329
@8: It's also been recently marked as fixed for Firefox, target milestone 27.

Comment 10 by ja...@kifi.com, Feb 4 2014

Firefox 27 has just gone stable with all: unset support.
http://www.mozilla.org/en-US/firefox/27.0/releasenotes/
Owner: tasak@chromium.org
Status: Available
Sakamoto san do you have bandwidth for this? We need this to provide a viable alternative to reset style inheritance. How hard would it be? Can we have this in M35?

Comment 12 by ja...@kifi.com, Mar 19 2014

I’ve updated the fiddle in the description of this issue to reflect the change in the spec from default to unset.
http://jsfiddle.net/4ZwjV/2/
Labels: -Pri-2 Pri-1 M-35
We'll try to make this happen in M35.
Labels: -OS-Mac OS-All

Comment 16 by tasak@google.com, Mar 28 2014

I created a patch for this:
https://codereview.chromium.org/216803002/

The patch doesn't cover CSSValue: "unset".

I will create another patch to implement "unset".

Comment 17 by kareng@google.com, Apr 7 2014

Labels: -M-35 MovedFrom-35 M-36
Status: Assigned
Moving all non essential bugs to the next Milestone.
Project Member

Comment 18 by bugdroid1@chromium.org, Apr 10 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=171239

------------------------------------------------------------------
r171239 | tasak@google.com | 2014-04-10T07:17:52.137245Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/resolver/MatchResult.h?r1=171239&r2=171238&pathrev=171239
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/resolver/ScopedStyleResolver.cpp?r1=171239&r2=171238&pathrev=171239
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/resolver/StyleResolver.cpp?r1=171239&r2=171238&pathrev=171239
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/ElementRuleCollector.cpp?r1=171239&r2=171238&pathrev=171239
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/resolver/StyleResolver.h?r1=171239&r2=171238&pathrev=171239

Reverting r170175: "Refactoring MatchRanges and RuleRange."

r170175 causes lots of crashes and also causes regressions reported in  crbug.com/361354 .

>    Refactoring MatchRanges and RuleRange.
>
>    TEST=no new tests, just refactoring.
>    BUG= 172051 
>
>    Review URL: https://codereview.chromium.org/214333003
>
>    git-svn-id: svn://svn.chromium.org/blink/trunk@170175 bbb929c8-8fbe-4397-9dbb-9b2b20218538

BUG= 361354 ,361937
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/232563002
-----------------------------------------------------------------
Labels: -Pri-1 -M-36 M-37 MovedFrom-36 Pri-2
This issue is Pri-1 but has already been moved once, therefore lowering to Pri-2 and moving to next milesone.
Project Member

Comment 20 by bugdroid1@chromium.org, Jun 16 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176201

------------------------------------------------------------------
r176201 | tasak@google.com | 2014-06-16T12:01:53.021489Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-expected.html?r1=176201&r2=176200&pathrev=176201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand.html?r1=176201&r2=176200&pathrev=176201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-css-text-expected.txt?r1=176201&r2=176200&pathrev=176201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-all-expected.txt?r1=176201&r2=176200&pathrev=176201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-css-text.html?r1=176201&r2=176200&pathrev=176201
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-all.html?r1=176201&r2=176200&pathrev=176201

Added layout tests for all shorthand property.

This is a preparation patch for implementing all shorthand property.
This patch adds layout tests, which are currently failing.
After implementing all shorthand correctly, the tests will pass.

Spec: http://dev.w3.org/csswg/css-cascade/#all-shorthand

BUG= 172051 
TEST=fast/css/all-shorthand-css-text.html,fast/css/all-shorthand.html,fast/css/getComputedStyle/getComputedStyle-all.html

Review URL: https://codereview.chromium.org/335733003
-----------------------------------------------------------------
Project Member

Comment 21 by bugdroid1@chromium.org, Jun 17 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176289

------------------------------------------------------------------
r176289 | tasak@google.com | 2014-06-17T07:13:52.919553Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSProperty.cpp?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/frame/UseCounter.cpp?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSComputedStyleDeclaration.cpp?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSValueKeywords.in?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSPropertyNames.in?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/parser/CSSPropertyParser.cpp?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-css-text-expected.txt?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-all-expected.txt?r1=176289&r2=176288&pathrev=176289
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSProperties.in?r1=176289&r2=176288&pathrev=176289

Added parser part of all shorthand property.

- added "all" property to CSSProperties.in and so on.
- added "unset" CSSValue. "unset" is defined in all spec.

all spec: http://dev.w3.org/csswg/css-cascade/#all-shorthand

BUG= 172051 
TEST=fast/css/all-shorthand-css-text.html,fast/css/all-shorthand.html,fast/css/getComputedStyle/getComputedStyle-all.html

Review URL: https://codereview.chromium.org/338023002
-----------------------------------------------------------------
Project Member

Comment 22 by bugdroid1@chromium.org, Jun 18 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=176396

------------------------------------------------------------------
r176396 | tasak@google.com | 2014-06-18T06:25:52.242552Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/resolver/StyleResolver.cpp?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/Source/build/scripts/templates/StylePropertyShorthand.h.tmpl?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-expected.html?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand.html?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/resolver/StyleResolver.h?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/StylePropertyShorthandCustom.cpp?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSProperty.cpp?r1=176396&r2=176395&pathrev=176396
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSProperty.h?r1=176396&r2=176395&pathrev=176396

Implemented applyPropertyAll for applying all shorthand property.

applyPropertyAll expands all shorthand property to longhand properties,
and apply each longhand property according to all's value (e.g. if
all's value is initial, initial).

Spec: http://dev.w3.org/csswg/css-cascade/#all-shorthand

BUG= 172051 
TEST=fast/css/all-shorthand.html

Review URL: https://codereview.chromium.org/339163002
-----------------------------------------------------------------
Thanks for working on this!
Was this the last patch? Can we mark this as fixed?
Labels: -M-37 MovedFrom-37
This issue has already been moved once and is lower than Priority 1,therefore removing mstone.
Labels: -Pri-2 Pri-1 M-38
Status: Started
What is the status of this? As Kenji-san says, the submitted CL makes it look like this is done.
Labels: Needs-Feedback
Asked the owner to chime back.

Comment 28 by math...@qiwi.be, Sep 2 2014

It looks like a complete implementation of `all` (including the `unset`, `initial`, `inherit` values) already shipped in M37.

Comment 29 by tasak@google.com, Sep 2 2014

I updated my last CL and pinged.

This looks shipped to me too :) Marked as such on chromestatus. Mathias also has a nice blog post on Opera's site: https://dev.opera.com/blog/opera-24/
Labels: -M-38 M-37
Status: Fixed
Sakamoto-san, What was the last CL about? I suggest we open a new bug for this last CL to avoid further confusion re all support.

Comment 32 by yio...@gmail.com, Sep 3 2014

All properties should support "unset", for example margin: unset.
QQ截图20140903140740.png
3.1 KB View Download
Project Member

Comment 33 by bugdroid1@chromium.org, Oct 23 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=184252

------------------------------------------------------------------
r184252 | tasak@google.com | 2014-10-23T10:24:16.016100Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-css-text-expected.txt?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/css/all-shorthand-css-text.html?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/StylePropertySerializer.cpp?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/editing/style/push-down-inline-styles-expected.txt?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/editing/style/script-tests/push-down-inline-styles.js?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/inspector/console/console-format-style-whitelist-expected.txt?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/StylePropertySerializer.h?r1=184252&r2=184251&pathrev=184252
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/css/CSSValueList.h?r1=184252&r2=184251&pathrev=184252

StylePropertySerializer should expand all property if needed.

For example, if we have "div { all: initial; color: red; }", the all property
should be expanded to all properties with initial value, e.g. display: initial,
except color. So the expected result is "div { display: initial; ...
color: red; }".

Spec of all property: http://dev.w3.org/csswg/css-cascade/#all-shorthand

BUG= 172051 
TEST=fast/css/all-shorthand-css-text.html

Review URL: https://codereview.chromium.org/341033003
-----------------------------------------------------------------

Comment 34 Deleted

Sign in to add a comment