namespace WebCore {
class Attribute;
-class ClassNodeList;
+class ClassCollection;
class ContainerNode;
class DOMSettableTokenList;
class Document;
class RenderObject;
class RenderStyle;
class ShadowRoot;
-class TagNodeList;
+class TagCollection;
class Text;
class TouchEvent;
Node* firstChild() const;
Node* lastChild() const;
- // ChildNode interface API
- Element* previousElementSibling() const;
- Element* nextElementSibling() const;
void remove(ExceptionState&);
Node* pseudoAwareNextSibling() const;
bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); }
bool isInsertionPoint() const { return getFlag(IsInsertionPointFlag); }
- bool inNamedFlow() const { return getFlag(InNamedFlowFlag); }
bool hasCustomStyleCallbacks() const { return getFlag(HasCustomStyleCallbacksFlag); }
- bool isRegisteredWithNamedFlow() const;
-
bool hasSyntheticAttrChildNodes() const { return getFlag(HasSyntheticAttrChildNodesFlag); }
void setHasSyntheticAttrChildNodes(bool flag) { setFlag(flag, HasSyntheticAttrChildNodesFlag); }
void setChildNeedsStyleRecalc() { setFlag(ChildNeedsStyleRecalcFlag); }
void clearChildNeedsStyleRecalc() { clearFlag(ChildNeedsStyleRecalcFlag); }
- void setNeedsStyleRecalc(StyleChangeType = SubtreeStyleChange, StyleChangeSource = StyleChangeFromCSS);
+ void setNeedsStyleRecalc(StyleChangeType, StyleChangeSource = StyleChangeFromCSS);
void clearNeedsStyleRecalc();
bool childNeedsDistributionRecalc() const { return getFlag(ChildNeedsDistributionRecalc); }
void clearChildNeedsDistributionRecalc() { clearFlag(ChildNeedsDistributionRecalc); }
void markAncestorsWithChildNeedsDistributionRecalc();
+ bool childNeedsStyleInvalidation() const { return getFlag(ChildNeedsStyleInvalidation); }
+ void setChildNeedsStyleInvalidation() { setFlag(ChildNeedsStyleInvalidation); }
+ void clearChildNeedsStyleInvalidation() { clearFlag(ChildNeedsStyleInvalidation); }
+ void markAncestorsWithChildNeedsStyleInvalidation();
+ bool needsStyleInvalidation() { return getFlag(NeedsStyleInvalidation); }
+ void setNeedsStyleInvalidation();
+
void recalcDistribution();
bool shouldNotifyRendererWithIdenticalStyles() const { return getFlag(NotifyRendererWithIdenticalStyles); }
void setIsLink(bool f);
- void setInNamedFlow() { setFlag(InNamedFlowFlag); }
- void clearInNamedFlow() { clearFlag(InNamedFlowFlag); }
-
bool hasScopedHTMLStyleChild() const { return getFlag(HasScopedHTMLStyleChildFlag); }
void setHasScopedHTMLStyleChild(bool flag) { setFlag(flag, HasScopedHTMLStyleChildFlag); }
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) OVERRIDE;
virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture) OVERRIDE;
+ virtual void removeAllEventListeners() OVERRIDE;
// Handlers to do/undo actions on the target node before an event is dispatched to it and after the event
// has been dispatched. The data pointer is handed back by the preDispatch and passed to postDispatch.
// These bits are used by derived classes, pulled up here so they can
// be stored in the same memory word as the Node bits above.
- IsParsingChildrenFinishedFlag = 1 << 12, // Element
+ IsFinishedParsingChildrenFlag = 1 << 12, // Element
AlreadySpellCheckedFlag = 1 << 13,
HasNameOrIsEditingTextFlag = 1 << 17,
- InNamedFlowFlag = 1 << 18,
+ // Bit 18 is available
+
HasSyntheticAttrChildNodesFlag = 1 << 19,
HasCustomStyleCallbacksFlag = 1 << 20,
HasScopedHTMLStyleChildFlag = 1 << 21,
CustomElement = 1 << 27,
CustomElementUpgraded = 1 << 28,
- DefaultNodeFlags = IsParsingChildrenFinishedFlag | ChildNeedsStyleRecalcFlag | NeedsReattachStyleChange
+ ChildNeedsStyleInvalidation = 1 << 29,
+ NeedsStyleInvalidation = 1 << 30,
+
+ DefaultNodeFlags = IsFinishedParsingChildrenFlag | ChildNeedsStyleRecalcFlag | NeedsReattachStyleChange
};
- // 4 bits remaining.
+ // 3 bits remaining.
bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
void setFlag(bool f, NodeFlags mask) const { m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); }
void markAncestorsWithChildNeedsStyleRecalc();
- bool isParsingChildrenFinished() const { return getFlag(IsParsingChildrenFinishedFlag); }
- void setIsParsingChildrenFinished(bool value) { setFlag(value, IsParsingChildrenFinishedFlag); }
+ bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChildrenFlag); }
+ void setIsFinishedParsingChildren(bool value) { setFlag(value, IsFinishedParsingChildrenFlag); }
private:
friend class TreeShared<Node>;