⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 101983 in webkit


Ignore:
Timestamp:
Dec 5, 2011, 3:15:19 AM (15 years ago)
Author:
morrita@google.com
Message:

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

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

  • dom/Node.h:

(WebCore::Node::inDocument):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r101978 r101983  
     12011-12-05  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        * dom/Node.h:
     19        (WebCore::Node::inDocument):
     20
    1212011-12-05  Shinya Kawanaka  <shinyak@google.com>
    222
  • trunk/Source/WebCore/dom/Document.h

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

    r101967 r101983  
    405405        detach();
    406406
    407     if (AXObjectCache::accessibilityEnabled() && m_document && m_document->axObjectCacheExists())
    408         m_document->axObjectCache()->removeNodeForUse(this);
     407    Document* doc = 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
  • trunk/Source/WebCore/dom/Node.h

    r101144 r101983  
    389389    bool inDocument() const
    390390    {
    391         ASSERT(m_document || !getFlag(InDocumentFlag));
     391        ASSERT(document() || !getFlag(InDocumentFlag));
    392392        return getFlag(InDocumentFlag);
    393393    }
Note: See TracChangeset for help on using the changeset viewer.