User:Biesi

  • Revision slug: User:Biesi
  • Revision title: User:Biesi
  • Revision id: 133975
  • Created:
  • Creator: Biesi
  • Is current revision? No
  • Comment

Revision Content


Me

Christian Biesinger <cbiesinger@web.de>, Mozilla Developer.


Release table

For my reference, here's a table of Gecko releases, their branch dates, and corresponding releases of other products:

Gecko release Release date Branch date Other products
Mozilla "0.6" 2000-12-06  ? Netscape 6.0
Mozilla 0.9.2 2001-06-29 2001-06-22 Netscape 6.1
Mozilla 0.9.4 2001-09-14 2001-09-04 Netscape 6.2
Mozilla 1.0 2002-05-29 2002-04-09 Netscape 7.0
Mozilla 1.1 2002-08-27 2002-08-05
Mozilla 1.2 2002-11-26 2002-11-05
Mozilla 1.3 2003-03-12 2003-02-21
Mozilla 1.4 2003-07-01 2003-05-23 Netscape 7.1
Mozilla 1.5 2003-10-07 2003-09-10
Mozilla 1.6 2004-01-15 2003-12-18
Mozilla 1.7 2004-06-17 2004-04-12 Camino 0.8.x; Netscape 7.2; Firefox 1.0 (off the aviary branch)
Mozilla 1.8 n/a 2005-08-12 Camino 1.0 (?); SeaMonkey 1.0; Firefox 1.5

Devmo articles to write

I want to write articles about these topics. (Need to verify that no articles on those topics exist already...)

Using nsIContentSniffer

  • Helper app dialogs in embedding apps
  • Handling binary data in JavaScript
  • Using nsIChannel
  • Overriding Gecko components (e.g. the bad cert listener)
  • Using the directory service

What's new in Gecko 1.9

This is my perspective of the developer-related news in gecko 1.9. Planned as a list of the changes I do, although I might add changes made by others to this list if I consider them important.

The stuff in the 1.8.1 section is also part of 1.9.

(This is kind of outdated by now, and probably incomplete. sorry. --biesi 17:42, 10 June 2006 (PDT))

  • <object> loading rewritten
    • The source of an object can be dynamically changed (object.setAttribute("data", "foo.swf") or equivalent; same for <embed> and <applet>) (qawanted on this part)
    • Fallback to alternate content for objects happens per the HTML4 specification
    • Server-sent type overrides the type attribute (not for embed/applet)
    • bug 1156
  • (largely bz's work, some parts by me) Pseudo-classes for broken and blocked plugins
    •  :-moz-broken, :-moz-user-disabled, :-moz-suppressed
    •  :-moz-loading
    • Not really meant for web developers; mostly an implementation detail (and for embeddors); maybe useful for userContent.css
    • Note that this work also added :-moz-empty-except-children-with-localname(tagname) which might be useful for some cases (namespace of tagname must be same as the one of the parent element. this selector mishandles dynamic changes)
    • bug 11011, bug 1156, others
  • Attempts to access local files using XMLHttpRequest will always try to parse them as XML, irrespective of what their extension is and of what the OS believes their type to be
    • bug 305243
  • allowing to use nsIEventQueue from javascript
    • bug 315442. nsIEventQueue is killed, nsIThread much changed. Long live nsIThreadManager.

Planned, not yet implemented:

  • Selectors :-moz-type-unsupported, :-moz-has-handlerref
    • bug 309521
  • text-shadow support
    • might be without blurring
    • bug 10713

Gecko 1.8.1

  • http-on-examine-response observers can modify/remove the cookie header
    • bug 313414

Planned:

  • allowing extensions to intercept all redirects, giving them the old and new channels
    • DO NOT DO THIS BY IMPLEMENTING "@mozilla.org/netwerk/global-channel-event-sink;1" -- that would almost certainly create security bugs
    • bug 315598
  • Content sniffing
    • bug 324985

New in 1.8 already

Merged into Firefox 1.5 for Developers#XUL and Extension Developers, except for the bug numbers

  • Certificate prompts can now be overridden on a per-channel basis. This works by setting an interface requestor as an nsIChannel's notificationCallbacks and giving out an interface for nsIBadCertListener.
  • nsIWebBrowserPersist's listeners can now implement nsIInterfaceRequestor::GetInterface and will get an opportunity to provide all interfaces that channels might ask for, including nsIProgressEventSink (not too useful, redundant with nsIWebProgressListener). Useful interfaces here include nsIChannelEventSink and nsIBadCertListener.
    • bug 312370, bug 304286 (for nsIBadCertListener), bug 312367
  • Extensions or other necko consumers, including XMLHttpRequest, can set a Cookie header explicitly, and necko will not replace it. Stored cookies will be merged with the explicitly set header, in a way that the explicit header will override the stored cookies
    • bug 250375

Documentation

Someone should write wiki pages about these. For now:

How to get all child frames of a window (from chrome JS, or C++, etc)

const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor;
const nsIWebNavigation = Components.interfaces.nsIWebNavigation;
const nsIDocShellTreeNode = Components.interfaces.nsIDocShellTreeNode;

var webNav = window.QueryInterface(nsIInterfaceRequestor)
                   .getInterface(nsIWebNavigation);
var node = webNav.QueryInterface(nsIDocShellTreeNode);

Then use the functions from that interface to get child nodes. Use nsIInterfaceRequestor::GetInterface(nsIDOMWindow) to get back to a DOM Window.

How to tell whether a frame finished loading (chrome JS, C++, etc)

const nsILoadGroup = Components.interfaces.nsILoadGroup;
var loadGroup = webNav.QueryInterface(nsIInterfaceRequestor)
                      .getInterface(nsILoadGroup);
var pending = loadGroup.isPending()

(webNav as above)

Revision Source

<p><br>
</p>
<h3 name="Me"> Me </h3>
<p>Christian Biesinger &lt;cbiesinger@web.de&gt;, Mozilla Developer.
</p><p><br>
</p>
<h3 name="Release_table"> Release table </h3>
<p>For my reference, here's a table of Gecko releases, their branch dates, and corresponding releases of other products:
</p>
<table border="1">
<tbody><tr>
<th> Gecko release </th><th> Release date </th><th> Branch date </th><th> Other products
</th></tr>
<tr>
<td> Mozilla "0.6"
</td><td> 2000-12-06
</td><td> ?
</td><td> Netscape 6.0
</td></tr>
<tr>
<td> Mozilla 0.9.2
</td><td> 2001-06-29
</td><td> 2001-06-22
</td><td> Netscape 6.1
</td></tr>
<tr>
<td> Mozilla 0.9.4
</td><td> 2001-09-14
</td><td> 2001-09-04
</td><td> Netscape 6.2
</td></tr>
<tr>
<td> Mozilla 1.0
</td><td> 2002-05-29
</td><td> 2002-04-09
</td><td> Netscape 7.0
</td></tr>
<tr>
<td> Mozilla 1.1
</td><td> 2002-08-27
</td><td> 2002-08-05
</td></tr>
<tr>
<td> Mozilla 1.2
</td><td> 2002-11-26
</td><td> 2002-11-05
</td></tr>
<tr>
<td> Mozilla 1.3
</td><td> 2003-03-12
</td><td> 2003-02-21
</td></tr>
<tr>
<td> Mozilla 1.4
</td><td> 2003-07-01
</td><td> 2003-05-23
</td><td> Netscape 7.1
</td></tr>
<tr>
<td> Mozilla 1.5
</td><td> 2003-10-07
</td><td> 2003-09-10
</td></tr>
<tr>
<td> Mozilla 1.6
</td><td> 2004-01-15
</td><td> 2003-12-18
</td></tr>
<tr>
<td> Mozilla 1.7
</td><td> 2004-06-17
</td><td> 2004-04-12
</td><td> Camino 0.8.x; Netscape 7.2; Firefox 1.0 (off the aviary branch)
</td></tr>
<tr>
<td> Mozilla 1.8
</td><td> n/a
</td><td> 2005-08-12
</td><td> Camino 1.0 (?); SeaMonkey 1.0; Firefox 1.5
</td></tr></tbody></table>
<h3 name="Devmo_articles_to_write"> Devmo articles to write </h3>
<p>I want to write articles about these topics. (Need to verify that no articles on those topics exist already...)
</p><p><a href="en/Using_nsIContentSniffer">Using nsIContentSniffer</a>
</p>
<ul><li> Helper app dialogs in embedding apps
</li><li> Handling binary data in JavaScript
</li><li> Using nsIChannel
</li><li> Overriding Gecko components (e.g. the bad cert listener)
</li><li> Using the directory service
</li></ul>
<h3 name="What.27s_new_in_Gecko_1.9"> What's new in Gecko 1.9 </h3>
<p>This is my perspective of the developer-related news in gecko 1.9. Planned as a list of the changes I do, although I might add changes made by others to this list if I consider them important.
</p><p>The stuff in the 1.8.1 section is also part of 1.9.
</p><p>(This is kind of outdated by now, and probably incomplete. sorry. --<a href="User:Biesi">biesi</a> 17:42, 10 June 2006 (PDT))
</p>
<ul><li> <code>&lt;object&gt;</code> loading rewritten
<ul><li> The source of an object can be dynamically changed (<code>object.setAttribute("data", "foo.swf")</code> or equivalent; same for <code>&lt;embed&gt;</code> and <code>&lt;applet&gt;</code>) (qawanted on this part)
</li><li> Fallback to alternate content for objects happens per the HTML4 specification
</li><li> Server-sent type overrides the type attribute (not for embed/applet)
</li><li> bug 1156
</li></ul>
</li><li> (largely bz's work, some parts by me) Pseudo-classes for broken and blocked plugins
<ul><li> :-moz-broken, :-moz-user-disabled, :-moz-suppressed
</li><li> :-moz-loading
</li><li> Not really meant for web developers; mostly an implementation detail (and for embeddors); maybe useful for userContent.css
</li><li> Note that this work also added :-moz-empty-except-children-with-localname(<i>tagname</i>) which might be useful for some cases (namespace of tagname must be same as the one of the parent element. this selector mishandles dynamic changes)
</li><li> bug 11011, bug 1156, others
</li></ul>
</li><li> Attempts to access local files using XMLHttpRequest will always try to parse them as XML, irrespective of what their extension is and of what the OS believes their type to be
<ul><li> bug 305243
</li></ul>
</li><li> allowing to use nsIEventQueue from javascript
<ul><li> bug 315442. nsIEventQueue is killed, nsIThread much changed. Long live nsIThreadManager.
</li></ul>
</li></ul>
<p>Planned, not yet implemented:
</p>
<ul><li> Selectors :-moz-type-unsupported, :-moz-has-handlerref
<ul><li> bug 309521
</li></ul>
</li><li> text-shadow support
<ul><li> might be without blurring
</li><li> bug 10713
</li></ul>
</li></ul>
<h4 name="Gecko_1.8.1"> Gecko 1.8.1 </h4>
<ul><li> http-on-examine-response observers can modify/remove the cookie header
<ul><li> bug 313414
</li></ul>
</li></ul>
<p>Planned:
</p>
<ul><li> allowing extensions to intercept all redirects, giving them the old and new channels
<ul><li> DO NOT DO THIS BY IMPLEMENTING "@mozilla.org/netwerk/global-channel-event-sink;1" -- that would almost certainly create security bugs
</li><li> bug 315598
</li></ul>
</li><li> Content sniffing
<ul><li> bug 324985
</li></ul>
</li></ul>
<h4 name="New_in_1.8_already"> New in 1.8 already </h4>
<p>Merged into <a href="en/Firefox_1.5_for_Developers#XUL_and_Extension_Developers">Firefox 1.5 for Developers#XUL and Extension Developers</a>, except for the bug numbers
</p>
<ul><li> Certificate prompts can now be overridden on a per-channel basis. This works by setting an interface requestor as an <a href="en/NsIChannel">nsIChannel</a>'s notificationCallbacks and giving out an interface for <a href="en/NsIBadCertListener">nsIBadCertListener</a>.
</li><li> nsIWebBrowserPersist's listeners can now implement <a href="en/NsIInterfaceRequestor">nsIInterfaceRequestor</a>::GetInterface and will get an opportunity to provide all interfaces that channels might ask for, including <a href="en/NsIProgressEventSink">nsIProgressEventSink</a> (not too useful, redundant with <a href="en/NsIWebProgressListener">nsIWebProgressListener</a>). Useful interfaces here include <a href="en/NsIChannelEventSink">nsIChannelEventSink</a> and <a href="en/NsIBadCertListener">nsIBadCertListener</a>.
<ul><li> bug 312370, bug 304286 (for nsIBadCertListener), bug 312367
</li></ul>
</li><li> Extensions or other necko consumers, including XMLHttpRequest, can set a Cookie header explicitly, and necko will not replace it. Stored cookies will be merged with the explicitly set header, in a way that the explicit header will override the stored cookies
<ul><li> bug 250375
</li></ul>
</li></ul>
<h2 name="Documentation"> Documentation </h2>
<p>Someone should write wiki pages about these. For now:
</p>
<h3 name="How_to_get_all_child_frames_of_a_window_.28from_chrome_JS.2C_or_C.2B.2B.2C_etc.29"> How to get all child frames of a window (from chrome JS, or C++, etc) </h3>
<pre class="eval">const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor;
const nsIWebNavigation = Components.interfaces.nsIWebNavigation;
const nsIDocShellTreeNode = Components.interfaces.nsIDocShellTreeNode;

var webNav = window.QueryInterface(nsIInterfaceRequestor)
                   .getInterface(nsIWebNavigation);
var node = webNav.QueryInterface(nsIDocShellTreeNode);
</pre>
<p>Then use the functions from that interface to get child nodes. Use nsIInterfaceRequestor::GetInterface(nsIDOMWindow) to get back to a DOM Window.
</p>
<h3 name="How_to_tell_whether_a_frame_finished_loading_.28chrome_JS.2C_C.2B.2B.2C_etc.29"> How to tell whether a frame finished loading (chrome JS, C++, etc) </h3>
<pre class="eval">const nsILoadGroup = Components.interfaces.nsILoadGroup;
var loadGroup = webNav.QueryInterface(nsIInterfaceRequestor)
                      .getInterface(nsILoadGroup);
var pending = loadGroup.isPending()
</pre>
<p>(webNav as above)
</p>
Revert to this revision