Closed
Bug 302962
Opened 19 years ago
Closed 19 years ago
When creating a new tab in Camino, gecko steals focus from the url bar (early activate/deactivate fails)
Categories
(Core :: DOM: Navigation, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: sfraser_bugs, Assigned: sfraser_bugs)
References
Details
(Keywords: regression)
Attachments
(2 files, 1 obsolete file)
4.81 KB,
patch
|
bryner
:
superreview+
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
1.13 KB,
patch
|
bryner
:
superreview+
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
When you make a new (empty) tab in recent camino builds, we focus the URL bar explicitly, but the content area the steals focus from it, so you're left having to refocus the url bar. This changed recently (I'm not sure why). Some debugging shows that when we focus the URL bar, we are correctly deactivating the content (via nsIWebBrowserFocus::Deactivate()), but this happens early in loading, before we have a pres shell. Because of this, nsWebBrowser::Deactivate() drops the deactivate on the floor. I think this is wrong. If nsWebBrowser can get at a focus controller, it should always pass on the Activate/Deactivate calls, even if we don't have a pres shell yet. Currently nsGlobalWindow::Activate() NS_WARNS in that case, but it seems legitimate to remove that.
Assignee | ||
Comment 1•19 years ago
|
||
This patch simply removes the checks for non-null pres shell from the nsWebBrowser Activate/Deactivate calls, and removes the NS_WARNING from nsGlobalWindow if Activate() is called when the pres shell is null.
Attachment #191213 -
Flags: superreview?(bryner)
Attachment #191213 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•19 years ago
|
Assignee | ||
Comment 2•19 years ago
|
||
A regression window for this would be useful.
Comment 3•19 years ago
|
||
Comment on attachment 191213 [details] [diff] [review] Patch So... I'm not really qualified to review this; I have no real idea what any of our focus code does. That said, the nsGlobalWindow change is basically a no-op (see http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsDebug.h#225).
Attachment #191213 -
Flags: review?(bzbarsky) → review?(bryner)
Comment 4•19 years ago
|
||
One question I do have -- why was the check we're removing there in the first place?
Assignee | ||
Comment 5•19 years ago
|
||
The check was there to avoid an assertion in nsGlobalWindow::Activate (as noted by the comment), which was then changed to a warning, which I here remove.
Comment 6•19 years ago
|
||
We already force the docshell to create an about:blank content viewer when you ask for random things like the document, or call GetInterface with certain IIDs. I think we should instead make this more consistent so that it calls EnsureContentViewer from GetPresContext, which will make sure that the pres shell is non-null.
Assignee | ||
Comment 7•19 years ago
|
||
*** Bug 303295 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•19 years ago
|
||
This patch changes nsDocShell::GetPresContext() to call EnsureContentViewer(), as suggested by bryner. This patch is independent of the previous one, which I think is still valid.
Attachment #191656 -
Flags: review?(bryner)
Assignee | ||
Comment 9•19 years ago
|
||
This patch doesn't spit out assertions if GetPresContext() is called when the docshell is being destroyed.
Attachment #191656 -
Attachment is obsolete: true
Attachment #191662 -
Flags: review?(bryner)
Updated•19 years ago
|
Attachment #191662 -
Flags: review?(bryner) → review+
Updated•19 years ago
|
Attachment #191656 -
Flags: review?(bryner)
Updated•19 years ago
|
Attachment #191213 -
Flags: superreview?(bryner)
Attachment #191213 -
Flags: superreview+
Attachment #191213 -
Flags: review?(bryner)
Attachment #191213 -
Flags: review+
Updated•19 years ago
|
Attachment #191662 -
Flags: superreview+
Assignee | ||
Updated•19 years ago
|
Attachment #191213 -
Flags: approval1.8b4?
Assignee | ||
Comment 10•19 years ago
|
||
Comment on attachment 191662 [details] [diff] [review] Revised nsDocShell patch This fixes a serious focus issue in Camino.
Attachment #191662 -
Flags: approval1.8b4?
Updated•19 years ago
|
Attachment #191662 -
Flags: approval1.8b4? → approval1.8b4+
Comment 11•19 years ago
|
||
Comment on attachment 191213 [details] [diff] [review] Patch Was this patch replaced by the other one, or do we need this one as well?
Updated•19 years ago
|
Attachment #191213 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 12•19 years ago
|
||
Fixed. Since the fix is in core, I'm going to move this bug to Core in case people want to search for it.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Component: Page Layout → Embedding: Docshell
Flags: review+
Product: Camino → Core
Resolution: --- → FIXED
Summary: When creating a new tab, gecko steals focus from the url bar → When creating a new tab, gecko steals focus from the url bar (early activate/deactivate fails)
Target Milestone: Camino0.9 → mozilla1.8beta4
Version: unspecified → Trunk
Assignee | ||
Updated•19 years ago
|
Summary: When creating a new tab, gecko steals focus from the url bar (early activate/deactivate fails) → When creating a new tab in Camino, gecko steals focus from the url bar (early activate/deactivate fails)
Comment 13•19 years ago
|
||
is this related to bug 210373?
(In reply to comment #13) > is this related to bug 210373? GtkMozEmbed doesn't use nsIWebBrowserFocus, and instead sets the focus controller's active state directly, and [de]activates the nsIPIDOMWindow. See http://lxr.mozilla.org/seamonkey/source/embedding/browser/gtk/src/EmbedPrivate.cpp#731 ToplevelFocus[In|Out] and ChildFocus[In|Out]. So it's probably not related. Bug 226708 discusses the origins of the problems with gtkmozembed focus.
Assignee | ||
Comment 15•19 years ago
|
||
It looks like the docShell changes caused a slight increase in pageload time on btek (930 -> 940ms). Bryner, do you still think that eagerly doing EnsureContentViewer is the right thing?
Comment 16•19 years ago
|
||
It also increased Txul and Ts, see e.g. comet, monkey or luna.
Assignee | ||
Comment 17•19 years ago
|
||
Backing out the docShell change brought the numbers back down (and isn't actually required to fix the bug). Should we leave it out?
Comment 18•19 years ago
|
||
This also increased leak numers on brad, and the backout brought them back to where they were before...
Assignee | ||
Comment 19•19 years ago
|
||
I backed out the nsDocShell.cpp patch above The bug remains fixed, even without this change.
You need to log in
before you can comment on or make changes to this bug.
Description
•