HTMLImport* HTMLImport::root() { HTMLImport* i = this; while (i->parent()) i = i->parent(); return i; }
static bool makesCycle(HTMLImport* parent, const KURL& url) { for (HTMLImport* ancestor = parent; ancestor; ancestor = ancestor->parent()) { if (!ancestor->isRoot() && equalIgnoringFragmentIdentifier(toHTMLImportChild(parent)->url(), url)) return true; } return false; }
inline bool HTMLImportStateResolver::shouldBlockScriptExecution() const { // FIXME: Memoize to make this faster. for (HTMLImport* ancestor = m_import; ancestor; ancestor = ancestor->parent()) { for (HTMLImport* predecessor = ancestor->previous(); predecessor; predecessor = predecessor->previous()) { if (isBlockingFollowers(predecessor)) return true; } } for (HTMLImport* child = m_import->firstChild(); child; child = child->next()) { if (isBlockingFollowers(child)) return true; } return false; }