Lines Matching defs:newId
1014 static bool checkNeedsStyleInvalidationForIdChange(const AtomicString& oldId, const AtomicString& newId, StyleResolver* styleResolver)
1016 ASSERT(newId != oldId);
1019 if (!newId.isEmpty() && styleResolver->hasSelectorForId(newId))
1036 AtomicString newId = makeIdForStyleResolution(newValue, document()->inQuirksMode());
1037 if (newId != oldId) {
1038 elementData()->setIdForStyleResolution(newId);
1039 shouldInvalidateStyle = testShouldInvalidateStyle && checkNeedsStyleInvalidationForIdChange(oldId, newId, styleResolver);
2910 inline void Element::updateId(const AtomicString& oldId, const AtomicString& newId)
2915 if (oldId == newId)
2918 updateIdForTreeScope(treeScope(), oldId, newId);
2925 updateIdForDocument(toHTMLDocument(htmlDocument), oldId, newId, UpdateHTMLDocumentNamedItemMapsOnlyIfDiffersFromNameAttribute);
2928 void Element::updateIdForTreeScope(TreeScope* scope, const AtomicString& oldId, const AtomicString& newId)
2931 ASSERT(oldId != newId);
2935 if (!newId.isEmpty())
2936 scope->addElementById(newId, this);
2939 void Element::updateIdForDocument(HTMLDocument* document, const AtomicString& oldId, const AtomicString& newId, HTMLDocumentNamedItemMapsUpdatingCondition condition)
2942 ASSERT(oldId != newId);
2948 if (!newId.isEmpty() && newId != name)
2949 document->windowNamedItemMap().add(newId.impl(), this, treeScope());
2956 if (!newId.isEmpty() && newId != name)
2957 document->documentNamedItemMap().add(newId.impl(), this, treeScope());