Closed
Bug 785284
Opened 12 years ago
Closed 7 years ago
tabbrowser and scrollbox calls getBoundingClientRect causing sync layout
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1356705
People
(Reporter: BenWa, Unassigned)
Details
(Whiteboard: [Snappy:p1][sps])
MXR search: http://mxr.mozilla.org/mozilla-central/search?string=getBoundingClientRect&find=%2Fbrowser%2Fbase%2Fcontent&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central I'm seeing tabbrowser.xml and scrollbox.xml cause some sync layout because of calls to getBoundingClientRect which is relatively a very expensive operation for a what looks like a simple getter. Profile: http://people.mozilla.com/~bgirard/cleopatra/?report=830af9dcdc0c1f36df7222a0da8a63827d8b0de5
Comment 1•12 years ago
|
||
I don't think I understand this bug. Are you suggesting that we should use something else than getBoundingClientRect, something that doesn't flush layout while still getting us the data we need?
Reporter | ||
Comment 2•12 years ago
|
||
Yes, I'm not familiar with the code enough to know what the use case is for getBoundingClientRect but it would be ideal to avoid using it if it's not strictly required.
Updated•12 years ago
|
Whiteboard: [Snappy][sps] → [Snappy:p1][sps]
Comment 3•11 years ago
|
||
Bug 878801 introduced nsIDOMWindowUtils.getBoundsWithoutFlushing(). We should investigate what possibilities we have and where we could replace getBoundingClientRect() calls.
Comment 4•11 years ago
|
||
For scrolling tabs into view and similar operations, we actually need up-to-date data.
Comment 5•11 years ago
|
||
We could look if some of this information can be cached by tabbrowser after the previous last operation finishes (e.g. width of tabs)
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Comment hidden (typo) |
You need to log in
before you can comment on or make changes to this bug.
Description
•