Prototype a chrome API for saving a skeleton UI based on the prominent shapes on a webpage
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: bgrins, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
We'd like to experiment with saving a low fidelity version of a page to potentially render in place of an unloaded browser while the page loads.
One of the unknowns is the technical feasibility of grabbing a representative set of rectangles on the page that would roughly match the type of skeleton UIs used by web content. This bug is to get some sense of that feasibility and not to actually ship anything. The rough thought in mind is a function available from ChromeUtils that returns the current relevant rects (bounds, size, colors, etc) given a page.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
I added an option to return also the nodes because it's very helpful for
debugging. A bunch of the "unknown" ones are just elements with
transparent backgrounds (but still hit-testable), so we probably want to
exclude them from the result list or what not to massively reduce the
size of the returned object.
But anyhow, this probably does for a prototype.
Assignee | ||
Comment 2•3 years ago
|
||
What I've done to test this is basically copy(JSON.stringify(tabs[0].content.document.getWireframe()))
from the inspector's console for a given PID. This is the result for facebook.com.
As mentioned in the commit message, there's a lot of "unknown" rects that should probably go away (they're mostly useful for debugging when combined with showNodes=true
).
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
We might want to use rounded corners etc by default, perhaps something else than rgba(0, 0, 0, .2)
for text / images, but this looks close enough imo :-)
Reporter | ||
Comment 6•3 years ago
|
||
Just for reference - don't intend to land this
Comment 7•3 years ago
|
||
bugherder |
Description
•