void ShadowRoot::hostChildrenChanged() { if (!hasContentElement()) return; // This results in forced detaching/attaching of the shadow render tree. See ShadowRoot::recalcStyle(). setNeedsStyleRecalc(); }
void ShadowRoot::recalcStyle(StyleChange change) { if (hasContentElement()) forceReattach(this); else { for (Node* n = firstChild(); n; n = n->nextSibling()) n->recalcStyle(change); } clearNeedsStyleRecalc(); clearChildNeedsStyleRecalc(); }
void ShadowRoot::recalcShadowTreeStyle(StyleChange change) { if (hasContentElement()) reattach(); else { for (Node* n = firstChild(); n; n = n->nextSibling()) { if (n->isElementNode()) static_cast<Element*>(n)->recalcStyle(change); else if (n->isTextNode()) static_cast<Text*>(n)->recalcTextStyle(change); } } clearNeedsStyleRecalc(); clearChildNeedsStyleRecalc(); }
bool ShadowRoot::hasInsertionPoint() const { return hasShadowInsertionPoint() || hasContentElement(); }