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

Issue 18332025: Split CustomElementRegistry into a registration context and a registry. (Closed)

Created:
7 years, 5 months ago by dominicc (has gone to gerrit)
Modified:
7 years, 5 months ago
CC:
blink-reviews, Nils Barth (inactive), jsbell+bindings_chromium.org, webcomponents-bugzilla_chromium.org, eae+blinkwatch, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, dominicc+watchlist_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin
Visibility:
Public.

Description

Split 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -273 lines) Patch
M Source/bindings/v8/CustomElementWrapper.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/CustomElementWrapper.cpp View 3 chunks +14 lines, -13 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A + Source/core/dom/CustomElementRegistrationContext.h View 2 3 4 5 1 chunk +32 lines, -19 lines 0 comments Download
A Source/core/dom/CustomElementRegistrationContext.cpp View 1 2 3 4 1 chunk +282 lines, -0 lines 0 comments Download
M Source/core/dom/CustomElementRegistry.h View 2 chunks +7 lines, -40 lines 0 comments Download
M Source/core/dom/CustomElementRegistry.cpp View 7 chunks +13 lines, -141 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 4 5 3 chunks +3 lines, -4 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 chunks +18 lines, -29 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 6 chunks +11 lines, -22 lines 0 comments Download
M Source/core/scripts/make_names.pl View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
dominicc (has gone to gerrit)
PTAL adamk: bindings/v8 dglazkov: core/dom Next step: Have the window create the registration context. Have ...
7 years, 5 months ago (2013-07-11 05:12:03 UTC) #1
dominicc (has gone to gerrit)
R= +morrita1; -dglazkov--looks like he's out. One question is whether this null registration context is ...
7 years, 5 months ago (2013-07-11 05:59:39 UTC) #2
Hajime Morrita
It looks my change which is just landed conflicts yours :-(
7 years, 5 months ago (2013-07-11 06:06:27 UTC) #3
dominicc (has gone to gerrit)
On 2013/07/11 06:06:27, morrita1 wrote: > It looks my change which is just landed conflicts ...
7 years, 5 months ago (2013-07-11 06:10:32 UTC) #4
Hajime Morrita
lgtm
7 years, 5 months ago (2013-07-11 06:41:02 UTC) #5
Hajime Morrita
https://codereview.chromium.org/18332025/diff/5001/Source/core/dom/CustomElementRegistrationContext.cpp File Source/core/dom/CustomElementRegistrationContext.cpp (right): https://codereview.chromium.org/18332025/diff/5001/Source/core/dom/CustomElementRegistrationContext.cpp#newcode175 Source/core/dom/CustomElementRegistrationContext.cpp:175: return 0; Nit: Do we need this check?
7 years, 5 months ago (2013-07-11 06:41:15 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominicc@chromium.org/18332025/14001
7 years, 5 months ago (2013-07-11 07:29:26 UTC) #7
dominicc (has gone to gerrit)
Oops, still need bindings review.
7 years, 5 months ago (2013-07-11 07:30:50 UTC) #8
dominicc (has gone to gerrit)
Oops, still need bindings review.
7 years, 5 months ago (2013-07-11 07:30:50 UTC) #9
do-not-use
On 2013/07/11 07:30:50, dominicc wrote: > Oops, still need bindings review. LGTM for bindings.
7 years, 5 months ago (2013-07-11 07:31:56 UTC) #10
dominicc (has gone to gerrit)
On 2013/07/11 07:31:56, Christophe Dumez wrote: > On 2013/07/11 07:30:50, dominicc wrote: > > Oops, ...
7 years, 5 months ago (2013-07-11 07:33:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominicc@chromium.org/18332025/14001
7 years, 5 months ago (2013-07-11 07:33:37 UTC) #12
commit-bot: I haz the power
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layout_rel&number=16115
7 years, 5 months ago (2013-07-11 08:04:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominicc@chromium.org/18332025/14001
7 years, 5 months ago (2013-07-11 08:24:47 UTC) #14
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=12354
7 years, 5 months ago (2013-07-11 08:56:01 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dominicc@chromium.org/18332025/32001
7 years, 5 months ago (2013-07-11 13:57:04 UTC) #16
commit-bot: I haz the power
7 years, 5 months ago (2013-07-11 16:15:13 UTC) #17
Message was sent while issue was closed.
Change committed as 154014

Powered by Google App Engine
This is Rietveld 408576698