Changeset 101983 in webkit
- Timestamp:
- Dec 5, 2011, 3:15:19 AM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
dom/Document.h (modified) (1 diff)
-
dom/Node.cpp (modified) (2 diffs)
-
dom/Node.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r101978 r101983 1 2011-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 1 21 2011-12-05 Shinya Kawanaka <shinyak@google.com> 2 22 -
trunk/Source/WebCore/dom/Document.h
r101932 r101983 1450 1450 , m_renderer(0) 1451 1451 { 1452 if ( m_document)1453 m_document->guardRef();1452 if (document) 1453 document->guardRef(); 1454 1454 #if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS) 1455 1455 trackForDebugging(); -
trunk/Source/WebCore/dom/Node.cpp
r101967 r101983 405 405 detach(); 406 406 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); 409 410 410 411 if (m_previous) … … 413 414 m_next->setPreviousSibling(0); 414 415 415 if ( m_document)416 m_document->guardDeref();416 if (doc) 417 doc->guardDeref(); 417 418 } 418 419 -
trunk/Source/WebCore/dom/Node.h
r101144 r101983 389 389 bool inDocument() const 390 390 { 391 ASSERT( m_document|| !getFlag(InDocumentFlag));391 ASSERT(document() || !getFlag(InDocumentFlag)); 392 392 return getFlag(InDocumentFlag); 393 393 }
Note:
See TracChangeset
for help on using the changeset viewer.