RESOLVED FIXED 75223
StyleResolver need not allocate each MediaQueryResult on the heap
https://bugs.webkit.org/show_bug.cgi?id=75223
Summary StyleResolver need not allocate each MediaQueryResult on the heap
Darin Adler
Reported 2011-12-25 22:51:08 PST
Update CSSStyleSelector so it does not keep a vector of MediaQueryResult pointers that need to be deleted
Attachments
Patch (24.62 KB, patch)
2011-12-25 23:01 PST, Darin Adler
no flags
Patch (24.66 KB, patch)
2011-12-25 23:24 PST, Darin Adler
no flags
Patch (24.67 KB, patch)
2011-12-26 08:32 PST, Darin Adler
no flags
Patch (25.94 KB, patch)
2012-05-27 23:04 PDT, Darin Adler
no flags
Darin Adler
Comment 1 2011-12-25 23:01:05 PST
Gustavo Noronha (kov)
Comment 2 2011-12-25 23:10:57 PST
WebKit Review Bot
Comment 3 2011-12-25 23:11:58 PST
Comment on attachment 120528 [details] Patch Attachment 120528 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11017000
Early Warning System Bot
Comment 4 2011-12-25 23:14:15 PST
Darin Adler
Comment 5 2011-12-25 23:24:30 PST
WebKit Review Bot
Comment 6 2011-12-26 00:12:15 PST
Comment on attachment 120531 [details] Patch Attachment 120531 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/11018986 New failing tests: fast/media/media-query-invalid-value.html
Darin Adler
Comment 7 2011-12-26 08:32:48 PST
Daniel Bates
Comment 8 2011-12-28 12:05:58 PST
Comment on attachment 120556 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120556&action=review This patch looks good. I have some minor nits. > Source/WebCore/ChangeLog:21 > + to be a vector of values rather tha of pointers. Nit: tha => than > Source/WebCore/css/CSSStyleSelector.cpp:144 > + Nit: There is whitespace at the beginning of this line. > Source/WebCore/css/MediaQuery.cpp:120 > +} // namespace Nit: This comment should read "namespace WebCore". > Source/WebCore/css/MediaQueryEvaluator.cpp:NaN > static bool aspect_ratioMediaFeatureEval I know that this isn't part of your patch. We should consider renaming this function so that its name conforms to the WebKit style guide. Similarly, the names of many static functions in this file don't conform to the style guide. We can do such renames in a separate patch. > Source/WebCore/css/MediaQueryEvaluator.cpp:512 > #define ADD_TO_FUNCTIONMAP(name, str) \ I know that this isn't part of your patch. From my understanding of (15) of section Names of the WebKit style guide (http://www.webkit.org/coding/coding-style.html), macro functions should be named like functions. In particular, they should use CamelCase, where the first letter is capitalized. That being said, I've seen macro functions, like this one, that use an all-caps naming notation with underscores for spaces in our code base. > Source/WebCore/css/MediaQueryEvaluator.h:78 > } // namespace Nit: This comment should read "namespace WebCore".
Luke Macpherson
Comment 9 2012-01-05 16:54:47 PST
Comment on attachment 120556 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120556&action=review > Source/WebCore/css/MediaQueryEvaluator.cpp:64 > +// FIXME: color_index, min-color-index, and max_color_index are not implemented. dashes or underscores? I'm guessing these should be consistent.
Darin Adler
Comment 10 2012-05-27 23:04:04 PDT
Darin Adler
Comment 11 2012-05-28 00:11:27 PDT
Chris Dumez
Comment 12 2012-05-28 01:50:02 PDT
This patch caused more than 300 failures on EFL and GTK bots: http://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release/builds/24372
WebKit Review Bot
Comment 13 2012-05-28 01:58:34 PDT
Re-opened since this is blocked by 87639
Darin Adler
Comment 14 2012-05-28 02:47:31 PDT
Thanks for rolling this out for me. I’ll retest and find out what I screwed up.
Darin Adler
Comment 15 2016-11-11 08:56:26 PST
At some point, we fixed the style resolver to not allocate these on the heap, so closing.
Note You need to log in before you can comment on or make changes to this bug.