Closed Bug 1007743 Opened 10 years ago Closed 10 years ago

[ShadowDOM] Changing textContent on 'projected content' nodes makes them disappear

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: wilsonpage, Assigned: wchen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Demo works in Chrome Canary but not FF Nightly: http://jsbin.com/kimob/1/edit

EXPECTED

<h1> content should change from 'foo' to 'bar'.

ACTUAL

<h1> disappears.
Summary: Changing textContent on 'projected content' nodes makes them disappear → [ShadowDOM] Changing textContent on 'projected content' nodes makes them disappear
Blocks: 952445
This bug is caused by GetFlattenedTreeParent() not handling distributed nodes correctly causing the frame constructor to not set the NODE_DESCENDANTS_NEED_FRAMES flag when needed.
Assignee: nobody → wchen
Attachment #8426829 - Flags: review?(bugs)
Thanks for the patch, William. UX is watching this closely for BB and web components work. How is review coming along? Thanks!
I have a similar problem with elements disappearing when I alter their overflow property, but unfortunately this patch doesn't fix that. Altering the linked test-case to change overflow to hidden instead of textContent causes Nightly to crash (without this patch applied, though).
Said crashing test-case: http://jsbin.com/tutixipa/1/edit
Comment on attachment 8426829 [details] [diff] [review]
Update flattened tree to correctly handle nodes distributed into Shadow DOM insertion points.

(The change to ExplicitChildIterator::Get() isn't really about this bug.)

I'm a bit worried about making GetFlattenedTreeParent
to always do a virtual call, but perhaps it isn't too bad...
Attachment #8426829 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/58541e1f52d2
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86 → All
The test case failed on b2g-emu due to an unrelated bug, fixed by making a trivial change to text content in the test.

https://hg.mozilla.org/integration/mozilla-inbound/rev/845420c23256
https://hg.mozilla.org/mozilla-central/rev/845420c23256
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
See Also: → 1022866
I'm still seeing this issue in some cases. Can't narrow down the exact steps to reproduce yet.
Blocks: 1011602
No longer blocks: 1011602
Blocks: 1049678
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: