Bug 111505 - Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
Summary: Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on: 111481
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-05 18:08 PST by Julien Chaffraix
Modified: 2013-03-06 05:33 PST (History)
8 users (show)

See Also:


Attachments
Proposed removal and refactoring. Should prevent future abuse. The ASSERT will trigger without bug 111481. (47.14 KB, patch)
2013-03-05 18:29 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2013-03-05 18:08:58 PST
While working on a change, I discovered that most people add handling for shorthands inside either StyleResolver or StyleBuilder (you can check that all of the shorthands are mentioned at some point).

However we do expand most shorthands** to their longhands during parsing so all this code is effectively dead. The main issue is that people don't know about the previous expansion and thus repeat what the old code did. If we remove this code, we need to add some ASSERTs to ensure that people don't fall back into copying and pasting.

**  The only exception is 'font' which is special due to system fonts (but we handle it in a way that is not compliant with CSS 3 Fonts)
Comment 1 Julien Chaffraix 2013-03-05 18:29:07 PST
Created attachment 191631 [details]
Proposed removal and refactoring. Should prevent future abuse. The ASSERT will trigger without bug 111481.
Comment 2 Andreas Kling 2013-03-06 04:20:28 PST
This looks like a great idea. :)
Comment 3 Alexis Menard (darktears) 2013-03-06 04:25:05 PST
(In reply to comment #2)
> This looks like a great idea. :)

It is. The patch needed has landed. I'll put that in EWS soon and review it.
Comment 4 Alexis Menard (darktears) 2013-03-06 05:18:36 PST
r=me. awesome cleanup!
Comment 5 WebKit Review Bot 2013-03-06 05:33:21 PST
Comment on attachment 191631 [details]
Proposed removal and refactoring. Should prevent future abuse. The ASSERT will trigger without bug 111481.

Clearing flags on attachment: 191631

Committed r144912: <http://trac.webkit.org/changeset/144912>
Comment 6 WebKit Review Bot 2013-03-06 05:33:25 PST
All reviewed patches have been landed.  Closing bug.