Closed Bug 878801 Opened 12 years ago Closed 12 years ago

BrowserNewTabPreloader needs to query tabbrowser bounds without flushing pending layout changes

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 24

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

(Keywords: dev-doc-needed)

Attachments

(2 files)

Silly me introduced another uninterruptible reflow while fixing bug 875257. The BrowserNewTabPreloader must not query window.gBrowser.boxObject when opening new tabs or else this will again cause us to flush pending layout changes.
This patch adds .getBoundsWithoutFlushing() to nsIDOMWindowUtils which is the equivalent to DOMElement.getBoundingClientRect() without flushing pending layout changes.
Attachment #757404 - Flags: review?(roc)
I forgot to note that it's totally ok for the BrowserNewTabPreloader to work with bounds that are possibly not up-to-date as we're optimizing for the average case where a user does not resize their window every time before opening a new tab (even if so there's a good chance something else will flush the layout for us). The code does still work with "incorrect" bounds.
Comment on attachment 757405 [details] [diff] [review] part 2 - query tabbrowser bounds without flushing layout Review of attachment 757405 [details] [diff] [review]: ----------------------------------------------------------------- rs=me
Attachment #757405 - Flags: review?(jaws) → review+
Keywords: dev-doc-needed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Depends on: 879733
Depends on: 881661
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: