Closed Bug 276482 Opened 20 years ago Closed 20 years ago

opening windows using javascript: links fails

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: crispin, Assigned: crispin)

References

()

Details

(Keywords: fixed-aviary1.0.1, fixed1.7.6)

Attachments

(1 file)

Since bug 257598 was fixed, opening javascript: links using the gtk_moz_embed_load_uri() function fails to allow the javascript link to open a new window. To reproduce: 1) Open TestGtkEmbed 2) Go to about:config and set dom.disable_open_during_load to true 3) paste the above url into the location bar I would expect a new window to open, but instead it is blocked.
Attached patch Proposed fixSplinter Review
This patch just allows popup windows when the embedding widget calls nsIWebNavigation::LoadURI() which only happens via the gtk_moz_embed_load_url() call.
Attachment #169916 - Flags: superreview?(blizzard)
Attachment #169916 - Flags: review?(marco)
Sorry, I mean bug 252326 (in comment #0)
Maybe we need a way to load_url while still leaving popup blocker enabled? See the patch landed for bug 272389. They are still leaving popup blocker enabled for OpenInNewWindow for example...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 169916 [details] [diff] [review] Proposed fix Marco isn't happy reviewing this as he doesn't understand the API, so requesting from bzbarsky who r= the original patch. I don't believe that an API to leave the popups blocked is needed. This only affects (AFAICT) javascript links (such as bookmarklets.
Attachment #169916 - Flags: review?(marco) → review?(bzbarsky)
bzbarsky: I'm cc'ing you to see if this is the correct fix for the gtk embedding widget, as you gave r= to the original patch (bug 252326)
So... What really ought to happen, in my opinion, is that nsIWebNavigation should have a way of specifying to loadURI what the popup behavior should be. Then the popup state should be munged inside nsIWebNavigation. It's really silly to expect all embeddors to deal with this by hand like this, especially given the use of nsPIDOMWindow...
bzbarsky: Is this patch ok for the moment, I will happily raise another bug about changing nsIWebNavigation, but we have had reports from users that this doesn't work, so it is something I would like to at least have a temporary fix in for the moment.
Comment on attachment 169916 [details] [diff] [review] Proposed fix This is OK as a band-aid, but please file a followup bug on doing this right, with a pointer to this code so it can be removed.
Attachment #169916 - Flags: review?(bzbarsky) → review+
Comment on attachment 169916 [details] [diff] [review] Proposed fix sr=jst, but yeah, we need a followup bug to do this right. Please cc me on the followup bug.
Attachment #169916 - Flags: superreview?(blizzard) → superreview+
Passing the popup state to nsIWebNavigation has been raised as bug 278357
Comment on attachment 169916 [details] [diff] [review] Proposed fix I'm asking for approval, as this is a simple (although bit of a sticking plaster) fix that allows the gtkmozembed users to open javascript bookmarklets properly.
Attachment #169916 - Flags: approval1.7.6?
Checking in embedding/browser/gtk/src/EmbedPrivate.cpp; /cvsroot/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp,v <-- EmbedPrivate.cpp new revision: 1.50; previous revision: 1.49 done
Assignee: blizzard → crispin
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment on attachment 169916 [details] [diff] [review] Proposed fix a=caillon for both branches.
Attachment #169916 - Flags: approval1.7.6?
Attachment #169916 - Flags: approval1.7.6+
Attachment #169916 - Flags: approval-aviary1.0.1+
1.7 branch: Checking in embedding/browser/gtk/src/EmbedPrivate.cpp; /cvsroot/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp,v <-- EmbedPrivate.cpp new revision: 1.38.14.2; previous revision: 1.38.14.1 done AVIARY_1_0_20040515_BRANCH (I hope this is the right one): Checking in embedding/browser/gtk/src/EmbedPrivate.cpp; /cvsroot/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp,v <-- EmbedPrivate.cpp new revision: 1.38.18.2; previous revision: 1.38.18.1 done
now also checked in on AVIARY_1_0_1_20050124_BRANCH: Checking in embedding/browser/gtk/src/EmbedPrivate.cpp; /cvsroot/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp,v <-- EmbedPrivate.cpp new revision: 1.38.18.1.2.1; previous revision: 1.38.18.1 done
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: