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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 2517603002: Fired PointerEvent from Node::dispatchMouseEvent() to fix a bug. (Closed)
Patch Set: Created 4 years, 1 month 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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
7 * (http://www.torchmobile.com/) 7 * (http://www.torchmobile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 virtual void postDispatchEventHandler(Event*, EventDispatchHandlingState*) {} 719 virtual void postDispatchEventHandler(Event*, EventDispatchHandlingState*) {}
720 720
721 void dispatchScopedEvent(Event*); 721 void dispatchScopedEvent(Event*);
722 722
723 virtual void handleLocalEvents(Event&); 723 virtual void handleLocalEvents(Event&);
724 724
725 void dispatchSubtreeModifiedEvent(); 725 void dispatchSubtreeModifiedEvent();
726 DispatchEventResult dispatchDOMActivateEvent(int detail, 726 DispatchEventResult dispatchDOMActivateEvent(int detail,
727 Event* underlyingEvent); 727 Event* underlyingEvent);
728 728
729 DispatchEventResult dispatchMouseEvent(const PlatformMouseEvent&, 729 void dispatchMouseEvent(const PlatformMouseEvent&,
730 const AtomicString& eventType, 730 const AtomicString& eventType,
731 int clickCount = 0, 731 int clickCount = 0,
732 Node* relatedTarget = nullptr); 732 Node* relatedTarget = nullptr);
733 733
734 void dispatchSimulatedClick( 734 void dispatchSimulatedClick(
735 Event* underlyingEvent, 735 Event* underlyingEvent,
736 SimulatedClickMouseEventOptions = SendNoEvents, 736 SimulatedClickMouseEventOptions = SendNoEvents,
737 SimulatedClickCreationScope = SimulatedClickCreationScope::FromUserAgent); 737 SimulatedClickCreationScope = SimulatedClickCreationScope::FromUserAgent);
738 738
739 void dispatchInputEvent(); 739 void dispatchInputEvent();
740 740
741 // Perform the default action for an event. 741 // Perform the default action for an event.
742 virtual void defaultEventHandler(Event*); 742 virtual void defaultEventHandler(Event*);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 848
849 // 0 bits remaining. 849 // 0 bits remaining.
850 850
851 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 851 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
852 void setFlag(bool f, NodeFlags mask) { 852 void setFlag(bool f, NodeFlags mask) {
853 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); 853 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask);
854 } 854 }
855 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } 855 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; }
856 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } 856 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; }
857 857
858 // TODO(mustaq): This is a hack to fix sites with flash objects. We should
859 // instead route all PlatformMouseEvents through EventHandler. See
860 // crbug.com/665924.
861 void createAndDispatchPointerEvent(const AtomicString& mouseEventName,
862 const PlatformMouseEvent&,
863 LocalDOMWindow* view);
864
858 protected: 865 protected:
859 enum ConstructionType { 866 enum ConstructionType {
860 CreateOther = DefaultNodeFlags, 867 CreateOther = DefaultNodeFlags,
861 CreateText = DefaultNodeFlags | IsTextFlag, 868 CreateText = DefaultNodeFlags | IsTextFlag,
862 CreateContainer = 869 CreateContainer =
863 DefaultNodeFlags | ChildNeedsStyleRecalcFlag | IsContainerFlag, 870 DefaultNodeFlags | ChildNeedsStyleRecalcFlag | IsContainerFlag,
864 CreateElement = CreateContainer | IsElementFlag, 871 CreateElement = CreateContainer | IsElementFlag,
865 CreateShadowRoot = 872 CreateShadowRoot =
866 CreateContainer | IsDocumentFragmentFlag | IsInShadowTreeFlag, 873 CreateContainer | IsDocumentFragmentFlag | IsInShadowTreeFlag,
867 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, 874 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 } // namespace blink 1028 } // namespace blink
1022 1029
1023 #ifndef NDEBUG 1030 #ifndef NDEBUG
1024 // Outside the WebCore namespace for ease of invocation from gdb. 1031 // Outside the WebCore namespace for ease of invocation from gdb.
1025 void showNode(const blink::Node*); 1032 void showNode(const blink::Node*);
1026 void showTree(const blink::Node*); 1033 void showTree(const blink::Node*);
1027 void showNodePath(const blink::Node*); 1034 void showNodePath(const blink::Node*);
1028 #endif 1035 #endif
1029 1036
1030 #endif // Node_h 1037 #endif // Node_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698