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

Side by Side Diff: Source/core/dom/CustomElementRegistry.h

Issue 14660019: Run Mutation Observer and Custom Element callbacks consistently at microtask checkpoint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 Document* document() const; 89 Document* document() const;
90 90
91 void didGiveTypeExtension(Element*, const AtomicString&); 91 void didGiveTypeExtension(Element*, const AtomicString&);
92 void customElementWasDestroyed(Element*); 92 void customElementWasDestroyed(Element*);
93 93
94 static bool isCustomTagName(const AtomicString& name) { return isValidName(n ame); } 94 static bool isCustomTagName(const AtomicString& name) { return isValidName(n ame); }
95 95
96 static void deliverAllLifecycleCallbacks(); 96 static void deliverAllLifecycleCallbacks();
97 static void deliverAllLifecycleCallbacksIfNeeded(); 97 static void deliverAllLifecycleCallbacksIfNeeded();
98 98
99 static bool hasQueuedLifecycleCallbacks();
100 static void abandonAllQueuedLifecycleCallbacks();
101 void abandonQueuedLifecycleCallbacks();
dglazkov 2013/05/08 16:42:00 lifecycle callbacks queue is just begging to be it
102
99 private: 103 private:
100 typedef HashMap<AtomicString, RefPtr<CustomElementDefinition> > DefinitionMa p; 104 typedef HashMap<AtomicString, RefPtr<CustomElementDefinition> > DefinitionMa p;
101 typedef ListHashSet<CustomElementRegistry*> InstanceSet; 105 typedef ListHashSet<CustomElementRegistry*> InstanceSet;
102 106
103 static bool isValidName(const AtomicString&); 107 static bool isValidName(const AtomicString&);
104 108
105 static InstanceSet& activeCustomElementRegistries(); 109 static InstanceSet& activeCustomElementRegistries();
106 void activate(const CustomElementInvocation&); 110 void activate(const CustomElementInvocation&);
107 void deactivate(); 111 void deactivate();
108 void deliverLifecycleCallbacks(); 112 void deliverLifecycleCallbacks();
(...skipping 17 matching lines...) Expand all
126 inline CustomElementRegistry::InstanceSet& CustomElementRegistry::activeCustomEl ementRegistries() 130 inline CustomElementRegistry::InstanceSet& CustomElementRegistry::activeCustomEl ementRegistries()
127 { 131 {
128 DEFINE_STATIC_LOCAL(InstanceSet, activeInstances, ()); 132 DEFINE_STATIC_LOCAL(InstanceSet, activeInstances, ());
129 return activeInstances; 133 return activeInstances;
130 } 134 }
131 135
132 136
133 } // namespace WebCore 137 } // namespace WebCore
134 138
135 #endif 139 #endif
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/CustomElementRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698