MCPcopy Create free account
hub / github.com/Snapchat/Valdi / insertDeclarations

Method insertDeclarations

valdi/src/valdi/runtime/CSS/CSSNode.cpp:166–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void CSSNode::insertDeclarations(const CSSDocument& cssDocument,
167 const CSSStyleNode& styleNode,
168 AttributesApplier& attributesApplier,
169 FlatMap<AttributeId, const CSSStyleDeclaration*>& bestStyleDeclarationByKey) {
170 for (const auto& decl : styleNode.styles) {
171 insertDeclarationIfNeeded(decl, bestStyleDeclarationByKey);
172 }
173
174 if (styleNode.ruleIndex != nullptr) {
175 insertDeclarations(cssDocument, *styleNode.ruleIndex, attributesApplier, bestStyleDeclarationByKey);
176 }
177}
178
179inline bool nthChildMatchesIndex(const int index, const int n, const int offset) {
180 // nth-child element indexes start at one

Callers

nothing calls this directly

Calls 8

nthChildMatchesIndexFunction · 0.85
resolveParentMethod · 0.80
endMethod · 0.65
emptyMethod · 0.45
findMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected