[webkit-reviews] review granted: [Bug 126154] Add id matching to the Selector Code Generator : [Attachment 219903] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 23 10:41:58 PST 2013
Antti Koivisto <koivisto at iki.fi> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 126154: Add id matching to the Selector Code Generator
https://bugs.webkit.org/show_bug.cgi?id=126154
Attachment 219903: Patch
https://bugs.webkit.org/attachment.cgi?id=219903&action=review
------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=219903&action=review
> Source/WebCore/cssjit/SelectorCompiler.cpp:91
> , tagName(0)
> + , id(0)
nullptr (both)
> Source/WebCore/cssjit/SelectorCompiler.cpp:216
> case CSSSelector::Id:
> + {
> + const AtomicString& id = selector->value();
I think we usually put { after case and indent only one level.
> Source/WebCore/cssjit/SelectorCompiler.cpp:763
> +
> + // Generate:
> + // elementDataAddress = element->elementData();
> + // if (!elementDataAddress)
> + // failure!
> + LocalRegister elementDataAddress(m_registerAllocator);
> + m_assembler.loadPtr(Assembler::Address(elementAddressRegister,
Element::elementDataMemoryOffset()), elementDataAddress);
> + failureCases.append(m_assembler.branchTestPtr(Assembler::Zero,
elementDataAddress));
> +
> + generateElementHasId(failureCases, elementDataAddress, *fragment.id);
> }
Would be nice if we could just write the C++ and have tooling do the rest!
More information about the webkit-reviews
mailing list