| Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| index 45cf6917e7ef553671e5368311fd6165371e64b3..9cba72e0fc09f9e30bc56ef05e29d760eebf8cd8 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| @@ -153,11 +153,10 @@ void HTMLFrameOwnerElement::setContentFrame(Frame& frame)
|
| // Make sure we will not end up with two frames referencing the same owner element.
|
| ASSERT(!m_contentFrame || m_contentFrame->owner() != this);
|
| // Disconnected frames should not be allowed to load.
|
| - ASSERT(inDocument());
|
| - m_contentFrame = &frame;
|
| + ASSERT(inActiveDocument());
|
|
|
| - for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode())
|
| - node->incrementConnectedSubframeCount();
|
| + m_contentFrame = &frame;
|
| + document().subframeTracker().connectSubframe(*this);
|
| }
|
|
|
| void HTMLFrameOwnerElement::clearContentFrame()
|
| @@ -165,10 +164,10 @@ void HTMLFrameOwnerElement::clearContentFrame()
|
| if (!m_contentFrame)
|
| return;
|
|
|
| + // If there's a connected content frame, the parent frame must be active.
|
| + ASSERT(inActiveDocument());
|
| m_contentFrame = nullptr;
|
| -
|
| - for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode())
|
| - node->decrementConnectedSubframeCount();
|
| + document().subframeTracker().disconnectSubframe(*this);
|
| }
|
|
|
| void HTMLFrameOwnerElement::disconnectContentFrame()
|
|
|