Changeset 102119 in webkit


Ignore:
Timestamp:
Dec 6, 2011 3:30:45 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Refactoring] Accessing Node::m_document should be minimized.
https://bugs.webkit.org/show_bug.cgi?id=73800

Patch by Hajime Morrita <morrita@chromium.org> on 2011-12-06
Reviewed by Kent Tamura.

No new tests. No behavioral change.

Replaced m_document reference with the document() accessor
or temporaril variables. This is a preparation for using
m_document space to point a shadow root pointer.

  • dom/Document.h:

(WebCore::Node::Node):

  • dom/Node.cpp:

(WebCore::Node::~Node):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r102118 r102119  
     12011-12-06  Hajime Morrita  <morrita@chromium.org>
     2
     3        [Refactoring] Accessing Node::m_document should be minimized.
     4        https://bugs.webkit.org/show_bug.cgi?id=73800
     5
     6        Reviewed by Kent Tamura.
     7
     8        No new tests. No behavioral change.
     9
     10        Replaced m_document reference with the document() accessor
     11        or temporaril variables. This is a preparation for using
     12        m_document space to point a shadow root pointer.
     13
     14        * dom/Document.h:
     15        (WebCore::Node::Node):
     16        * dom/Node.cpp:
     17        (WebCore::Node::~Node):
     18
    1192011-12-06  Shinya Kawanaka  <shinyak@google.com>
    220
  • trunk/Source/WebCore/dom/Document.h

    r101995 r102119  
    14501450    , m_renderer(0)
    14511451{
    1452     if (m_document)
    1453         m_document->guardRef();
     1452    if (document)
     1453        document->guardRef();
    14541454#if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS)
    14551455    trackForDebugging();
  • trunk/Source/WebCore/dom/Node.cpp

    r102081 r102119  
    405405        detach();
    406406
    407     if (AXObjectCache::accessibilityEnabled() && m_document && m_document->axObjectCacheExists())
    408         m_document->axObjectCache()->removeNodeForUse(this);
     407    Document* doc = m_document;
     408    if (AXObjectCache::accessibilityEnabled() && doc && doc->axObjectCacheExists())
     409        doc->axObjectCache()->removeNodeForUse(this);
    409410   
    410411    if (m_previous)
     
    413414        m_next->setPreviousSibling(0);
    414415
    415     if (m_document)
    416         m_document->guardDeref();
     416    if (doc)
     417        doc->guardDeref();
    417418}
    418419
Note: See TracChangeset for help on using the changeset viewer.