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

Side by Side Diff: third_party/WebKit/Source/core/events/NodeEventContext.h

Issue 2270293002: Replace ASSERT*() with DCHECK*() in core/events/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: isUnreachableNode -> checkReachableNode Created 4 years, 3 months 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) 2014 Google Inc. All Rights Reserved. 2 * Copyright (C) 2014 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 class CORE_EXPORT NodeEventContext { 41 class CORE_EXPORT NodeEventContext {
42 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 42 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
43 public: 43 public:
44 // FIXME: Use ContainerNode instead of Node. 44 // FIXME: Use ContainerNode instead of Node.
45 NodeEventContext(Node*, EventTarget* currentTarget); 45 NodeEventContext(Node*, EventTarget* currentTarget);
46 DECLARE_TRACE(); 46 DECLARE_TRACE();
47 47
48 Node* node() const { return m_node.get(); } 48 Node* node() const { return m_node.get(); }
49 49
50 void setTreeScopeEventContext(TreeScopeEventContext* treeScopeEventContext) { m_treeScopeEventContext = treeScopeEventContext; } 50 void setTreeScopeEventContext(TreeScopeEventContext* treeScopeEventContext) { m_treeScopeEventContext = treeScopeEventContext; }
51 TreeScopeEventContext& treeScopeEventContext() { ASSERT(m_treeScopeEventCont ext); return *m_treeScopeEventContext; } 51 TreeScopeEventContext& treeScopeEventContext() { DCHECK(m_treeScopeEventCont ext); return *m_treeScopeEventContext; }
52 52
53 EventTarget* target() const { return m_treeScopeEventContext->target(); } 53 EventTarget* target() const { return m_treeScopeEventContext->target(); }
54 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related Target(); } 54 EventTarget* relatedTarget() const { return m_treeScopeEventContext->related Target(); }
55 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex t->touchEventContext(); } 55 TouchEventContext* touchEventContext() const { return m_treeScopeEventContex t->touchEventContext(); }
56 56
57 bool currentTargetSameAsTarget() const { return m_currentTarget.get() == tar get(); } 57 bool currentTargetSameAsTarget() const { return m_currentTarget.get() == tar get(); }
58 void handleLocalEvents(Event&) const; 58 void handleLocalEvents(Event&) const;
59 59
60 private: 60 private:
61 Member<Node> m_node; 61 Member<Node> m_node;
62 Member<EventTarget> m_currentTarget; 62 Member<EventTarget> m_currentTarget;
63 Member<TreeScopeEventContext> m_treeScopeEventContext; 63 Member<TreeScopeEventContext> m_treeScopeEventContext;
64 }; 64 };
65 65
66 } // namespace blink 66 } // namespace blink
67 67
68 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::NodeEventContext); 68 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::NodeEventContext);
69 69
70 #endif // NodeEventContext_h 70 #endif // NodeEventContext_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/MessageEvent.cpp ('k') | third_party/WebKit/Source/core/events/NodeEventContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698