| 164 | } |
| 165 | |
| 166 | void 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 | |
| 179 | inline bool nthChildMatchesIndex(const int index, const int n, const int offset) { |
| 180 | // nth-child element indexes start at one |
nothing calls this directly
no test coverage detected