Chromium Code Reviews
DescriptionSplit CustomElementRegistry into a registration context and a registry.
The CustomElementRegistry is now only responsible for: 1. processing
Custom Element registrations; 2. looking up a definition from the set
of registered definitions.
The new class is called CustomElementRegistrationContext.
Internally, CustomElementRegistrationContext is a controller,
coordinating the registry and upgrade candidates map, and sending a
stream of callbacks to the callback dispatcher to implement instance
lifecycle.
Externally, CustomElementRegistrationContext is a facade to the rest
of the Custom Elements machinery. With one exception* the rest of core
uses the registration context to process custom elements.
The goal of this refactoring is to create a registration context which
can be shared by multiple documents (so they can share definitions)
and make it possible to identify when an element is being adopted into
a different registration context (so the element's lifecycle can be
reset; exact details TBD.)
There is no sharing yet, but as a first step, this creates a
document's registration context eagerly. In a follow-up change a
shared registration context will be handed to related documents. Lazy
shared registration context creation can be investigated later if it
is warranted for performance.
* Microtask tickles the CustomElementCallbackDispatcher to perform a
checkpoint. This is probably going away soon.
BUG=247219
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154014
Patch Set 1 #Patch Set 2 : Higher similarity. #Patch Set 3 : Tweaks. #
Total comments: 1
Patch Set 4 : That syncing feeling. #Patch Set 5 : Patch for landing. #Patch Set 6 : Synced to tip. #
Messages
Total messages: 17 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||