Avoid layout flush from isElementVisible when attempting to focus the URL bar or search bar

RESOLVED FIXED in Firefox 17

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dao, Assigned: dao)

Tracking

({perf})

Trunk
Firefox 17
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [snappy])

Attachments

(1 attachment)

Posted patch patchSplinter Review
No description provided.
Attachment #652247 - Flags: review?(gavin.sharp)
In which cases does isElementVisible(gURLBar) return false (assuming gURLBar is non-null)? Is that only when the url bar is on a hidden toolbar? Is gURLBar.focus() always guaranteed to be a no-op in all of those cases?
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #1)
> In which cases does isElementVisible(gURLBar) return false (assuming gURLBar
> is non-null)? Is that only when the url bar is on a hidden toolbar?

That and in certain popups if dom.disable_window_open_feature.location is false.

> Is gURLBar.focus() always guaranteed to be a no-op in all of those cases?

Yes. However, gURLBar.focused can report true if the URL bar was focused when it got hidden and the user hasn't manually focused something else (bug 570835).
Keywords: perf
Whiteboard: [snappy]
Attachment #652247 - Flags: review?(enndeakin)
Attachment #652247 - Flags: review?(gavin.sharp) → review+
Attachment #652247 - Flags: review?(enndeakin)
Of course, I meant to change flag for my name, not Gavin's
https://hg.mozilla.org/mozilla-central/rev/caeb23f6d957
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
This patch caused Bug 784621.
Depends on: 784621
You need to log in before you can comment on or make changes to this bug.