Bug 36304 - Web Inspector: CSS shorthand properties expand unnecessarily
Summary: Web Inspector: CSS shorthand properties expand unnecessarily
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2010-03-18 10:54 PDT by paradox
Modified: 2010-12-24 04:05 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Suggested fix (5.57 KB, patch)
2010-12-23 02:48 PST, Alexander Pavlov (apavlov)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description paradox 2010-03-18 10:54:41 PDT
If you type certain properties into the web inspectors CSS edit area, they expand in a manner that can prove quite annoying.

To reproduce, open inspector, and add a new property. Type border-radius: 5px; Hit return
The property will expand to 4 different properties: border-top-left-radius: 5px 5px; etc

Possible solution:
Cause the border-radius to remain as one complex syntax, with an expanding dropdown, much like with other properties, of the sub-properties.
Comment 1 Timothy Hatcher 2010-03-18 11:02:27 PDT
This is a regression. We use to handle this correctly.
Comment 2 Pavel Feldman 2010-03-18 11:23:47 PDT
(In reply to comment #1)
> This is a regression. We use to handle this correctly.

That's what comment was saying:

// Some shorthands (like border) return a null value, so compute a shorthand value. 
// FIXME: remove this when http://bugs.webkit.org/show_bug.cgi?id=15823 is fixed.

Turns out it was not only 15823.
Comment 3 Pavel Feldman 2010-03-18 11:26:26 PDT
Ok, I can now see that the bug is still open. Turns out only test has landed for it. Bringing the hack back...
Comment 4 Pavel Feldman 2010-03-18 11:52:09 PDT
I don't think this is regression - style does not return shorthand for border-radius specifically. It works with the rest of the shorthands.
Comment 5 Alexander Pavlov (apavlov) 2010-12-23 02:48:22 PST
Created attachment 77319 [details]
[PATCH] Suggested fix
Comment 6 Eric Seidel (no email) 2010-12-24 01:32:54 PST
Comment on attachment 77319 [details]
[PATCH] Suggested fix

View in context: https://bugs.webkit.org/attachment.cgi?id=77319&action=review

This patch needs more explanation in the ChangeLog of what's going on and why its' right.

> WebCore/css/CSSParser.cpp:4601
> +    m_implicitShorthand = true;

Why is this needed separately from a shorthand scope?
Comment 7 Maciej Stachowiak 2010-12-24 01:37:00 PST
Comment on attachment 77319 [details]
[PATCH] Suggested fix

r=me
Comment 8 Maciej Stachowiak 2010-12-24 01:40:43 PST
Comment on attachment 77319 [details]
[PATCH] Suggested fix

r=me
Comment 9 Alexander Pavlov (apavlov) 2010-12-24 03:50:40 PST
(In reply to comment #6)
> (From update of attachment 77319 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=77319&action=review
> 
> This patch needs more explanation in the ChangeLog of what's going on and why its' right.

Fixed.

> > WebCore/css/CSSParser.cpp:4601
> > +    m_implicitShorthand = true;
> 
> Why is this needed separately from a shorthand scope?

Filed bug 51586 for that.
Comment 10 Alexander Pavlov (apavlov) 2010-12-24 04:05:13 PST
Landed with the comments addressed: http://trac.webkit.org/changeset/74630