|Summary:||CSSStyleSelector constructor and appendAuthorStylesheets() contain duplicated code|
|Product:||WebKit||Reporter:||Roland Steiner <rolandsteiner>|
|Component:||CSS||Assignee:||Roland Steiner <rolandsteiner>|
|Severity:||Normal||CC:||dglazkov, dominicc, hyatt, koivisto, macpherson, webkit.review.bot|
|Version:||528+ (Nightly build)|
|Bug Depends on:|
Description Roland Steiner 2012-01-11 02:33:14 PST
The end of the constructor and appendAuthorStylesheets contain what is essentially the same code. It should be possible to use a common function that handles appending author stylesheets.
Comment 2 Antti Koivisto 2012-01-12 04:26:02 PST
Comment on attachment 121998 [details] Patch I don't think this is right factoring. We will need to do collectFeatures differently in append case to avoid going through all the stylesheets again. We don't generally use iterators with Vectors. I'd like to eliminate the pointless StyleSheetVector typedef.
Comment 3 Roland Steiner 2012-01-15 18:19:54 PST
Created attachment 122579 [details] new patch, smaller New, smaller patch. Adds a const-accessor for the vector to StyleSheetList. Perhaps not terribly elegant, but it's a) const only and b) there's a precedent with StyleSheetList::swap(). This way no iterators are necessary (still using 'StyleSheetVector' within StyleSheetList for consistency).
Comment 4 Gyuyoung Kim 2012-01-15 18:24:35 PST
Comment on attachment 122579 [details] new patch, smaller Attachment 122579 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/11214031
Comment 5 Early Warning System Bot 2012-01-15 18:24:39 PST
Comment on attachment 122579 [details] new patch, smaller Attachment 122579 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/11251031
Comment 6 WebKit Review Bot 2012-01-15 18:44:18 PST
Comment on attachment 122579 [details] new patch, smaller Attachment 122579 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11254025
Comment 7 Roland Steiner 2012-01-15 19:38:27 PST
Created attachment 122583 [details] new patch, fixed
Comment 8 Antti Koivisto 2012-01-16 03:29:17 PST
Comment on attachment 122583 [details] new patch, fixed r=me
Comment 9 WebKit Review Bot 2012-01-16 04:05:21 PST
Comment on attachment 122583 [details] new patch, fixed Clearing flags on attachment: 122583 Committed r105052: <http://trac.webkit.org/changeset/105052>
Comment 10 WebKit Review Bot 2012-01-16 04:05:26 PST
All reviewed patches have been landed. Closing bug.