Closed
Bug 565610
Opened 15 years ago
Closed 15 years ago
Can not overlay about: urls
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
VERIFIED
FIXED
mozilla2.0b1
People
(Reporter: kinger, Assigned: mossop)
References
Details
Attachments
(2 files, 1 obsolete file)
115.30 KB,
application/x-xpinstall
|
Details | |
5.82 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
In the Add-on Compatibility Reporter, we are using the simple chrome.manifest declaration to overlay the Add-ons Manager:
overlay chrome://mozapps/content/extensions/extensions.xul chrome://acr/content/view/extensionsOverlay.xul
The overlay is not loaded in the new add-ons manager XUL page. I have verified this by using DOM Inspector, plus an alert not firing in a function called via a load event listener.
If I load the Add-ons Manager via the following alternative route, the overlay is applied and the alert shows:
javascript:open("chrome://mozapps/content/extensions/extensions.xul", "_blank", "chrome=no");
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a5pre) Gecko/20100511 Minefield/3.7a5pre (.NET CLR 3.5.30729)
Comment 1•15 years ago
|
||
I had blindly assumed that would work. And if this is the case for all chrome:// URLs loaded in a tab, then its going to be quite an issue as more things get moved from being windows/dialogs to being loaded in tabs (eg, preferences, download manager, places library, etc).
Neil: Any ideas? Or ideas on anyone else I should ask? I'm really hoping this is something that can be fixed.
Blocks: 550048
Updated•15 years ago
|
Component: Add-ons Manager → XUL
OS: Windows Vista → All
Product: Toolkit → Core
QA Contact: add-ons.manager → xptoolkit.widgets
Hardware: x86 → All
Comment 2•15 years ago
|
||
A test on a simple overlay works fine. So may be something specific to the extensions.
Is extensions.xul loaded in the normal way? That it applies when calling open, as described in the first comment, implies that the manner in which the file is loaded and displayed in involved.
Comment 3•15 years ago
|
||
Ah, is the extension window actually being loaded as about:extensions or somesuch? An overlay on chrome://mozapps/content/extensions/extensions.xul won't work.
Overlays also only work for chrome urls.
"is the extension window actually being loaded as about:extensions or
somesuch?"
Yes about:addons
Comment 5•15 years ago
|
||
Yes, its normally loaded as about:addons. But Brian said to me that he also tried loading the chrome:// URL directly with no success. Brian - can you confirm?
Would there be any possibility of getting overlays working for about: URLs? Or is there something the about: protocol handler can do to make them work?
AFAIK, the plan is to introduce more chrome pages loaded in tabs as about: URLs. Not being able to load overlays on those pages would be a deal-breaker; and we'd have to consider using chrome:// URLs instead, which really isn't wanted.
Reporter | ||
Comment 6•15 years ago
|
||
(In reply to comment #5)
> Yes, its normally loaded as about:addons. But Brian said to me that he also
> tried loading the chrome:// URL directly with no success. Brian - can you
> confirm?
Sorry, I was mistaken. I just tested via chrome://mozapps/content/extensions/extensions.xul and the overlay *is* loaded.
> Would there be any possibility of getting overlays working for about: URLs? Or
> is there something the about: protocol handler can do to make them work?
>
> AFAIK, the plan is to introduce more chrome pages loaded in tabs as about:
> URLs. Not being able to load overlays on those pages would be a deal-breaker;
> and we'd have to consider using chrome:// URLs instead, which really isn't
> wanted.
Yes, there are many add-ons out there that overlay the Add-ons Manager that will be broken by this.
Comment 7•15 years ago
|
||
Just weighing in to say that Greasemonkey is very interested in listing User Scripts in the standard "Add Ons" dialog, wherever it may be, as we view User Scripts as just another kind of add on for the browser, and believe it's simplest/best to present them that way to users. We would desperately appreciate if the Firefox developers could reach out to us as this change progresses, to make sure that this is both possible and straightforward (i.e. without fragile techniques).
Our developer list is greasemonkey-dev @googlegroups.com . Thanks in advance.
Assignee | ||
Comment 8•15 years ago
|
||
The last time we came across this we closed it as basically intentional. I wonder how hard it would be to implement though.
Summary: Can not overlay new Add-ons Manager → Can not overlay about: urls
Assignee | ||
Comment 9•15 years ago
|
||
Allowing overlays on about: urls turns out to be very easy, at least on the
surface. What I don't know is if there was a specific reason it is disabled
right now. Do you know Boris?
![]() |
||
Comment 10•15 years ago
|
||
Where is it disabled?
Updated•15 years ago
|
blocking2.0: --- → ?
Assignee | ||
Comment 11•15 years ago
|
||
Perhaps easiest answered with this WIP patch I have that enables overlays for about: uris. I still need to verify what that means for unprivileged about: uris.
![]() |
||
Comment 12•15 years ago
|
||
OK, why not ask Benjamin, who added those checks? They were added in bug 229285.
Comment 13•15 years ago
|
||
IIRC it had something to do with fastload of overlays and that the fastload cache was correct if you loaded a page via chrome: first and then via about:, but not the other way around. I don't have a strong preference as long as it works consistently.
Reporter | ||
Comment 14•15 years ago
|
||
So we have a patch here, and what seems like agreement that we can do this.
Can we check in?
![]() |
||
Comment 15•15 years ago
|
||
We have agreement? What we have is a note that doing this in the past broke things and that if we want to do it now we need to make sure said things aren't broken first. Ideally in automated test form, of course. See comment 13.
Assignee | ||
Comment 16•15 years ago
|
||
Yeah I need to work out how to verify and if possible test the problem mentioned in comment 13.
Assignee | ||
Comment 17•15 years ago
|
||
Comment on attachment 445373 [details] [diff] [review]
patch rev 1
I think this patch is correct, at least as far as my understanding goes here. From bsmedbergs concerns I have verified that it works regardless of whether you load the about: page or chrome: page first. I couldn't figure out exactly whether the documents were going into the XUL cache correctly, I'm not sure how to do that. I also don't know how we can automatically test this easily since we'd have to tell the chrome registry about new overlays somehow. I can easily provide an add-on that overlays about:addons to prove it works in a litmus test though if we have nothing else.
This should cover overlay and style overlays.
Attachment #445373 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
![]() |
||
Comment 18•15 years ago
|
||
> From bsmedbergs concerns I have verified that it works regardless of whether
> you load the about: page or chrome: page first.
Hmm. So what I seem to recall is that scripts in overlays are compiled with the principal of the document being overlayed and then cached in the xul proto cache. Which means that if you overlay an about: page which is not system-principal, it will "break" the scripts in that overlay if it's applied to any system-principal document, right? And due to fastload, that will persist across restarts, even....
I guess the IsChromeURI guard in nsXULDocument::OnStreamComplete is staying, though, right?
Should we add conditions in nsXULDocument::LoadOverlayInternal to not stick overlays being loaded into the proto cache if |this| is not chrome? It would be slower for about: uses which use overlays, but safer, I think.
Reporter | ||
Comment 19•15 years ago
|
||
Dave, in comment 17 you were looking for an add-on to test. This attachment is a dev version of the Add-ons Compatibility Reporter.
There is only a content overlay, not a style one:
overlay chrome://mozapps/content/extensions/extensions.xul chrome://acr/content/view/extensionsOverlay.xul
What you should see is a Compatibility button in the listings in the add-ons window.
Assignee | ||
Comment 20•15 years ago
|
||
(In reply to comment #18)
> Should we add conditions in nsXULDocument::LoadOverlayInternal to not stick
> overlays being loaded into the proto cache if |this| is not chrome? It would
> be slower for about: uses which use overlays, but safer, I think.
Added that. I've also made it so we ignore overlays in the cache when the main document is not chrome to avoid the case where the main document does not have the system principal but the cached overlay would, which I presume would also be bad.
It might be nice to make it so we really check if the main document has the system principal or not rather than just if it is chrome at some point but I think this works for now. I've verified with some logging that we don't read/write the cache when loading about: urls with overlays but still do for chrome:.
Attachment #445373 -
Attachment is obsolete: true
Attachment #449284 -
Flags: review?(bzbarsky)
Attachment #445373 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 21•15 years ago
|
||
Per the planning meeting we want the add-on compatibility reporter available and working in time for beta1 and this bug blocks that so it is a beta blocker.
blocking2.0: - → beta1+
Reporter | ||
Comment 22•15 years ago
|
||
NEW ACR test version compatible with 3.7a6pre:
https://bugzilla.mozilla.org/attachment.cgi?id=450640
Comment 23•15 years ago
|
||
So does that new version work with the trunk? Or is it still blocked on this bug?
bz: any chance of a review early next week?
Assignee | ||
Comment 24•15 years ago
|
||
(In reply to comment #23)
> So does that new version work with the trunk? Or is it still blocked on this
> bug?
ACR is still blocked by this.
![]() |
||
Comment 25•15 years ago
|
||
> bz: any chance of a review early next week?
Yes. Maybe even tonight, if I really need a break from this e10s merge.
![]() |
||
Comment 26•15 years ago
|
||
Comment on attachment 449284 [details] [diff] [review]
patch rev 1
>+++ b/content/xul/document/src/nsXULDocument.cpp
>+ // why is this check a member function of nsXULDocument? -gagan
It's not, and gagan's not involved. Just drop that line, please.
>+ // the cached document will do, see bug 565610.
s/will do/will/
r=bzbarsky
Attachment #449284 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 27•15 years ago
|
||
Thanks, landed: http://hg.mozilla.org/mozilla-central/rev/5f3f36fe8d76
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Comment 28•15 years ago
|
||
Confirmed WORKING with ACR with following entry in chrome.manifest:
overlay about:addons chrome://acr/content/view/extensionsOverlay.xul
r69115
Comment 29•15 years ago
|
||
Tested with latest developer release of ACR and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a6pre) Gecko/20100624 Minefield/3.7a6pre on all platforms. The Add-ons Manager can be overlayed now. Marking as verified fixed.
Status: RESOLVED → VERIFIED
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•