Closed
Bug 1270790
Opened 9 years ago
Closed 9 years ago
Chrome <iframe mozbrowser> cannot load http/https sources
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: gerard-majax, Unassigned)
References
Details
(Whiteboard: btpp-followup-2016-05-13)
Attachments
(2 files)
|
3.89 KB,
patch
|
Details | Diff | Splinter Review | |
|
3.97 KB,
patch
|
Details | Diff | Splinter Review |
STR:
0. Move mochitest to chrome mochitest
1. <iframe mozbrowser>.src = "http://example.org/"
Expected:
Page loads and we get load event
Actual:
Page does not load and we get no load event.
Change <iframe mozbrowser>.src to some valid chrome:// URL and it works. Set the iframe as remote with "remote=true" and it works.
| Reporter | ||
Comment 1•9 years ago
|
||
This simple test exposes the issue.
Attachment #8749594 -
Flags: feedback?(jryans)
| Reporter | ||
Comment 2•9 years ago
|
||
It looks like it even sometimes does only work from chrome with the mozbrowserloadend event, not load.
| Reporter | ||
Comment 3•9 years ago
|
||
MozReview-Commit-ID: FyLboKvrLWd
Attachment #8749647 -
Flags: feedback?(jryans)
Component: General → DOM
Comment on attachment 8749594 [details] [diff] [review]
<iframe mozbrower> load event triggering
I am not a mozbrowser peer, so let's check with :kanru.
I'll keep thinking about the problem as well.
Attachment #8749594 -
Flags: feedback?(jryans) → feedback?(kchen)
Attachment #8749647 -
Flags: feedback?(jryans) → feedback?(kchen)
Updated•9 years ago
|
Whiteboard: btpp-followup-2016-05-13
Comment 5•9 years ago
|
||
So does <iframe mozbrowser> when used in chrome create right kind of docshell?
| Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #5)
> So does <iframe mozbrowser> when used in chrome create right kind of
> docshell?
How to check this? Compare the docshell object between an <iframe mozbrowser> used from chrome against one used from content? Any specific property to check against?
(In reply to Olli Pettay [:smaug] from comment #5)
> So does <iframe mozbrowser> when used in chrome create right kind of
> docshell?
From reading the code, <iframe mozbrowser> always creates content docshells[1]:
// Force mozbrowser frames to always be typeContent, even if the
// mozbrowser interfaces are disabled.
nsCOMPtr<nsIDOMMozBrowserFrame> mozbrowser =
do_QueryInterface(mOwnerContent);
if (mozbrowser) {
bool isMozbrowser = false;
mozbrowser->GetMozbrowser(&isMozbrowser);
isContent |= isMozbrowser;
}
[1]: https://dxr.mozilla.org/mozilla-central/rev/e5a10bc7dac4ee2453d8319165c1f6578203eac7/dom/base/nsFrameLoader.cpp#562-570
Comment 8•9 years ago
|
||
That is good. I consider it a bug that xul:browser defaults to chrome docshell.
Note, load event dispatching is different when crossing chrome boundary. the xul:browser/html:iframe in the boundary does _not_ get its own load event, but the load event propagates from the window object in side the sub-frame to the xul:browser/html:iframe. One needs to use capturing listener to catch it. This all in non-remote case of course.
But I have no idea about page not loading issue here.
:gerard-majax, can you capture the load event with a capturing listener, `addEventListener("load", handler, true)`?
In a recent test case I wrote, I used a frame script to listen for load in the child, and then sent a message back up to the parent with the message manager, as that seemed to be the most stable way to detect it. That may be another option here.
| Reporter | ||
Comment 10•9 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #9)
> :gerard-majax, can you capture the load event with a capturing listener,
> `addEventListener("load", handler, true)`?
>
> In a recent test case I wrote, I used a frame script to listen for load in
> the child, and then sent a message back up to the parent with the message
> manager, as that seemed to be the most stable way to detect it. That may be
> another option here.
no, changing the addEventListener() does nothing.
| Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
| Reporter | ||
Updated•9 years ago
|
Attachment #8749594 -
Flags: feedback?(kchen)
| Reporter | ||
Updated•9 years ago
|
Attachment #8749647 -
Flags: feedback?(kchen)
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•