Closed Bug 926875 Opened 13 years ago Closed 13 years ago

Move the iframe.focus call out of the hot path to avoid an expensive reflow

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

(Keywords: perf, Whiteboard: [c= p= s=2013.10.25 u=])

Attachments

(1 file, 1 obsolete file)

Attached patch move.focus.out.hot.path.patch (obsolete) — — Splinter Review
No description provided.
Attachment #817110 - Flags: review?(alive)
Comment on attachment 817110 [details] [diff] [review] move.focus.out.hot.path.patch Review of attachment 817110 [details] [diff] [review]: ----------------------------------------------------------------- ::: apps/system/js/window_manager.js @@ +360,5 @@ > waitForNextPaint(frame, function makeWindowActive() { > frame.classList.add('render'); > + > + // Giving focus to the frame can create an expensive reflow, so let's > + // delay it until the frame has rendered. Add a simple check here to avoid race condition. Maybe: frame.classList.contains('active') or something represents it's foreground.
Attachment #817110 - Flags: review?(alive) → feedback+
Assignee: nobody → 21
Attachment #817110 - Attachment is obsolete: true
Attachment #817114 - Flags: review?(alive)
Comment on attachment 817114 [details] [diff] [review] move.focus.out.hot.path.patch Review of attachment 817114 [details] [diff] [review]: ----------------------------------------------------------------- r+
Attachment #817114 - Flags: review?(alive) → review+
Keywords: perf
Whiteboard: [c= p= s=2013.10.25 u=]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: