|
Lines 33-38
a/Source/WebCore/dom/Node.h_sec1
|
| 33 |
#include "RenderStyleConstants.h" |
33 |
#include "RenderStyleConstants.h" |
| 34 |
#include "ScriptWrappable.h" |
34 |
#include "ScriptWrappable.h" |
| 35 |
#include "SimulatedClickOptions.h" |
35 |
#include "SimulatedClickOptions.h" |
|
|
36 |
#include "TreeScope.h" |
| 36 |
#include "TreeShared.h" |
37 |
#include "TreeShared.h" |
| 37 |
#include <wtf/Forward.h> |
38 |
#include <wtf/Forward.h> |
| 38 |
#include <wtf/ListHashSet.h> |
39 |
#include <wtf/ListHashSet.h> |
|
Lines 85-91
class RenderObject;
a/Source/WebCore/dom/Node.h_sec2
|
| 85 |
class RenderStyle; |
86 |
class RenderStyle; |
| 86 |
class ShadowRoot; |
87 |
class ShadowRoot; |
| 87 |
class TagNodeList; |
88 |
class TagNodeList; |
| 88 |
class TreeScope; |
|
|
| 89 |
|
89 |
|
| 90 |
#if ENABLE(GESTURE_EVENTS) |
90 |
#if ENABLE(GESTURE_EVENTS) |
| 91 |
class PlatformGestureEvent; |
91 |
class PlatformGestureEvent; |
|
Lines 115-132
public:
a/Source/WebCore/dom/Node.h_sec3
|
| 115 |
RenderObject* renderer() const { return m_renderer; } |
115 |
RenderObject* renderer() const { return m_renderer; } |
| 116 |
void setRenderer(RenderObject* renderer) { m_renderer = renderer; } |
116 |
void setRenderer(RenderObject* renderer) { m_renderer = renderer; } |
| 117 |
|
117 |
|
| 118 |
TreeScope* treeScope() const { return m_treeScope; } |
|
|
| 119 |
void setTreeScope(TreeScope* scope) { m_treeScope = scope; } |
| 120 |
|
| 121 |
virtual ~NodeRareDataBase() { } |
118 |
virtual ~NodeRareDataBase() { } |
| 122 |
protected: |
119 |
protected: |
| 123 |
NodeRareDataBase(TreeScope* scope) |
120 |
NodeRareDataBase() { } |
| 124 |
: m_treeScope(scope) |
|
|
| 125 |
{ |
| 126 |
} |
| 127 |
private: |
121 |
private: |
| 128 |
RenderObject* m_renderer; |
122 |
RenderObject* m_renderer; |
| 129 |
TreeScope* m_treeScope; |
|
|
| 130 |
}; |
123 |
}; |
| 131 |
|
124 |
|
| 132 |
class Node : public EventTarget, public ScriptWrappable, public TreeShared<Node, ContainerNode> { |
125 |
class Node : public EventTarget, public ScriptWrappable, public TreeShared<Node, ContainerNode> { |
|
Lines 461-473
public:
a/Source/WebCore/dom/Node.h_sec4
|
| 461 |
return documentInternal(); |
454 |
return documentInternal(); |
| 462 |
} |
455 |
} |
| 463 |
|
456 |
|
| 464 |
TreeScope* treeScope() const; |
457 |
TreeScope* treeScope() const { return m_treeScope; } |
| 465 |
|
458 |
|
| 466 |
// Returns true if this node is associated with a document and is in its associated document's |
459 |
// Returns true if this node is associated with a document and is in its associated document's |
| 467 |
// node tree, false otherwise. |
460 |
// node tree, false otherwise. |
| 468 |
bool inDocument() const |
461 |
bool inDocument() const |
| 469 |
{ |
462 |
{ |
| 470 |
ASSERT(m_document || !getFlag(InDocumentFlag)); |
463 |
ASSERT(documentInternal() || !getFlag(InDocumentFlag)); |
| 471 |
return getFlag(InDocumentFlag); |
464 |
return getFlag(InDocumentFlag); |
| 472 |
} |
465 |
} |
| 473 |
|
466 |
|
|
Lines 785-801
protected:
a/Source/WebCore/dom/Node.h_sec5
|
| 785 |
|
778 |
|
| 786 |
void setHasCustomCallbacks() { setFlag(true, HasCustomCallbacksFlag); } |
779 |
void setHasCustomCallbacks() { setFlag(true, HasCustomCallbacksFlag); } |
| 787 |
|
780 |
|
| 788 |
Document* documentInternal() const { return m_document; } |
781 |
Document* documentInternal() const { return treeScope()->documentScope(); } |
|
|
782 |
void setTreeScope(TreeScope* scope) { m_treeScope = scope; } |
| 789 |
|
783 |
|
| 790 |
private: |
784 |
private: |
| 791 |
friend class TreeShared<Node, ContainerNode>; |
785 |
friend class TreeShared<Node, ContainerNode>; |
| 792 |
|
786 |
|
| 793 |
void removedLastRef(); |
787 |
void removedLastRef(); |
| 794 |
|
788 |
|
| 795 |
// These API should be only used for a tree scope migration. |
|
|
| 796 |
void setTreeScope(TreeScope*); |
| 797 |
void setDocument(Document*); |
| 798 |
|
| 799 |
enum EditableLevel { Editable, RichlyEditable }; |
789 |
enum EditableLevel { Editable, RichlyEditable }; |
| 800 |
bool rendererIsEditable(EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable) const; |
790 |
bool rendererIsEditable(EditableLevel, UserSelectAllTreatment = UserSelectAllIsAlwaysNonEditable) const; |
| 801 |
bool isEditableToAccessibility(EditableLevel) const; |
791 |
bool isEditableToAccessibility(EditableLevel) const; |
|
Lines 837-843
private:
a/Source/WebCore/dom/Node.h_sec6
|
| 837 |
#endif |
827 |
#endif |
| 838 |
|
828 |
|
| 839 |
mutable uint32_t m_nodeFlags; |
829 |
mutable uint32_t m_nodeFlags; |
| 840 |
Document* m_document; |
830 |
TreeScope* m_treeScope; |
| 841 |
Node* m_previous; |
831 |
Node* m_previous; |
| 842 |
Node* m_next; |
832 |
Node* m_next; |
| 843 |
// When a node has rare data we move the renderer into the rare data. |
833 |
// When a node has rare data we move the renderer into the rare data. |