| OLD | NEW |
| 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, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 #ifndef Node_h | 25 #ifndef Node_h |
| 26 #define Node_h | 26 #define Node_h |
| 27 | 27 |
| 28 #include "bindings/v8/ScriptWrappable.h" | 28 #include "bindings/v8/ScriptWrappable.h" |
| 29 #include "core/dom/EventTarget.h" | 29 #include "core/dom/EventTarget.h" |
| 30 #include "core/dom/MutationObserver.h" | 30 #include "core/dom/MutationObserver.h" |
| 31 #include "core/dom/SimulatedClickOptions.h" | 31 #include "core/dom/SimulatedClickOptions.h" |
| 32 #include "core/dom/TreeScope.h" | 32 #include "core/dom/TreeScope.h" |
| 33 #include "core/editing/EditingBoundary.h" | 33 #include "core/editing/EditingBoundary.h" |
| 34 #include "core/inspector/InspectorCounters.h" |
| 34 #include "core/page/FocusDirection.h" | 35 #include "core/page/FocusDirection.h" |
| 35 #include "core/platform/KURLHash.h" | 36 #include "core/platform/KURLHash.h" |
| 36 #include "core/platform/TreeShared.h" | 37 #include "core/platform/TreeShared.h" |
| 37 #include "core/platform/graphics/LayoutRect.h" | 38 #include "core/platform/graphics/LayoutRect.h" |
| 38 #include "core/rendering/style/RenderStyleConstants.h" | 39 #include "core/rendering/style/RenderStyleConstants.h" |
| 39 #include <wtf/Forward.h> | 40 #include <wtf/Forward.h> |
| 40 #include <wtf/ListHashSet.h> | 41 #include <wtf/ListHashSet.h> |
| 41 #include <wtf/text/AtomicString.h> | 42 #include <wtf/text/AtomicString.h> |
| 42 | 43 |
| 43 // This needs to be here because Document.h also depends on it. | 44 // This needs to be here because Document.h also depends on it. |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 CreatePseudoElement = CreateElement | InDocumentFlag | NeedsShadowTreeW
alkerFlag, | 743 CreatePseudoElement = CreateElement | InDocumentFlag | NeedsShadowTreeW
alkerFlag, |
| 743 CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | NeedsShado
wTreeWalkerFlag | IsInShadowTreeFlag, | 744 CreateShadowRoot = CreateContainer | IsDocumentFragmentFlag | NeedsShado
wTreeWalkerFlag | IsInShadowTreeFlag, |
| 744 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, | 745 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, |
| 745 CreateStyledElement = CreateElement | IsStyledElementFlag, | 746 CreateStyledElement = CreateElement | IsStyledElementFlag, |
| 746 CreateHTMLElement = CreateStyledElement | IsHTMLFlag, | 747 CreateHTMLElement = CreateStyledElement | IsHTMLFlag, |
| 747 CreateSVGElement = CreateStyledElement | IsSVGFlag, | 748 CreateSVGElement = CreateStyledElement | IsSVGFlag, |
| 748 CreateDocument = CreateContainer | InDocumentFlag, | 749 CreateDocument = CreateContainer | InDocumentFlag, |
| 749 CreateInsertionPoint = CreateHTMLElement | NeedsShadowTreeWalkerFlag, | 750 CreateInsertionPoint = CreateHTMLElement | NeedsShadowTreeWalkerFlag, |
| 750 CreateEditingText = CreateText | HasNameOrIsEditingTextFlag, | 751 CreateEditingText = CreateText | HasNameOrIsEditingTextFlag, |
| 751 }; | 752 }; |
| 752 Node(Document*, ConstructionType); | 753 |
| 754 Node(TreeScope* treeScope, ConstructionType type) |
| 755 : m_nodeFlags(type) |
| 756 , m_parentOrShadowHostNode(0) |
| 757 , m_treeScope(treeScope) |
| 758 , m_previous(0) |
| 759 , m_next(0) |
| 760 { |
| 761 ScriptWrappable::init(this); |
| 762 if (!m_treeScope) |
| 763 m_treeScope = TreeScope::noDocumentInstance(); |
| 764 m_treeScope->guardRef(); |
| 765 |
| 766 #if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS) |
| 767 trackForDebugging(); |
| 768 #endif |
| 769 InspectorCounters::incrementCounter(InspectorCounters::NodeCounter); |
| 770 } |
| 753 | 771 |
| 754 virtual void didMoveToNewDocument(Document* oldDocument); | 772 virtual void didMoveToNewDocument(Document* oldDocument); |
| 755 | 773 |
| 756 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const { } | 774 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const { } |
| 757 | 775 |
| 758 bool hasRareData() const { return getFlag(HasRareDataFlag); } | 776 bool hasRareData() const { return getFlag(HasRareDataFlag); } |
| 759 | 777 |
| 760 NodeRareData* rareData() const; | 778 NodeRareData* rareData() const; |
| 761 NodeRareData* ensureRareData(); | 779 NodeRareData* ensureRareData(); |
| 762 void clearRareData(); | 780 void clearRareData(); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 907 |
| 890 } //namespace | 908 } //namespace |
| 891 | 909 |
| 892 #ifndef NDEBUG | 910 #ifndef NDEBUG |
| 893 // Outside the WebCore namespace for ease of invocation from gdb. | 911 // Outside the WebCore namespace for ease of invocation from gdb. |
| 894 void showTree(const WebCore::Node*); | 912 void showTree(const WebCore::Node*); |
| 895 void showNodePath(const WebCore::Node*); | 913 void showNodePath(const WebCore::Node*); |
| 896 #endif | 914 #endif |
| 897 | 915 |
| 898 #endif | 916 #endif |
| OLD | NEW |