Closed
Bug 1093033
Opened 9 years ago
Closed 9 years ago
CustomElements in imports should be upgraded too
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: gkrizsanits, Assigned: gkrizsanits)
References
Details
Attachments
(1 file, 2 obsolete files)
4.22 KB,
patch
|
wchen
:
review+
|
Details | Diff | Splinter Review |
The order is undefined for now, and that problem will be taken care of once the spec is fixed (see bug 1081107). But for now we can just do the trivial approach which will do the right thing in simple cases: just register the custom elements in the masters registry for upgrade candidates at the time when they are being parsed.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8515931 -
Flags: review?(wchen)
Comment 2•9 years ago
|
||
Comment on attachment 8515931 [details] [diff] [review] CustomElements for imports. v1 Review of attachment 8515931 [details] [diff] [review]: ----------------------------------------------------------------- We should probably use nsDocument::UseRegistryFromDocument when we create the import document and set it to use registry from the main document. http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries
Attachment #8515931 -
Flags: review?(wchen) → review-
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to William Chen [:wchen] from comment #2) > > We should probably use nsDocument::UseRegistryFromDocument when we create > the import document and set it to use registry from the main document. > > http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing- > registries Yeah, you're probably right... I've been struggling with this "use" term. Share would be a better word then I think. I was not sure to what extend should it use it, like, only for registering upgrade candidates like I did, or for import.registerElement too... Anyway, after reading it again, I believe sharing is the right way to do it indeed.
Assignee | ||
Comment 4•9 years ago
|
||
I ended up calling it in ResetToURI, since we don't set scriptglobal for imports, and SetMasterDocument is called too early (before ResetToURI). What do you think?
Attachment #8515931 -
Attachment is obsolete: true
Attachment #8516631 -
Flags: review?(wchen)
Comment 5•9 years ago
|
||
Comment on attachment 8516631 [details] [diff] [review] CustomElements for imports. v2 Review of attachment 8516631 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsDocument.cpp @@ +2305,5 @@ > mInUnlinkOrDeletion = oldVal; > > mRegistry = nullptr; > > + if (mMasterDocument) { It looks like the problem was that you were calling UseRegistryFromDocument when you created the import document, then it loaded and called ResetToURI and cleared the registry. I think we should still call UseRegistryFromDocument somewhere near where you call SetMasterDocument on the import document, then we should change to code here to something like: if (!mMasterDocument) { // "When creating an import, use the registry of the master document." // Note: at this point the mMasterDocument is already set for imports // (and only for imports) mRegistry = nullptr; }
Attachment #8516631 -
Flags: review?(wchen) → review-
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to William Chen [:wchen] from comment #5) > It looks like the problem was that you were calling UseRegistryFromDocument > when you created the import document, then it loaded and called ResetToURI > and cleared the registry. Exactly. > > I think we should still call UseRegistryFromDocument somewhere near where > you call SetMasterDocument on the import document, then we should change to > code here to something like: Sure, we can do that too. Probably makes more sense.
Attachment #8516631 -
Attachment is obsolete: true
Attachment #8517421 -
Flags: review?(wchen)
Assignee | ||
Comment 7•9 years ago
|
||
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ee93c58a23ce
Updated•9 years ago
|
Attachment #8517421 -
Flags: review?(wchen) → review+
Assignee | ||
Comment 8•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e2a1f8575950
https://hg.mozilla.org/mozilla-central/rev/e2a1f8575950
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•