Not exposing HTMLContentElement on Window breaks chrome experiments main page

RESOLVED FIXED in Firefox 52

Status

()

defect
P2
normal
RESOLVED FIXED
3 years ago
3 months ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla53
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52+ fixed, firefox53+ fixed)

Details

()

Attachments

(3 attachments)

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

See bug 1316347 comment 6 and following.  

I just verified that the HTMLContentElement change is what causes the problem.  This confuses me quite a bit, because HTMLContentElement doesn't actually _do_ anything that I know of, when it's exposed.  Also, it's not exposed in Safari but the site works fine there...
Ah, I bet I know what the problem is.  Even when webcomponents are disabled, document.createElement("content") still hands back an element with HTMLContentElement.prototype as its proto.  I expect this is confusing Polymer, because now our internal (non-functional as far as they're concerned) getDistributedNodes() gets called instead of their polyfill.  Or something along those lines.

William, is it expected that even when webcomponents are disabled <content> elements end up with webcomponents stuff on their proto chain?
For comment 1.
Flags: needinfo?(wchen)
Priority: -- → P2
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Tracking 53+ since we should render this correctly.
Comment on attachment 8813400 [details] [diff] [review]
This fixes the chrome experiments site for me

Thanks for writing the patches.
Flags: needinfo?(wchen)
Attachment #8813400 - Flags: review?(wchen) → review+
Attachment #8813397 - Flags: review?(wchen) → review+
Attachment #8813398 - Flags: review?(wchen) → review+

Comment 8

3 years ago
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1bacb2975324
part 1.  Stop doing casts to HTMLShadowElement* simply based on tag.  r=wchen
https://hg.mozilla.org/integration/mozilla-inbound/rev/93d4161c74bf
part 2.  Stop doing casts to HTMLContentElement* simply based on tag.  r=wchen
https://hg.mozilla.org/integration/mozilla-inbound/rev/03acde1081c3
part 3.  Don't create special elements for <shadow> and <content> unless webcomponents are enabled.  r=wchen
Comment on attachment 8813397 [details] [diff] [review]
part 1.  Stop doing casts to HTMLShadowElement* simply based on tag

Approval Request Comment
[Feature/regressing bug #]: Bug 1316347
[User impact if declined]: Chrome experiments site broken.  Possibly also other Polymer-using things.
[Describe test coverage new/current, TreeHerder]: Test coverage around this
   stuff is a bit sparse.
[Risks and why]: There are various changes to our content iterator code that might be a bit risky.  It might be safer to back out bug 1316347 on 52 instead.  On the other hand, continuing to ship those properties on Window in ESR 52 is a bit unfortunate.
[String/UUID change made/needed]: None
Attachment #8813397 - Flags: approval-mozilla-aurora?
Attachment #8813398 - Flags: approval-mozilla-aurora?
Attachment #8813400 - Flags: approval-mozilla-aurora?
Tracking for 52.  Still pondering whether a backout or uplift is the way to go here, leaning towards backout for now...

Updated

3 years ago
Blocks: 1320446

Updated

3 years ago
No longer blocks: 1320446
Duplicate of this bug: 1320446
Comment on attachment 8813397 [details] [diff] [review]
part 1.  Stop doing casts to HTMLShadowElement* simply based on tag

fix regression in aurora52

I changed my mind a bit, since this is a long-ish aurora cycle I'm hoping we will have time to discover any fallout from this before 52 goes to beta.
Attachment #8813397 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment on attachment 8813398 [details] [diff] [review]
part 2.  Stop doing casts to HTMLContentElement* simply based on tag

fix regression in aurora52
Attachment #8813398 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment on attachment 8813400 [details] [diff] [review]
This fixes the chrome experiments site for me

fix regression in aurora52
Attachment #8813400 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 1324463
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.