Closed Bug 1025933 Opened 10 years ago Closed 10 years ago

[WebComponents] Unable to read dimensions of elements within shadow-root

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla34

People

(Reporter: wilsonpage, Assigned: smaug)

References

(Blocks 1 open bug)

Details

(Whiteboard: [2.1-feature-qa+])

Attachments

(1 file)

`clientWidth`, `clientHeight`, `getBoundingClientRects` all return `0` when querying elements within the shadow-dom. EXAMPLE http://jsbin.com/saduq/1/edit
Blocks: 1025945
For the clientWidth case, Element::GetClientAreaRect calls Element::GetScrollFrame which calls Element::GetPrimaryFrame which does: 1746 nsIDocument* doc = GetCurrentDoc(); 1747 if (!doc) { 1748 return nullptr; 1749 } which of course fails for shadow DOM things. Do we have a bug tracking that yet?
Would this bug also apply to projected contents?
It shouldn't, no.
Assignee: nobody → bugs
Attached patch patch (deleted) — Splinter Review
Attachment #8463983 - Flags: review+
I had uploaded the patch to Bug 1026164.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
QA Whiteboard: [2.1-feature-qa+]
QA Whiteboard: [2.1-feature-qa+] → [2.1-feature-qa-]
QA Whiteboard: [2.1-feature-qa-]
Whiteboard: [2.1-feature-qa+]
Flags: in-moztrap-
Marking verified since there's no QA support planned to be done here, so verification isn't needed here.
Status: RESOLVED → VERIFIED
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: