| Index: Source/core/dom/StyleSheetCandidate.cpp
|
| diff --git a/Source/core/dom/StyleSheetCandidate.cpp b/Source/core/dom/StyleSheetCandidate.cpp
|
| index 428fab8e52a25f09e7a93ad229d7142b61219fde..0452f308de50eb71f04748ef807914d94c6cc7a3 100644
|
| --- a/Source/core/dom/StyleSheetCandidate.cpp
|
| +++ b/Source/core/dom/StyleSheetCandidate.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "core/dom/Element.h"
|
| #include "core/dom/ProcessingInstruction.h"
|
| #include "core/dom/StyleEngine.h"
|
| +#include "core/html/HTMLImport.h"
|
| #include "core/html/HTMLLinkElement.h"
|
| #include "core/html/HTMLStyleElement.h"
|
| #include "core/svg/SVGStyleElement.h"
|
| @@ -57,7 +58,12 @@ bool StyleSheetCandidate::isImport() const
|
| Document* StyleSheetCandidate::importedDocument() const
|
| {
|
| ASSERT(isImport());
|
| - return toHTMLLinkElement(m_node).import();
|
| + // The stylesheet update traversal shouldn't go into shared import
|
| + // to prevent it from stepping into cycle.
|
| + HTMLLinkElement& element = toHTMLLinkElement(m_node);
|
| + if (!element.importOwnsLoader())
|
| + return 0;
|
| + return element.import();
|
| }
|
|
|
| bool StyleSheetCandidate::isAlternate() const
|
|
|