CSS JIT: compile the :empty pseudo class
Created attachment 236629 [details] Patch
Attachment 236629 [details] did not pass style-queue: ERROR: Source/WebCore/cssjit/SelectorCompiler.cpp:2527: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebCore/cssjit/SelectorCompiler.cpp:2542: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 236629 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236629&action=review r=me > Source/WebCore/cssjit/SelectorCompiler.cpp:2465 > +static void jumpIfElementIsNotEmpty(Assembler& assembler, RegisterAllocator ®isterAllocator, Assembler::JumpList& notEmptyCases, Assembler::RegisterID element) RegisterAllocator& (& placement) > Source/WebCore/cssjit/SelectorCompiler.cpp:2515 > + if (m_selectorContext == SelectorContext::QuerySelector) { > + jumpIfElementIsNotEmpty(m_assembler, m_registerAllocator, failureCases, elementAddressRegister); > + return; > + } The querySelector path is so nice and tidy. Is the affected-by-empty bit optimization really necessary?
(In reply to comment #3) > > Source/WebCore/cssjit/SelectorCompiler.cpp:2515 > > + if (m_selectorContext == SelectorContext::QuerySelector) { > > + jumpIfElementIsNotEmpty(m_assembler, m_registerAllocator, failureCases, elementAddressRegister); > > + return; > > + } > > The querySelector path is so nice and tidy. > Is the affected-by-empty bit optimization really necessary? Today the flag avoid some style recalc when updating the tree. I suspect that flag is the cause of the bug, I will look into it in the follow up.
Committed r172619: <http://trac.webkit.org/changeset/172619>