Bug 82624 - Rename CSSPropertyLonghand class to StylePropertyShorthand.
Summary: Rename CSSPropertyLonghand class to StylePropertyShorthand.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexis Menard (darktears)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 09:41 PDT by Alexis Menard (darktears)
Modified: 2012-04-02 07:20 PDT (History)
8 users (show)

See Also:


Attachments
Patch (83.19 KB, patch)
2012-03-29 09:46 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (83.04 KB, patch)
2012-03-29 09:56 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (83.09 KB, patch)
2012-03-29 10:07 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (83.26 KB, patch)
2012-03-29 12:24 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (77.67 KB, patch)
2012-03-29 13:56 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (108.46 KB, patch)
2012-04-02 05:21 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff
Patch (109.31 KB, patch)
2012-04-02 06:14 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Menard (darktears) 2012-03-29 09:41:46 PDT
Remove CSSPropertyLonghand object to simplify CSS shorthand handling.
Comment 1 Alexis Menard (darktears) 2012-03-29 09:46:11 PDT
Created attachment 134602 [details]
Patch
Comment 2 Alexis Menard (darktears) 2012-03-29 09:49:45 PDT
Antti I implemented what we talked yesterday. What do you think?

Do you think it is better or should we go back to the old approach and just rename the CSSPropertyLonghand class to ShorthandProperties?

I find this approach more error prone.

Let's see what EWS says also :).
Comment 3 Alexis Menard (darktears) 2012-03-29 09:56:58 PDT
Created attachment 134604 [details]
Patch
Comment 4 Alexis Menard (darktears) 2012-03-29 10:07:16 PDT
Created attachment 134609 [details]
Patch
Comment 5 Alexis Menard (darktears) 2012-03-29 12:24:05 PDT
Created attachment 134641 [details]
Patch

This should fix the regressions
Comment 6 Eric Seidel (no email) 2012-03-29 13:15:56 PDT
Comment on attachment 134641 [details]
Patch

I'm confused why a CSSPropertyID* which points to an array of unspecified length, is better/safer than a class.  This seems backwards.
Comment 7 Eric Seidel (no email) 2012-03-29 13:16:26 PDT
I think this change, as written would be asking for crashes.
Comment 8 Alexis Menard (darktears) 2012-03-29 13:56:09 PDT
Created attachment 134660 [details]
Patch

Alternative patch
Comment 9 Ryosuke Niwa 2012-03-29 14:07:23 PDT
Comment on attachment 134660 [details]
Patch

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

> Source/WebCore/css/CSSPropertyLonghand.h:61
> +const ShorthandProperties& backgroundLonghand();

I think the class name should be singular here since this class represents a list of longhand properties for a signle shorthand property.
Comment 10 Ryosuke Niwa 2012-03-29 14:08:18 PDT
Also we should probably keep CSS prefix since shorthand is a quite generic name.
Comment 11 Alexis Menard (darktears) 2012-03-29 15:40:07 PDT
(In reply to comment #9)
> (From update of attachment 134660 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=134660&action=review
> 
> > Source/WebCore/css/CSSPropertyLonghand.h:61
> > +const ShorthandProperties& backgroundLonghand();
> 
> I think the class name should be singular here since this class represents a list of longhand properties for a signle shorthand property.

so you would do const ShorthandProperty& backgroundShorthand()
Comment 12 Alexis Menard (darktears) 2012-03-29 15:40:48 PDT
(In reply to comment #10)
> Also we should probably keep CSS prefix since shorthand is a quite generic name.

Well it seems we start using CSS prefix only for CSSOM classes. This one is implementation detail.
Comment 13 Ryosuke Niwa 2012-03-29 15:53:11 PDT
(In reply to comment #12)
> (In reply to comment #10)
> > Also we should probably keep CSS prefix since shorthand is a quite generic name.
> 
> Well it seems we start using CSS prefix only for CSSOM classes. This one is implementation detail.

Okay.
Comment 14 Alexis Menard (darktears) 2012-04-02 05:21:10 PDT
Created attachment 135072 [details]
Patch
Comment 15 Alexis Menard (darktears) 2012-04-02 06:14:34 PDT
Created attachment 135082 [details]
Patch
Comment 16 Antti Koivisto 2012-04-02 06:16:27 PDT
Comment on attachment 135082 [details]
Patch

r=me
Comment 17 WebKit Review Bot 2012-04-02 07:20:05 PDT
Comment on attachment 135082 [details]
Patch

Clearing flags on attachment: 135082

Committed r112880: <http://trac.webkit.org/changeset/112880>
Comment 18 WebKit Review Bot 2012-04-02 07:20:11 PDT
All reviewed patches have been landed.  Closing bug.