Title: [102119] trunk/Source/WebCore
- Revision
- 102119
- Author
- [email protected]
- Date
- 2011-12-06 03:30:45 -0800 (Tue, 06 Dec 2011)
Log Message
[Refactoring] Accessing Node::m_document should be minimized.
https://bugs.webkit.org/show_bug.cgi?id=73800
Patch by Hajime Morrita <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102118 => 102119)
--- trunk/Source/WebCore/ChangeLog 2011-12-06 11:24:03 UTC (rev 102118)
+++ trunk/Source/WebCore/ChangeLog 2011-12-06 11:30:45 UTC (rev 102119)
@@ -1,3 +1,21 @@
+2011-12-06 Hajime Morrita <[email protected]>
+
+ [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):
+
2011-12-06 Shinya Kawanaka <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=73889
Modified: trunk/Source/WebCore/dom/Document.h (102118 => 102119)
--- trunk/Source/WebCore/dom/Document.h 2011-12-06 11:24:03 UTC (rev 102118)
+++ trunk/Source/WebCore/dom/Document.h 2011-12-06 11:30:45 UTC (rev 102119)
@@ -1449,8 +1449,8 @@
, m_next(0)
, m_renderer(0)
{
- if (m_document)
- m_document->guardRef();
+ if (document)
+ document->guardRef();
#if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS)
trackForDebugging();
#endif
Modified: trunk/Source/WebCore/dom/Node.cpp (102118 => 102119)
--- trunk/Source/WebCore/dom/Node.cpp 2011-12-06 11:24:03 UTC (rev 102118)
+++ trunk/Source/WebCore/dom/Node.cpp 2011-12-06 11:30:45 UTC (rev 102119)
@@ -404,16 +404,17 @@
if (renderer())
detach();
- if (AXObjectCache::accessibilityEnabled() && m_document && m_document->axObjectCacheExists())
- m_document->axObjectCache()->removeNodeForUse(this);
+ Document* doc = m_document;
+ if (AXObjectCache::accessibilityEnabled() && doc && doc->axObjectCacheExists())
+ doc->axObjectCache()->removeNodeForUse(this);
if (m_previous)
m_previous->setNextSibling(0);
if (m_next)
m_next->setPreviousSibling(0);
- if (m_document)
- m_document->guardDeref();
+ if (doc)
+ doc->guardDeref();
}
#ifdef NDEBUG
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes