Title: [101983] trunk/Source/WebCore
- Revision
- 101983
- Author
- [email protected]
- Date
- 2011-12-05 03:15:19 -0800 (Mon, 05 Dec 2011)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101982 => 101983)
--- trunk/Source/WebCore/ChangeLog 2011-12-05 10:00:11 UTC (rev 101982)
+++ trunk/Source/WebCore/ChangeLog 2011-12-05 11:15:19 UTC (rev 101983)
@@ -1,3 +1,23 @@
+2011-12-05 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):
+ * dom/Node.h:
+ (WebCore::Node::inDocument):
+
2011-12-05 Shinya Kawanaka <[email protected]>
Asynchronous SpellChecker should consider multiple requests.
Modified: trunk/Source/WebCore/dom/Document.h (101982 => 101983)
--- trunk/Source/WebCore/dom/Document.h 2011-12-05 10:00:11 UTC (rev 101982)
+++ trunk/Source/WebCore/dom/Document.h 2011-12-05 11:15:19 UTC (rev 101983)
@@ -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 (101982 => 101983)
--- trunk/Source/WebCore/dom/Node.cpp 2011-12-05 10:00:11 UTC (rev 101982)
+++ trunk/Source/WebCore/dom/Node.cpp 2011-12-05 11:15:19 UTC (rev 101983)
@@ -404,16 +404,17 @@
if (renderer())
detach();
- if (AXObjectCache::accessibilityEnabled() && m_document && m_document->axObjectCacheExists())
- m_document->axObjectCache()->removeNodeForUse(this);
+ Document* doc = 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
Modified: trunk/Source/WebCore/dom/Node.h (101982 => 101983)
--- trunk/Source/WebCore/dom/Node.h 2011-12-05 10:00:11 UTC (rev 101982)
+++ trunk/Source/WebCore/dom/Node.h 2011-12-05 11:15:19 UTC (rev 101983)
@@ -388,7 +388,7 @@
// node tree, false otherwise.
bool inDocument() const
{
- ASSERT(m_document || !getFlag(InDocumentFlag));
+ ASSERT(document() || !getFlag(InDocumentFlag));
return getFlag(InDocumentFlag);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes