| Index: Source/core/html/HTMLImport.cpp
|
| diff --git a/Source/core/html/HTMLImport.cpp b/Source/core/html/HTMLImport.cpp
|
| index c136788fad9fa3ca6f26a3ea432e618fa558537c..abc6da56420b4719149bc322d4037536783c9481 100644
|
| --- a/Source/core/html/HTMLImport.cpp
|
| +++ b/Source/core/html/HTMLImport.cpp
|
| @@ -54,18 +54,16 @@ void HTMLImport::appendChild(HTMLImport* child)
|
| {
|
| if (isBlockedFromRunningScript())
|
| child->blockFromRunningScript();
|
| - if (lastChild() && lastChild()->isBlockingFollowersFromCreatingDocument())
|
| - child->blockFromCreatingDocument();
|
| TreeNode<HTMLImport>::appendChild(child);
|
| if (child->isCreatedByParser())
|
| blockPredecessorsOf(child);
|
| }
|
|
|
| -inline bool HTMLImport::isBlockedFromCreatingDocumentByPredecessors() const
|
| +bool HTMLImport::isBlockedFromCreatingDocument() const
|
| {
|
| - ASSERT(isBlockedFromCreatingDocument());
|
| - HTMLImport* elder = previous();
|
| - return (elder && !elder->isDone());
|
| + if (hasLoader())
|
| + return false;
|
| + return previous() && previous()->isBlockingFollowersFromCreatingDocument();
|
| }
|
|
|
| bool HTMLImport::isBlockedFromRunningScriptByPredecessors() const
|
| @@ -96,12 +94,6 @@ void HTMLImport::blockFromRunningScript()
|
| m_state = BlockedFromRunningScript;
|
| }
|
|
|
| -void HTMLImport::blockFromCreatingDocument()
|
| -{
|
| - if (BlockedFromCreatingDocument < m_state)
|
| - m_state = BlockedFromCreatingDocument;
|
| -}
|
| -
|
| void HTMLImport::becomeReady()
|
| {
|
| if (!isBlocked())
|
| @@ -118,14 +110,6 @@ void HTMLImport::unblockFromRunningScript()
|
| didUnblockFromRunningScript();
|
| }
|
|
|
| -void HTMLImport::unblockFromCreatingDocument()
|
| -{
|
| - if (!isBlockedFromCreatingDocument())
|
| - return;
|
| - m_state = BlockedFromRunningScript;
|
| - didUnblockFromCreatingDocument();
|
| -}
|
| -
|
| void HTMLImport::didUnblockFromRunningScript()
|
| {
|
| ASSERT(!isBlockedFromCreatingDocument());
|
| @@ -146,7 +130,6 @@ void HTMLImport::didUnblockFromCreatingDocument()
|
|
|
| void HTMLImport::loaderWasResolved()
|
| {
|
| - unblockFromCreatingDocument();
|
| unblockFromRunningScript();
|
| }
|
|
|
| @@ -179,9 +162,9 @@ bool HTMLImport::unblock(HTMLImport* import)
|
| {
|
| ASSERT(!import->isBlockedFromRunningScriptByPredecessors());
|
|
|
| - if (import->isBlockedFromCreatingDocument() && import->isBlockedFromCreatingDocumentByPredecessors())
|
| + if (import->isBlockedFromCreatingDocument())
|
| return false;
|
| - import->unblockFromCreatingDocument();
|
| + import->didUnblockFromCreatingDocument();
|
|
|
| for (HTMLImport* child = import->firstChild(); child; child = child->next()) {
|
| if (!unblock(child))
|
|
|