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

Unified Diff: Source/core/dom/ContainerNode.h

Issue 301173006: Move NoEventDispatchAssertion class to its own file (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing include Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index b687459c0a316df6d5ca4ea3aac80b50d931bb4b..81e5250a9deb0474ae1c0a40cd88891af37a92ff 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -27,7 +27,6 @@
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/Node.h"
#include "wtf/OwnPtr.h"
-#include "wtf/TemporaryChange.h"
#include "wtf/Vector.h"
namespace WebCore {
@@ -41,63 +40,6 @@ namespace Private {
void addChildNodesToDeletionQueue(GenericNode*& head, GenericNode*& tail, GenericNodeContainer&);
}
-#ifndef NDEBUG
-// FIXME: Move this class to its own file.
-class NoEventDispatchAssertion {
-public:
- NoEventDispatchAssertion()
- {
- if (!isMainThread())
- return;
- s_count++;
- }
-
- ~NoEventDispatchAssertion()
- {
- if (!isMainThread())
- return;
- ASSERT(s_count);
- s_count--;
- }
-
- static bool isEventDispatchForbidden()
- {
- if (!isMainThread())
- return false;
- return s_count;
- }
-
- // It's safe to dispatch events in SVGImage since there can't be any script
- // listeners.
- class AllowSVGImageEvents {
- public:
- AllowSVGImageEvents()
- : m_change(s_count, 0)
- {
- }
-
- ~AllowSVGImageEvents()
- {
- ASSERT(!s_count);
- }
-
- TemporaryChange<unsigned> m_change;
- };
-
-private:
- static unsigned s_count;
-};
-#else
-class NoEventDispatchAssertion {
-public:
- NoEventDispatchAssertion() { }
- class AllowSVGImageEvents {
- public:
- AllowSVGImageEvents() { }
- };
-};
-#endif
-
enum DynamicRestyleFlags {
ChildrenAffectedByFocus = 1 << 0,
ChildrenAffectedByHover = 1 << 1,
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698