Closed
Bug 325644
Opened 19 years ago
Closed 19 years ago
window.blur() fails on popup window in gtkmozembed
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ernstp, Assigned: benjamin)
References
Details
Attachments
(1 file)
1.49 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.8) Gecko/20060130 Ubuntu/1.5.dfsg-4ubuntu6 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.8) Gecko/20060130 Ubuntu/1.5.dfsg-4ubuntu6 Firefox/1.5
window.blur() throws an exception in gtkmozembed which is not caught and kills the script, breaking webpages.
is it implemented?
the worst problem is on pages like this:
window.blur()
document.myForm.submit();
submit is never run. maybe just implement blur as a dummy?
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowInternal.blur]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://helgon.net/guestbook/QuickMessage.asp?UserID=589312&UserName=BlaBlaBla&GuestBookID=17669269 :: SendGuestbook :: line 29" data: no]
Reproducible: Always
Steps to Reproduce:
javascript:window.blur() in epiphany for example
Comment 1•19 years ago
|
||
Bug 149307 suggests that gtkmozembed's EmbedWindow class needs to implement nsIEmbeddingSiteWindow2, whose only method is ::Blur.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
Comment on attachment 210518 [details] [diff] [review]
Don't throw on unimplemented blur(), rev. 1
- In nsGlobalWindow::Blur():
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
GetTreeOwner(getter_AddRefs(treeOwner));
nsCOMPtr<nsIEmbeddingSiteWindow2> siteWindow(do_GetInterface(treeOwner));
if (siteWindow)
rv = siteWindow->Blur();
if (NS_SUCCEEDED(rv))
mDocShell->SetHasFocus(PR_FALSE);
- return rv;
+ // If embedding apps don't implement nsIEmbeddingSiteWindow2, we
+ // shouldn't throw to web content.
+ return NS_OK;
I'd recommend simply just changing what rv is initialized to instead, that way if the blur() function *does* throw an exception it'd make it out to JS rather than getting lost.
r=jst with that change.
Attachment #210518 -
Flags: review?(jst) → review+
Assignee | ||
Comment 4•19 years ago
|
||
Fixed on trunk. If somebody wants to make gtkmozembed implement nsIEmbeddingSiteWindow2 please file a separate bug.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
See Also: → https://launchpad.net/bugs/30349
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•