| Summary: | Add id matching to the Selector Code Generator | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Benjamin Poulain <benjamin> | ||||
| Component: | New Bugs | Assignee: | Benjamin Poulain <benjamin> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | barraclough, cmarcelo, commit-queue, esprehn+autocc, ggaren, kangil.han, koivisto | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Benjamin Poulain
2013-12-23 03:12:30 PST
Created attachment 219903 [details]
Patch
Comment on attachment 219903 [details] Patch 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! Committed r161010: <http://trac.webkit.org/changeset/161010> |