document.getWireframe doesn't return significant rects for cbc.ca
Categories
(Core :: Layout, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox100 | --- | verified |
People
(Reporter: mconley, Assigned: emilio)
Details
Attachments
(2 files)
STR:
- Open the Browser Toolbox
- Visit https://www.cbc.ca
- After the page finishes loading, switch to the Console tab
- At the right-most end of the Console input, click on the item that says "Top" to show a list of processes / contexts we can switch to. Switch to the cbc.ca one in the second block, the one that shows the PID at the start.
- In the console, type:
tabs[0].content.document.getWireframe(true);
ER:
The returned wireframe should contain rects for the main elements of the page, including the "main story" on the site.
AR:
The returned rects appear to be for the header and the scrollbar, but nothing else.
| Reporter | ||
Comment 1•4 years ago
|
||
Interestingly, if you repeat steps 1-4 of the STR, and then type in:
tabs[0].content.windowUtils.nodesFromRect(0, 0, 0, tabs[0].content.innerWidth, tabs[0].content.innerHeight, 0, true, false, true)
you get the same restricted number of nodes. If however, you then type in:
tabs[0].content.windowUtils.nodesFromRect(0, 0, 0, tabs[0].content.innerWidth, tabs[0].content.innerHeight, 0, true, false, false)
then we get far more nodes - apparently, the aOnlyVisible argument is restricting us somehow here.
Any idea what's going on here, emilio?
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
Don't include it twice, and compute it explicitly since PresShell's
GetCanvasBackground gets computed during painting otherwise.
| Assignee | ||
Comment 3•4 years ago
|
||
nsDisplayTransform::HitTest clips the rect it passes to its children,
and thus intersecting the whole area isn't relevant.
Depends on D141300
Comment 5•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/52120ef3072f
https://hg.mozilla.org/mozilla-central/rev/84fa6be07a61
Updated•4 years ago
|
Reproducible on a 2022-03-14 Nightly build on macOS 11. Verified as fixed on Nightly 102.0a1 (20220502213947) on macOS, Win10 64-bits, Ubuntu 20.04.
Description
•