RESOLVED FIXED 76043
CSSStyleSelector constructor and appendAuthorStylesheets() contain duplicated code
https://bugs.webkit.org/show_bug.cgi?id=76043
Summary CSSStyleSelector constructor and appendAuthorStylesheets() contain duplicated...
Roland Steiner
Reported 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.
Attachments
Patch (6.76 KB, patch)
2012-01-11 02:37 PST, Roland Steiner
no flags
new patch, smaller (2.50 KB, patch)
2012-01-15 18:19 PST, Roland Steiner
no flags
new patch, fixed (2.50 KB, patch)
2012-01-15 19:38 PST, Roland Steiner
no flags
Roland Steiner
Comment 1 2012-01-11 02:37:54 PST
Antti Koivisto
Comment 2 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.
Roland Steiner
Comment 3 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).
Gyuyoung Kim
Comment 4 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
Early Warning System Bot
Comment 5 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
WebKit Review Bot
Comment 6 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
Roland Steiner
Comment 7 2012-01-15 19:38:27 PST
Created attachment 122583 [details] new patch, fixed
Antti Koivisto
Comment 8 2012-01-16 03:29:17 PST
Comment on attachment 122583 [details] new patch, fixed r=me
WebKit Review Bot
Comment 9 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>
WebKit Review Bot
Comment 10 2012-01-16 04:05:26 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.