[Webkit-unassigned] [Bug 96084] New: we has no deed to call "Document::removeFocusedNodeOfSubtree()" after call "Document::prepareForDestruction()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 7 02:07:04 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=96084
Summary: we has no deed to call
"Document::removeFocusedNodeOfSubtree()" after call
"Document::prepareForDestruction()
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
URL: http%3A%2F%2F
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: 261000975 at 163.com
i'm fused by function" FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView)", in this method
we have code like this:
if (!m_frame->document()->inPageCache()) {
m_frame->document()->cancelParsing();
m_frame->document()->stopActiveDOMObjects();
if (m_frame->document()->attached()) {
m_frame->document()->prepareForDestruction();
m_frame->document()->removeFocusedNodeOfSubtree(m_frame->document());
}
}
step 1:"Document::prepareForDestruction()" will call "Document::detach()", in detach() method, we will make m_focusedNode = 0;
void Document::prepareForDestruction()
{
disconnectDescendantFrames();
if (DOMWindow* window = this->domWindow())
window->willDetachDocumentFromFrame();
detach();
}
step2:"Document::removeFocusedNodeOfSubtree(Node* node, bool amongChildrenOnly)" will return first when m_focusedNode = 0;
void Document::removeFocusedNodeOfSubtree(Node* node, bool amongChildrenOnly)
{
if (!m_focusedNode || this->inPageCache()) // If the document is in the page cache, then we don't need to clear out the focused node.
return;
bool nodeInSubtree = false;
if (amongChildrenOnly)
nodeInSubtree = m_focusedNode->isDescendantOf(node);
else
nodeInSubtree = (m_focusedNode == node) || m_focusedNode->isDescendantOf(node);
if (nodeInSubtree)
document()->focusedNodeRemoved();
}
step3: this means we has no deed to call "Document::removeFocusedNodeOfSubtree()" after call "Document::prepareForDestruction()"
may be , m_focusedNode will be set value in Document::detach().but This is real we want ?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list