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

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

Issue 2510763002: Fired PointerEvent from Node::dispatchMouseEvent() to fix a bug. (Closed)
Patch Set: Added a layout test. 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 virtual void postDispatchEventHandler(Event*, EventDispatchHandlingState*) {} 713 virtual void postDispatchEventHandler(Event*, EventDispatchHandlingState*) {}
714 714
715 void dispatchScopedEvent(Event*); 715 void dispatchScopedEvent(Event*);
716 716
717 virtual void handleLocalEvents(Event&); 717 virtual void handleLocalEvents(Event&);
718 718
719 void dispatchSubtreeModifiedEvent(); 719 void dispatchSubtreeModifiedEvent();
720 DispatchEventResult dispatchDOMActivateEvent(int detail, 720 DispatchEventResult dispatchDOMActivateEvent(int detail,
721 Event& underlyingEvent); 721 Event& underlyingEvent);
722 722
723 DispatchEventResult dispatchMouseEvent(const PlatformMouseEvent&, 723 void dispatchMouseEvent(const PlatformMouseEvent&,
724 const AtomicString& eventType, 724 const AtomicString& eventType,
725 int clickCount = 0, 725 int clickCount = 0,
726 Node* relatedTarget = nullptr); 726 Node* relatedTarget = nullptr);
727 727
728 void dispatchSimulatedClick( 728 void dispatchSimulatedClick(
729 Event* underlyingEvent, 729 Event* underlyingEvent,
730 SimulatedClickMouseEventOptions = SendNoEvents, 730 SimulatedClickMouseEventOptions = SendNoEvents,
731 SimulatedClickCreationScope = SimulatedClickCreationScope::FromUserAgent); 731 SimulatedClickCreationScope = SimulatedClickCreationScope::FromUserAgent);
732 732
733 void dispatchInputEvent(); 733 void dispatchInputEvent();
734 734
735 // Perform the default action for an event. 735 // Perform the default action for an event.
736 virtual void defaultEventHandler(Event*); 736 virtual void defaultEventHandler(Event*);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 837
838 // 4 bits remaining. 838 // 4 bits remaining.
839 839
840 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; } 840 bool getFlag(NodeFlags mask) const { return m_nodeFlags & mask; }
841 void setFlag(bool f, NodeFlags mask) { 841 void setFlag(bool f, NodeFlags mask) {
842 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask); 842 m_nodeFlags = (m_nodeFlags & ~mask) | (-(int32_t)f & mask);
843 } 843 }
844 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; } 844 void setFlag(NodeFlags mask) { m_nodeFlags |= mask; }
845 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; } 845 void clearFlag(NodeFlags mask) { m_nodeFlags &= ~mask; }
846 846
847 // TODO(mustaq): This is a hack to fix sites with flash objects. We should
848 // instead route all PlatformMouseEvents through EventHandler. See
849 // crbug.com/665924.
850 void createAndDispatchPointerEvent(const AtomicString& mouseEventName,
851 const PlatformMouseEvent&,
852 LocalDOMWindow* view);
853
847 protected: 854 protected:
848 enum ConstructionType { 855 enum ConstructionType {
849 CreateOther = DefaultNodeFlags, 856 CreateOther = DefaultNodeFlags,
850 CreateText = DefaultNodeFlags | IsTextFlag, 857 CreateText = DefaultNodeFlags | IsTextFlag,
851 CreateContainer = 858 CreateContainer =
852 DefaultNodeFlags | ChildNeedsStyleRecalcFlag | IsContainerFlag, 859 DefaultNodeFlags | ChildNeedsStyleRecalcFlag | IsContainerFlag,
853 CreateElement = CreateContainer | IsElementFlag, 860 CreateElement = CreateContainer | IsElementFlag,
854 CreateShadowRoot = 861 CreateShadowRoot =
855 CreateContainer | IsDocumentFragmentFlag | IsInShadowTreeFlag, 862 CreateContainer | IsDocumentFragmentFlag | IsInShadowTreeFlag,
856 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag, 863 CreateDocumentFragment = CreateContainer | IsDocumentFragmentFlag,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 } // namespace blink 1020 } // namespace blink
1014 1021
1015 #ifndef NDEBUG 1022 #ifndef NDEBUG
1016 // Outside the WebCore namespace for ease of invocation from gdb. 1023 // Outside the WebCore namespace for ease of invocation from gdb.
1017 void showNode(const blink::Node*); 1024 void showNode(const blink::Node*);
1018 void showTree(const blink::Node*); 1025 void showTree(const blink::Node*);
1019 void showNodePath(const blink::Node*); 1026 void showNodePath(const blink::Node*);
1020 #endif 1027 #endif
1021 1028
1022 #endif // Node_h 1029 #endif // Node_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698