Bug 111505

Summary: Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: CSSAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, esprehn+autocc, kling, koivisto, macpherson, menard, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 111481    
Bug Blocks:    
Attachments:
Description Flags
Proposed removal and refactoring. Should prevent future abuse. The ASSERT will trigger without bug 111481. none

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.