[Webkit-unassigned] [Bug 96084] There is no need to call "Document::removeFocusedNodeOfSubtree()" after calling "Document::prepareForDestruction()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 10 21:06:05 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=96084


linyufei <elfylin at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elfylin at gmail.com




--- Comment #1 from linyufei <elfylin at gmail.com>  2012-09-10 21:06:26 PST ---
I am also confused with this issue:
void FrameLoader::clear(bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView)
{
    m_frame->editor()->clear();

    if (!m_needsClear)
        return;
    m_needsClear = false;

    if (!m_frame->document()->inPageCache()) {
        m_frame->document()->cancelParsing();
        m_frame->document()->stopActiveDOMObjects();
        if (m_frame->document()->attached()) {
            m_frame->document()->willRemove();
            m_frame->document()->detach();

            m_frame->document()->removeFocusedNodeOfSubtree(m_frame->document());
        }
    }

since"m_frame->document()->detach()" will set the document's focusenode null
and "removeFocusedNodeOfSubtree" will return if the document's focusnode is null.

So the code in removeFocusedNodeOfSubtree will never be called.

And I wonder why will there be such a statement.

Anyone knows? Thank you!

-- 
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