Title: [161024] trunk/Source/WebCore
- Revision
- 161024
- Author
- [email protected]
- Date
- 2013-12-23 14:51:21 -0800 (Mon, 23 Dec 2013)
Log Message
Use isDocumentFragment() instead of comparing nodeType() with Node::DOCUMENT_FRAGMENT_NODE
https://bugs.webkit.org/show_bug.cgi?id=126178
Reviewed by Antti Koivisto.
Inspired by https://chromium.googlesource.com/chromium/blink/+/a622cb80af2bfb0c5d91123cbcfa4fa72a06554c
Use inline Node::isDocumentFragment() instead of virtual nodeType().
* dom/ContainerNode.cpp:
(WebCore::collectChildrenAndRemoveFromOldParent):
* dom/Document.cpp:
(WebCore::Document::canReplaceChild):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (161023 => 161024)
--- trunk/Source/WebCore/ChangeLog 2013-12-23 22:41:10 UTC (rev 161023)
+++ trunk/Source/WebCore/ChangeLog 2013-12-23 22:51:21 UTC (rev 161024)
@@ -1,3 +1,19 @@
+2013-12-23 Ryosuke Niwa <[email protected]>
+
+ Use isDocumentFragment() instead of comparing nodeType() with Node::DOCUMENT_FRAGMENT_NODE
+ https://bugs.webkit.org/show_bug.cgi?id=126178
+
+ Reviewed by Antti Koivisto.
+
+ Inspired by https://chromium.googlesource.com/chromium/blink/+/a622cb80af2bfb0c5d91123cbcfa4fa72a06554c
+
+ Use inline Node::isDocumentFragment() instead of virtual nodeType().
+
+ * dom/ContainerNode.cpp:
+ (WebCore::collectChildrenAndRemoveFromOldParent):
+ * dom/Document.cpp:
+ (WebCore::Document::canReplaceChild):
+
2013-12-23 Gwang Yoon Hwang <[email protected]>
Clear ScratchBuffer::m_lastLayerSize when clearing the scratch buffer.
Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (161023 => 161024)
--- trunk/Source/WebCore/dom/ContainerNode.cpp 2013-12-23 22:41:10 UTC (rev 161023)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp 2013-12-23 22:51:21 UTC (rev 161024)
@@ -80,7 +80,7 @@
static void collectChildrenAndRemoveFromOldParent(Node& node, NodeVector& nodes, ExceptionCode& ec)
{
- if (node.nodeType() != Node::DOCUMENT_FRAGMENT_NODE) {
+ if (!node.isDocumentFragment()) {
nodes.append(node);
if (ContainerNode* oldParent = node.parentNode())
oldParent->removeChild(&node, ec);
Modified: trunk/Source/WebCore/dom/Document.cpp (161023 => 161024)
--- trunk/Source/WebCore/dom/Document.cpp 2013-12-23 22:41:10 UTC (rev 161023)
+++ trunk/Source/WebCore/dom/Document.cpp 2013-12-23 22:51:21 UTC (rev 161024)
@@ -3081,7 +3081,7 @@
}
// Then, see how many doctypes and elements might be added by the new child.
- if (newChild->nodeType() == DOCUMENT_FRAGMENT_NODE) {
+ if (newChild->isDocumentFragment()) {
for (Node* c = newChild->firstChild(); c; c = c->nextSibling()) {
switch (c->nodeType()) {
case ATTRIBUTE_NODE:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes