Mozile 0.7 Change Log Mozile 0.7.6: - Added Grant Gredvig's Edit Source module. It is included in the modules array of the default mozile.js file. - Increased z-index values in interface.css. See http://bugzilla.mozdev.org/show_bug.cgi?id=14281 - Changed MozileMediator.documentToHTML() and editorToHTML() to use innerHTML for serializing, when possible. - Changed MozileMediator.restoreState() in the UndoRedo module to ignore the MozileToolbar and MozileStatusbar elements. This fixes a bug when undoing changes when a full document is editable. - Some changes to the LocalFile module in response to this bug: http://mozdev.org/bugs/show_bug.cgi?id=14543 Unfortunately, I don't have access to a WinXP test machine. - Made a number of small changes to the extension system to allow the user to set the size of the Mozile toolbar icon. This is the best solution I could come up with: sizes are different on different browser versions, platforms, and themes, and I couldn't work out a stable auto-detect system. - Added an Apache Ant based build system, similar to the one in Mozile 0.8. Mozile 0.7.5: - Reworked testing system to allow for functional tests as well as unit tests. Rearranged the testing directory. Renamed "core" to "unit". Changed index.xml and index.xsl significantly. Added a "function" directory and a GUIUtils.js script for simulating the mouse and keyboard. Moved shared files to "shared" and reworked testpage.js and testsuite.html. Since GUIUtils.js won't work in Gecko versions before 1.8, any test pages that require it fail quietly in unsupported browsers. - Added a Boolean "undoable" option to MozileCommand, and an isUndoable() method. The default value is "true". Set it to "false" if the command should not be added to the undo stack. Changed all existing commands (where needed) to use the option. Updated test pages. - InsertionPoint improved. Added Node.getFirstInsertionPoint() and Node.getLastInsertionPoint() methods. - Changed XHTMLBasic's MozileInsertCommand to move the selection to the end of the inserted node, or immediately after it if the node has no insertion point. - Minor MozileInterface and MozileToolbar fixes for better tracking of the parentNode. - Improved arrow key handling in mozileHandleKeypress() in core.js using InsertionPoint. - Improved InsertionPoint and related methods. Previously InsertionPoints were limited to text nodes. Now they have been generalized to include either a) the pair of a text node and an offset within the text, or b) the pair of an element and an offset within the childNodes list. The former is preferred and used whenever possible. This brings InsertionPoint into parity with Selection and Range, which use both kinds of points. The new InsertionPoint is used to override the default left/right cursor behaviour for the browser. The upshot is that the cursor can now be placed between elements. - Revised getXPath() method to use polymorphism for Node, Attr, Element, and Text. - Cleaned up tests. There's an increasing number of small bugs which apply to Mozilla 1.7 and Firefox 1.0.7 and which I can't fix. The ones that are breaking the test suite but don't appear to be doing any damage I've masked in the tests. Mozilla versions less than 1.8 can only be considered "partially" supported. - Fixed extension help bug. Enhanced editors will request "showHelp" from the extension, which will open a new window. Unenhanced editors will open the mozile.mozdev.org documentation. Server-side editors will open the documentation included with the server-side distribution. - Extension now sets the debugLevel when editPage() is called, using the mozile.debugLevel preference. - HTTPPost abort button hides when mozileXHR.readyState is 0 or 4. - Added an update() method to MozileInterface. - Added isAvailable() method to MozileCommand, and changed the update() method to check for availability. If the command is not available, its button and menuitem are collapsed. By default isAvailable() always returns true. New Mozile "hideInactiveCommands" option determines where the commands are hidden (collapsed) or just disabled. - Fixed editor splitting bug http://bugzilla.mozdev.org/show_bug.cgi?id=13728 - Fixed bug where a character was deleted when blocks were merged. - Added an option to MozileUnformatCommand which allows the removal of tags with a specific name. Removed the unformat command in the default toolbar and replaced it with an unlink command. Moved the link command out of the insert menu and into the main toolbar. - Changed MozileMeditator.watchSharedData() to use an event listener rather than an interval. Mozile 0.7.4: - Changed MozileExtension.editPage() to call preloadInterfaces() before loading the mozile.js script. This means that Mozile in the document can run mozile._cleanUpInterfaces() in mozile.loaded() and not have to wait for the Extension to tell it to. The shared data "status" attribute is now unneeded. - Updated MozileInterface.getElement() in interface.js to do better detection for previously injected elements. Added similar features to MozileResource.getElement() and load() in core.js - the resource will check to see if an element with the given id already exists and use it, and it won't load an element which is already positioned in the document. - MozileMediator.loaded() now calls module.init() for each module mozile.getModules(). The modules no longer have to do it themselves. - Created new MozileToolbar class which inherits from MozileInterface. Reworked the toolbar and statusbar systems to use the new class. The XBL binding in interface.xml is no longer needed so that file has been removed. A new status.xml file was created for the statusbar interface. New MozileToolbar unit tests. The changes seemed to make the toolbar menu bug show up in Firefox 1.0.7, and so I've extended the fix for that to all Mozilla 1.7 based browsers. - Changed statusbar buttons to toolbarbuttons, and tweaked interface.css. - Changed the statusbar id to "MozileStatusbar" and toolbar id to "MozileToolbar". - Added a "preloaded" configuration option for MozileMediator. The default is "false". When "true" it stops new scripts from being loaded in MozileMediator.load(). - All modules now use an init() function for initialization, and MozileModule has a default (empty) init() method. - Made testing tools more flexible, allowing you to run the full test suite for only one file type (e.g. XHMTL) at a time. - Added a toString method for MozileComponent and MozileResource. - Renamed "cleanUp*" methods to "clean*". - Reworked MozileExtension.editPage() to insert JavaScript code as text into document instead of linking to chrome files. This eliminates the need for calls to "wrappedJSObject" in Mozile and should be more secure. Also, mozile._cleanString has been removed as unneeded. - Following Max's changes to 0.6, changed HTTPPost.js to no longer use XMLHTTPRequest.setRequestHeader('Content-Length', length) in versions of Mozilla other than the old 1.7. - Changed source.xml to use an HTML textarea instead of an XUL textbox. This allows for better copying out of the box without any JavaScript warnings. Removed textbox rules from interface.css. - Added a central mozileHandleEvent() function to core.js, which redirects events to the other handlers. This can support hooks for event handling in the future. Changed all event listeners to point to this function. - Removed MozileMediator.getSelection and getDocument methods, which should no longer be needed now that XPCNativeWrappers are being respected. - Simplified the Selection.deleteContents() method. Added a Selection object test page. - Created Document.isHTML, getHead, and getBody methods, and revised core.js and interface.js to use them. Added a Document object test page. - Cleaned up Node methods, and added a Node.getXPath() method to generate a simple unique XPath from the documentElement to the node. Added an executeXPath() function. Added a Node object test page. - Moved MozileMediator.storeSelection() and restoreSelection() methods to Selection.store() and restore(). Revised them to use the new Node.getXPath(). - Added an InsertionPoint object, which you create by calling Selecton.createInsertionPoint(). Added test page. - Fixed a bug Sebastian Schaffert pointed out in XHTMLBasic, where the ul, ol, style, attribute, and title commands needed their main methods renamed to "execute". - Improved safeEval in extension.js - Fixed MozileResource.load() in core.js - Updated install.rdf files. - Fixed editor creation in core.js to deal more gracefully with input fields. - Better extension start and stop behaviour. - Fixed sizing of Mozile Edit button for Firefox cross-platform. - New mozileBuild.py script. Works cross-platform and with Mozile 0.6 and 0.7. Stored in mozile/www/tools/mozileBuild.py - Extension loading fix for browsers other than Firefox 1.5 Mozile 0.7.3: - Fixed JavaScript warnings when focussing on textbox or input elements. The solution to the former was to make readonly textboxes have CSS "-moz-user-input: none" in interface.css. The solution to the latter was to place XBL event handlers in try blocks in interface.xml. Removed "-moz-user-select" from interface.css input and textbox entry since it was causing an error in FF 1.5 and things seem to work fine without it. - Fixed bug where context menus would appear while trying to click toolbar buttons. Solution is to capture "contextmenu" events in the "toolbar" XBL binding in interface.xml - when the event.originalTarget has the "mozileButton" class, cancel the event. - Added getBrowserName, getBrowserVersion, getGeckoVersion, and getMozillaVersion methods to MozileMediator in core.js. - Fixed toolbarbutton menupopup bug in Mozilla 1.7.11 and 1.7.12. Solution is to change MozileCommandList._createButton (in interface.js) only for Mozilla 1.7 versions and add an onpopupshown handler: the boxObject.screenY is wrong by event.pageY pixels, so we fix it. Already fixed in 1.8+ (i.e. Firefox 1.5 and Seamonkey) and in FF 1.0.7, but may apply to older FF 1.0.x. - Fixed Mozile Extension problem under Windows with FF 1.5 where only the title bar of Warning and Options dialogs would show. Solution is to add "this.sizeToContent();" to the "onload" attribute of the dialog. - Fixed Mozile Extension problem where a newly editable page would have only a few buttons in the toolbar. The problem was that I relied on a timer to tell the toolbar to show itself, and it would often fire before most of the buttons had loaded. The solution was to add a MozileMediator.loaded() method which would do the work. In order to call the method at the right time, I changed MozileMediator.load() to add a trivial