Bug 126154

Summary: Add id matching to the Selector Code Generator
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: 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 Flags
Patch koivisto: review+

Benjamin Poulain
Reported 2013-12-23 03:12:30 PST
Add id matching to the Selector Code Generator
Attachments
Patch (8.79 KB, patch)
2013-12-23 03:15 PST, Benjamin Poulain
koivisto: review+
Benjamin Poulain
Comment 1 2013-12-23 03:15:33 PST
Antti Koivisto
Comment 2 2013-12-23 10:39:59 PST
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!
Benjamin Poulain
Comment 3 2013-12-23 12:18:13 PST
Note You need to log in before you can comment on or make changes to this bug.