Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1385)

Side by Side Diff: Source/core/dom/ContainerNode.cpp

Issue 329183002: Removing "using" declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/events/MutationEvent.h" 44 #include "core/events/MutationEvent.h"
45 #include "core/html/HTMLCollection.h" 45 #include "core/html/HTMLCollection.h"
46 #include "core/html/HTMLFrameOwnerElement.h" 46 #include "core/html/HTMLFrameOwnerElement.h"
47 #include "core/html/RadioNodeList.h" 47 #include "core/html/RadioNodeList.h"
48 #include "core/inspector/InspectorInstrumentation.h" 48 #include "core/inspector/InspectorInstrumentation.h"
49 #include "core/rendering/InlineTextBox.h" 49 #include "core/rendering/InlineTextBox.h"
50 #include "core/rendering/RenderText.h" 50 #include "core/rendering/RenderText.h"
51 #include "core/rendering/RenderTheme.h" 51 #include "core/rendering/RenderTheme.h"
52 #include "core/rendering/RenderView.h" 52 #include "core/rendering/RenderView.h"
53 53
54 using namespace std;
55
56 namespace WebCore { 54 namespace WebCore {
57 55
58 using namespace HTMLNames; 56 using namespace HTMLNames;
59 57
60 static void dispatchChildInsertionEvents(Node&); 58 static void dispatchChildInsertionEvents(Node&);
61 static void dispatchChildRemovalEvents(Node&); 59 static void dispatchChildRemovalEvents(Node&);
62 60
63 #ifndef NDEBUG 61 #ifndef NDEBUG
64 unsigned NoEventDispatchAssertion::s_count = 0; 62 unsigned NoEventDispatchAssertion::s_count = 0;
65 #endif 63 #endif
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 NoEventDispatchAssertion assertNoEventDispatch; 557 NoEventDispatchAssertion assertNoEventDispatch;
560 removedChildren.reserveInitialCapacity(countChildren()); 558 removedChildren.reserveInitialCapacity(countChildren());
561 while (m_firstChild) { 559 while (m_firstChild) {
562 removedChildren.append(m_firstChild); 560 removedChildren.append(m_firstChild);
563 removeBetween(0, m_firstChild->nextSibling(), *m_firstChild); 561 removeBetween(0, m_firstChild->nextSibling(), *m_firstChild);
564 } 562 }
565 } 563 }
566 564
567 childrenChanged(false, 0, 0, -static_cast<int>(removedChildren.size())); 565 childrenChanged(false, 0, 0, -static_cast<int>(removedChildren.size()));
568 566
569 for (size_t i = 0; i < removedChildren.size(); ++i) 567 for (std::size_t i = 0; i < removedChildren.size(); ++i)
570 notifyNodeRemoved(*removedChildren[i]); 568 notifyNodeRemoved(*removedChildren[i]);
571 } 569 }
572 570
573 dispatchSubtreeModifiedEvent(); 571 dispatchSubtreeModifiedEvent();
574 } 572 }
575 573
576 void ContainerNode::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, Exception State& exceptionState) 574 void ContainerNode::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, Exception State& exceptionState)
577 { 575 {
578 RefPtrWillBeRawPtr<ContainerNode> protect(this); 576 RefPtrWillBeRawPtr<ContainerNode> protect(this);
579 577
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 661 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
664 662
665 InspectorInstrumentation::didInsertDOMNode(&root); 663 InspectorInstrumentation::didInsertDOMNode(&root);
666 664
667 RefPtrWillBeRawPtr<Node> protect(this); 665 RefPtrWillBeRawPtr<Node> protect(this);
668 RefPtrWillBeRawPtr<Node> protectNode(root); 666 RefPtrWillBeRawPtr<Node> protectNode(root);
669 667
670 NodeVector postInsertionNotificationTargets; 668 NodeVector postInsertionNotificationTargets;
671 notifyNodeInsertedInternal(root, postInsertionNotificationTargets); 669 notifyNodeInsertedInternal(root, postInsertionNotificationTargets);
672 670
673 for (size_t i = 0; i < postInsertionNotificationTargets.size(); ++i) { 671 for (std::size_t i = 0; i < postInsertionNotificationTargets.size(); ++i) {
674 Node* targetNode = postInsertionNotificationTargets[i].get(); 672 Node* targetNode = postInsertionNotificationTargets[i].get();
675 if (targetNode->inDocument()) 673 if (targetNode->inDocument())
676 targetNode->didNotifySubtreeInsertionsToDocument(); 674 targetNode->didNotifySubtreeInsertionsToDocument();
677 } 675 }
678 } 676 }
679 677
680 void ContainerNode::notifyNodeInsertedInternal(Node& root, NodeVector& postInser tionNotificationTargets) 678 void ContainerNode::notifyNodeInsertedInternal(Node& root, NodeVector& postInser tionNotificationTargets)
681 { 679 {
682 NoEventDispatchAssertion assertNoEventDispatch; 680 NoEventDispatchAssertion assertNoEventDispatch;
683 ScriptForbiddenScope forbidScript; 681 ScriptForbiddenScope forbidScript;
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 return true; 1272 return true;
1275 1273
1276 if (node->isElementNode() && toElement(node)->shadow()) 1274 if (node->isElementNode() && toElement(node)->shadow())
1277 return true; 1275 return true;
1278 1276
1279 return false; 1277 return false;
1280 } 1278 }
1281 #endif 1279 #endif
1282 1280
1283 } // namespace WebCore 1281 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698