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

VERIFIED FIXED in mozilla34

Status

()

Core
DOM
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: wilsonpage, Assigned: smaug)

Tracking

(Blocks: 1 bug)

unspecified
mozilla34
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-moztrap -

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
`clientWidth`, `clientHeight`, `getBoundingClientRects` all return `0` when querying elements within the shadow-dom.

EXAMPLE

http://jsbin.com/saduq/1/edit
(Reporter)

Updated

3 years ago
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?
Depends on: 1026047

Comment 2

3 years ago
Would this bug also apply to projected contents?
It shouldn't, no.
(Assignee)

Updated

3 years ago
Assignee: nobody → bugs
(Assignee)

Comment 4

3 years ago
Created attachment 8463983 [details] [diff] [review]
patch
Attachment #8463983 - Flags: review+
(Assignee)

Comment 5

3 years ago
I had uploaded the patch to Bug 1026164.
(Assignee)

Comment 6

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/0acd65b9573e
https://hg.mozilla.org/mozilla-central/rev/0acd65b9573e
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34

Updated

3 years ago
QA Whiteboard: [2.1-feature-qa+]

Updated

3 years ago
QA Whiteboard: [2.1-feature-qa+] → [2.1-feature-qa-]

Updated

3 years ago
QA Whiteboard: [2.1-feature-qa-]
Whiteboard: [2.1-feature-qa+]

Updated

3 years ago
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
You need to log in before you can comment on or make changes to this bug.