summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/dom/Node.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 19:08:45 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:51:31 +0100
commit2bde8e466a4451c7319e3a072d118917957d6554 (patch)
tree28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebCore/dom/Node.h
parent6939c99b71d9372d14a0c74a772108052e8c48c8 (diff)
downloadexternal_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebCore/dom/Node.h')
-rw-r--r--Source/WebCore/dom/Node.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/Source/WebCore/dom/Node.h b/Source/WebCore/dom/Node.h
index 7ef7e80..31f6ae8 100644
--- a/Source/WebCore/dom/Node.h
+++ b/Source/WebCore/dom/Node.h
@@ -53,6 +53,7 @@ class EventContext;
class EventListener;
class FloatPoint;
class Frame;
+class InputElement;
class IntRect;
class KeyboardEvent;
class NSResolver;
@@ -86,11 +87,6 @@ enum StyleChangeType {
SyntheticStyleChange = 3 << nodeStyleChangeShift
};
-enum EventDispatchBehavior {
- RetargetEvent,
- StayInsideShadowDOM
-};
-
class Node : public EventTarget, public TreeShared<ContainerNode>, public ScriptWrappable {
friend class Document;
public:
@@ -224,9 +220,6 @@ public:
// Returns the enclosing event parent node (or self) that, when clicked, would trigger a navigation.
Node* enclosingLinkEventParentOrSelf();
- // Node ancestors when concerned about event flow.
- void getEventAncestors(Vector<EventContext>& ancestors, EventTarget*, EventDispatchBehavior = RetargetEvent);
-
bool isBlockFlow() const;
bool isBlockFlowOrBlockTable() const;
@@ -326,8 +319,12 @@ public:
virtual bool isKeyboardFocusable(KeyboardEvent*) const;
virtual bool isMouseFocusable() const;
- virtual bool isContentEditable() const;
- virtual bool isContentRichlyEditable() const;
+#if PLATFORM(MAC)
+ // Objective-C extensions
+ bool isContentEditable() const { return rendererIsEditable(Editable); }
+#endif
+ bool rendererIsEditable() const { return rendererIsEditable(Editable); }
+ bool rendererIsRichlyEditable() const { return rendererIsEditable(RichlyEditable); }
virtual bool shouldUseInputMethod() const;
virtual IntRect getRect() const;
IntRect renderRect(bool* isReplaced);
@@ -529,6 +526,8 @@ public:
virtual Node* toNode() { return this; }
+ virtual InputElement* toInputElement();
+
virtual ScriptExecutionContext* scriptExecutionContext() const;
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
@@ -543,7 +542,6 @@ public:
bool dispatchEvent(PassRefPtr<Event>);
void dispatchScopedEvent(PassRefPtr<Event>);
- bool dispatchGenericEvent(PassRefPtr<Event>);
virtual void handleLocalEvents(Event*);
void dispatchSubtreeModifiedEvent();
@@ -551,11 +549,6 @@ public:
bool dispatchKeyEvent(const PlatformKeyboardEvent&);
void dispatchWheelEvent(PlatformWheelEvent&);
bool dispatchMouseEvent(const PlatformMouseEvent&, const AtomicString& eventType, int clickCount = 0, Node* relatedTarget = 0);
- bool dispatchMouseEvent(const AtomicString& eventType, int button, int clickCount,
- int pageX, int pageY, int screenX, int screenY,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
- bool isSimulated, Node* relatedTarget, PassRefPtr<Event> underlyingEvent);
- void dispatchSimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<Event> underlyingEvent);
void dispatchSimulatedClick(PassRefPtr<Event> underlyingEvent, bool sendMouseEvents = false, bool showPressedLook = true);
virtual void dispatchFocusEvent();
@@ -668,6 +661,9 @@ private:
void markCachedNodeListsSlow(JSC::MarkStack&, JSC::JSGlobalData&);
#endif
+ enum EditableLevel { Editable, RichlyEditable };
+ bool rendererIsEditable(EditableLevel) const;
+
void setStyleChange(StyleChangeType);
// Used to share code between lazyAttach and setNeedsStyleRecalc.