RESOLVED FIXED Bug 128728
Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
https://bugs.webkit.org/show_bug.cgi?id=128728
Summary Do not attempt to synchronize attributes when no Simple Selector could match ...
Benjamin Poulain
Reported 2014-02-13 00:42:33 PST
Do not attempt to synchronize attributes when no Simple Selector could match an animatable attribute
Attachments
Patch (23.17 KB, patch)
2014-02-13 00:50 PST, Benjamin Poulain
no flags
Benjamin Poulain
Comment 1 2014-02-13 00:50:02 PST
Andreas Kling
Comment 2 2014-02-14 00:24:41 PST
Comment on attachment 224052 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=224052&action=review r=me. This patch makes me wonder: Would it be better to skip special codegen for reifying the "style" attribute, and just make it drop to C++ slow path? No sane content will use a [style="foo"] selector anyway. > Source/WebCore/cssjit/SelectorCompiler.cpp:974 > + for (unsigned i = 0; i < fragment.attributes.size(); ++i) { range for! > Source/WebCore/cssjit/SelectorCompiler.cpp:976 > + const CSSSelector* attributeSelector = fragment.attributes[i]; > + const QualifiedName& selectorAttributeName = attributeSelector->attribute(); I wish SelectorFragment's would hand out const CSSSelector& instead.
Benjamin Poulain
Comment 3 2014-02-14 00:30:08 PST
(In reply to comment #2) > This patch makes me wonder: Would it be better to skip special codegen for reifying the "style" attribute, and just make it drop to C++ slow path? No sane content will use a [style="foo"] selector anyway. I did not bother implementing anything fast, generateSynchronizeStyleAttribute() is just a dumb function call: http://trac.webkit.org/browser/trunk/Source/WebCore/cssjit/SelectorCompiler.cpp#L954 :)
Andreas Kling
Comment 4 2014-02-14 00:42:21 PST
(In reply to comment #3) > (In reply to comment #2) > > This patch makes me wonder: Would it be better to skip special codegen for reifying the "style" attribute, and just make it drop to C++ slow path? No sane content will use a [style="foo"] selector anyway. > > I did not bother implementing anything fast, generateSynchronizeStyleAttribute() is just a dumb function call: http://trac.webkit.org/browser/trunk/Source/WebCore/cssjit/SelectorCompiler.cpp#L954 :) Ah, that looks cool. I was typing up a comment about how a fragment that can match both style and some SVG animatable attribute could combine the two bit checks into a single mask check, but that's just weird and not worth the complexity.
Benjamin Poulain
Comment 5 2014-02-14 12:53:16 PST
Comment on attachment 224052 [details] Patch Clearing flags on attachment: 224052 Committed r164123: <http://trac.webkit.org/changeset/164123>
Benjamin Poulain
Comment 6 2014-02-14 12:53:18 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.