Closed Bug 1071635 Opened 5 years ago Closed 5 years ago
Sizing() and on Page First Sized() cause uninterruptible reflows
By accessing |document.documentElement.clientWidth| and calling |.getBoundingClientRect()| for all hidden elements (+ 1) about:newtab causes uninterruptible reflows when the page is first shown. 1) Code that collects telemetry data should not have any performance impact. 2) There might be a different/better way to determine how many children of #newtab-grid are visible?
Looks like nsIDOMWindowUtils has everything we need.
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
Comment on attachment 8493854 [details] [diff] [review] 0001-Bug-1071635-Get-rid-of-uninterruptible-reflows-cause.patch Sorry, forgot to run tests. Will need to make some adjustments.
Passes tests now. Turns out I was actually calculating the wrong index by not ignoring empty cells.
Looks like this snuck in with bug 1042214. The changes to browser_tabopen_reflow.js which obviously caught this have unfortunately not been reviewed :/
(In reply to Tim Taubert [:ttaubert] from comment #4) > Looks like this snuck in with bug 1042214. The changes to > browser_tabopen_reflow.js which obviously caught this have unfortunately not > been reviewed :/ Sorry about that. I thought it was explicit that we wanted the reflow to calculate positions for the functionality, so the test was updated for that.
Yeah, I assumed this was a quick fix to unbreak the test but we don't actually want sync reflows :) I could maybe add something to the test that explicitly states what the test tries to prevent and who to ask for review? The test itself isn't that clear I think.
Iteration: --- → 35.2
Points: --- → 3
QA Whiteboard: [qa-]
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
You need to log in before you can comment on or make changes to this bug.