Closed Bug 370760 Opened 17 years ago Closed 17 years ago

Make ChatZilla go back to content-type <browser>s for its chat output

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [cz-0.9.78])

Attachments

(1 file, 2 obsolete files)

History: bug 306108
When security fixes were added which disabled "casual" access to content-type browsers from chrome ones, we had a choice between "hard" (rework all the code to non-casually access the content) and "easy" (make the <browser>s we make be chrome-typed) and unfortunately we picked "easy". If nobody minds (and I think nobody does), I'm going to go with "hard", because using chrome browsers has some bad side-effects:

1. Find doesn't work properly in it (it doesn't wrap because by default it won't wrap into chrome documents) (bug 321837)
2. Using ChatZilla in a tab broke completely. (bug 337060)
3. The document in question is no longer accessible as content, so screenreaders basically don't really use it at all. (no bug)

(I think there were other things but I forget)

So I think it'd be preferable to switch back to content-type docshells and implement the necessary steps to make that happen. James, you said you had some older incomplete patches on this. Could you put them up here or mail them or something? I'd be very grateful :-)


(bz, I'm CC-ing you mostly so someone who knows the whole chrome/content deal better than we do can yell at me/us if we're being stupid, if you don't mind. :-) )
Blocks: 337060
Hacked on this for a bit, running into trouble with contentWindows not having a wrappedJSObject. James, does that ring any bells with you when you tried to make this work?
Here, have a patch instead. This patch was written for bug 337060 (support running in a tab), and it does indeed make the content area appear and work in a tab. It doesn't fix all issues with it (e.g. clicking IRC URL links open a new CZ window), but since the patch currently only covers what this bug wants, it's here.

I don't know what code you tried with respect to the wrappedJSObject, but as noted in a comment in this patch, the "in" operator refuses to believe it exists, probably because it's a super special XPConnect thing as much as anything else. The property *is* there and does work, though. :)
Attachment #255641 - Flags: review?(gijskruitbosch+bugs)
James, thanks for your patch! Except it didn't really turn off chrome-type docshells :-). So, I've added that stuff in this patch. The problem is, I also added a dd for when there's no contentWindow or if we can find no initOutputWindow function. And that still fires. And up to writing this comment I couldn't figure out why that might happen - now I just realized it might fire the load notification as soon as about:blank appears or something... but I don't have the time to test that hypothesis right now. Either way, this is what I have right now :-)
Attachment #255641 - Attachment is obsolete: true
Attachment #255641 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 255641 [details] [diff] [review]
Wrap contentDocument requests, and unwrap XPCNativeWrappers on content*

At James' request, unobsoleting this, re-setting review stuff.
Attachment #255641 - Attachment is obsolete: false
Attachment #255641 - Flags: review?
Comment on attachment 255641 [details] [diff] [review]
Wrap contentDocument requests, and unwrap XPCNativeWrappers on content*

James, you sure can have my rubberstamp for this, but I was still under the impression I wasn't a peer. If that's changed, I'd be glad to hear about it - otherwise you'll need rginda or samuel to stamp this as well.
Attachment #255641 - Flags: review+
Attachment #255641 - Flags: review? → review?(samuel)
Comment on attachment 255641 [details] [diff] [review]
Wrap contentDocument requests, and unwrap XPCNativeWrappers on content*

[23:52:04]	<Gijs>	rginda: so, I'd been trying to poke you about becoming a peer for ChatZilla for a while. What do you think of that idea? :)
[23:52:12]	<rginda>	r=rginda
[23:52:15]	<rginda>	:)

Ergo, mine will be enough. Off to trunk with it.
Attachment #255641 - Flags: review?(samuel)
Comment on attachment 255641 [details] [diff] [review]
Wrap contentDocument requests, and unwrap XPCNativeWrappers on content*

Checked in.
Attachment #255641 - Attachment is obsolete: true
Attached patch Better patchSplinter Review
I like being right. It turns out it was indeed about:blank flagging the "help, where's my initOutputWindow function". So making sure not to complain if that happens, this should be able to catch all the other cases where something out of the ordinary happens.
Attachment #255676 - Attachment is obsolete: true
Attachment #256017 - Flags: review?(silver)
Attachment #256017 - Flags: review?(silver) → review+
Checking in mozilla/extensions/irc/xul/content/static.js;
/cvsroot/mozilla/extensions/irc/xul/content/static.js,v  <--  static.js
new revision: 1.231; previous revision: 1.230
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Blocks: 372102
Whiteboard: [cz-0.9.78]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: