<Glazblog/>

Mozilla

Warning Bill, the lizard still bites

Entries feed - Comments feed

Tuesday 21 June 2011

The faster release process of Firefox

So Firefox 5 is about to ship. Before anything else, let me translate here two excerpts from this article in French about Firefox 5:

...this is not a major evolution of the browser but more an update to Firefox 4... No visible new feature...

I read and heard a lot about the good things coming from a faster release process. They are downsides too, and nobody really listed them in public. Given the impact on my own daily work, I think it's time to start the feedback loop. Reminder: criticism is always good, it helps spotting issues before they become too big and too painful.

  1. version numbers become meaningless. Firefox 4 was released the 22nd of march; 4.01 the 28th of april. Firefox 5 is about to be released. Firefox 6 and 7 are already announced. But even the press says 5 does not deserve a major version bump. Why not a 4.2 ? What's the mood of a user receiving a Firefox 5 when he/she sees no immediate visible difference with a Firefox 4 and when even the web site he/she reads about it says "no visible new feature?".
  2. corporations cannot follow that speed. Big corporations have to evaluate a new browser against their intranets and often with their corporate partners before allowing it. Even builtin update to minor versions is often forbidden because of corporate rules. Making version number evolve faster puts a huge burden on the IT departments of big corporations: the users see a bump from 4 to 5 and ask for it while a bump from 4.0 to 4.1 does not cause the same reactions.
  3. Google does it. So what? Last time I checked, the Mozilla Manifesto was about openness, freedom of choice and innovation, not competition with WebKit.
  4. the Mozilla ecosystem suffers. Users of tools embedding Gecko (for instance through XULRunner) want applications matching the modernity and security of the last version of Firefox. But it's very difficult for organizations that are most of the time much smaller than Mozilla itself to follow the trend. In the case of BlueGriffon, 1.0 was released the 10th of may. A v5 of Firefox released in the coming days will without any doubt trigger feedback from users wanting a version of BlueGriffon matching that v5's core and I am not ready yet, that's far too fast for me. Even if my tests show I can go on with the last xulrunner, my feature set did not improve that much to bump to 2.0. I can already hear the counter-argument: don't mention Firefox versions, mention Gecko versions. But guys, that's exactly what I said about the "Powered by Mozilla" stamp: a lot of people have just no idea what Mozilla or Gecko are! They know the name "Firefox", they partly ignore "Mozilla" and totally ignore "Gecko". Firefox is the only reference that does matter here.
    Anyway, moving to a new version of Firefox, its toolkit and Gecko will always require from 3rd-party embedders tests and often adaptations to their own code. That takes time, and the faster release process does not really care.
    By the way, don't the marketing teams at Mozilla suffer too? A major version every 16/18 weeks, wow...
  5. Fragmentation and workload for embedders. If embedders want to anticipate just a little bit what's going to happen in Firefox or the toolkit or Gecko, the time investment just multiplied by 3 or 4. For most of us, that's just not feasible and we'll follow only the about-to-be-released tree and we will probably always lag. In other terms, we won't detect bugs caused by changes in the other ones, the to-be-released-in-16-and-32-weeks trees and we'll let pass regressions or issues that should probably be detected immediately.
  6. Web authors will have to sniff even more browser versions. It's a browser war time and new cool kids are around the block. 3D Transforms, Animations, Reflections, Device APIS and many, many more. A faster release process means a greater fragmentation of the browser landscape and that's absolutely terrible for web authors.

I'm not saying a faster release process is 100% bad. I'm only saying here it has important downsides that are in my opinion important enough to trigger a feedback loop. Why not a faster release process but with minor version numbers instead of major version numbers? In particular, the side-effects on the Mozilla ecosystem and the Web authors' community seem to me really underestimated.

Update: I forgot to mention the huge impact on add-on authors... And add-ons are one of the most influential points in the success of Firefox in front of Chrome.

Wednesday 1 June 2011

Help! Localization, download and size

Given the fact I can't, for time, network and technical reasons, release 13 localized versions of BlueGriffon, I have about two options here and would like to read what you think is the best:

  1. one single package with the 13 locales.

    Pros: selecting a locale is 3 clicks away through the Preferences panel.

    Cons: size of the package, user ends up with useless locales.

  2. one single package with only en-US and the 12 other locales (langpack, dictionnary if available) can be downloaded independently.

    Pros: much smaller downloads.

    Cons: user has to save 2 XPIs (langpack, dictionnary) on local disk, install them manually, then switch locale through Preferences

What do you think?

Wednesday 11 May 2011

Am I old?

This is a verbatim from an IRC chat:

<glazou> are interested in contributing?
<glazou> s/are/are you
<xxxx> looool, nerd
<xxxx> ;-)
<xxxx> unfortunately i didn't grow up with the terminal but i think i heard of s/

Monday 9 May 2011

JSCSSP

I have just updated my CSS parser written in JavaScript, JSCSSP, to match the one used inside BlueGriffon 1.0. I know there are still small bugs in areas that BlueGriffon does not use ; they were of course of lower priority for me. Now that the 1.0 release is in sight, and since JSCSSP is used by more and more projects every day, I'll fix them as soon as I can.

FreeRecord 4.01

Je viens de mettre à jour mon add-on FreeRecord pour Firefox. La version 4.01 est donc disponible pour Firefox 4.01 (et c'est une coïncidence). Vous pouvez l'obtenir via Outils > Modules Complémentaires et en faisant un clic droit sur FreeRecord, ou en la téléchargeant directement depuis le site.

Sunday 8 May 2011

Add-ons data...

My Firefox profile being corrupted, I had to dive a little bit into its salted directory. What I found there is just scary... Here are the contents of that profile:

GoogleToolbarData			extensions				places.sqlite
User_Gear.owg extensions.ini pluginreg.dat
adblockplus extensions.log prefs.bak
addons.sqlite extensions.rdf prefs.js
antbar extensions.sqlite rainbow-easel
blocklist.xml fireFTPprograms.dat scribefire.sqlite
bookmarkbackups fireFTPsites.dat search.json
bookmarks.bak firebug search.rdf
bookmarks.html foo.dat search.sqlite
bookmarks.html.sbsd.bak formhistory.sqlite searchplugins
bookmarks.postplaces.html foxyproxy.xml secmod.db
bookmarks.preplaces.html freerecord.sqlite sessionstore.bak
bookmarks.xml gm_scripts sessionstore.js
bookmarks_history.sqlite gtb-metrics.xml signons.sqlite
cert8.db hostperm.1 signons.txt
cert_override.txt imagescatch_autosave.owm signons2.txt
chatzilla jetpack signons3.txt
chrome jetpack-editor-code.txt tidy_base.html
chromeappsstore.sqlite jetpack-example-code.txt tidy_cleanup.html
compatibility.ini jetpack_ann.sqlite tplbug.sqlite
compreg.dat key3.db twitfactory.sqlite
content-prefs.sqlite kf.txt twitterfox_1.9.sqlite
cookies.sqlite kosa ubiquity_suggestion_memory.sqlite
cookies.sqlite.bak lightweighttheme-footer urlclassifier.sqlite
cookies.txt lightweighttheme-header urlclassifier2.sqlite
cookperm.txt localstore-safe.rdf urlclassifierkey3.txt
defaults.ini localstore.bak useragentswitcher
despin-scratchpad localstore.rdf venkman-settings.js
dh-conv-rules.rdf localstore.rdf~ weave
dh-media-lists.rdf messages.sqlite webappsstore.sqlite
dh-smart-names.rdf mimeTypes.rdf webchunks2.sqlite
downloads.sqlite minidumps xpti.dat
dta_history.xml permissions.sqlite
dustmeselectors-data persdict.dat

Hum, to say the least... Ok, some files there (*~ and *,bak) are mine, edited using emacs or another editor because I needed it. But I think user profiles should contain a addon-data/ folder with a subfolder per add-on, its name being the add-on ID of the add-on and that AMO editorial rules should force add-on authors to store *ALL* data there. It would then be easier to migrate, backup, delete, cleanup. Thoughts ? In particular is it ok to put sqlite databases in such a deeper folder for sqlite-based templates (I haven't checked yet)?

Tuesday 26 April 2011

Wysiwig is hard #3, why do you mess with my source code?

The trickiest problem of all for a DOM-based Wysiwyg editor... I already wrote multiple times about it, but once more is not worthless. Here are some of the requests I currently have on my BlueGriffon radar:

  1. don't mess with my indents and CRs
  2. please don't wrap long lines for asian languages since that introduces an unwated whitespace in the rendering
  3. I want a checkbox in the source view allowing me to toggle on/off the line wrapping
  4. don't touch my original source code but if I insert new paragraphs, I want a paragraph per line, not an endless line with all my new content

Eh. Only that... Let me give one answer per item above:

  1. in just a few words, that's impossible in the general case. The simplest case a DOM-based editor will never handle is the following one
    <img src=foo.png"
    alt="my image" />

    where the user wants to preserve the indentation of the alt attribute in the source code... In the DOM, the carriage return and the indentation just cannot be preserved. There is no way the HTML serializer can output the same source code from the DOM. Yeah, well, it could nicely indent the second attribute. But then it will do it for all attributes. And some other users will complain about it, in particular if the two attributes fit into one single (not too long) line.

  2. that one is doable modulo the fact people wanting this also always want request number 4 to avoid endless lines. So see item 4 below please.
  3. that request implies a deep misunderstanding of what is the source view of a DOM-based editor... The source code is serialized from the DOM tree before showing the source view. If the source view shows line wrapping for instance at 72 chars, it's impossible to go back to the unwrapped view without reparsing the source and reserializing the DOM tree w/o the wrap option ; same thing if you have an unwrapped view, the list of operations needed to switch between unwrapped and wrapped is not trivial at all. In all cases, the result will very likely be not exactly in line with what the user expected.
  4. sigh. So if you original source contains in one single line <p>a</p><p>b</p> you want to preserve that as it is, but if you create the same two paragraphs in the Wysiwyg view, you want the created paragraphs to generate one line each in the source view. There's only one way that could be done: give a special attribute or user data to the nodes created in the wysiwyg view. Why? Because there is no other way the serializer can make a difference between a node that was in the document at parse time and another node you created by hand... Then during serializing in Raw mode, output a CR before blocks' start tags for blocks that do carry that special attribute/user value. Of course, those special data should not be visible in the source view. So when you go back to wysiwyg view, they're lost. Hum, to say the least.

I said it multiple times in the past, a DOM-based Wysiwyg can try its best to keep your source code readable, indented, nice. But it cannot, it just cannot preserve an original source code whatever that source code. Serialization will always drop some whitespaces/CRs from the original source. It will always have to make compromises between the various - and opposite - wishes of the user. Wysiwyg is still hard.

Wednesday 16 March 2011

FreeRecord, Freebox v6

Voici une preview de FreeRecord v4 que je vous demande de tester. Il est plus particulièrement fait pour Firefox 4, ce qui veut dire qu'il est possible qu'il pose quelques soucis sous 3.6.x encore que normalement cela ne devrait pas être le cas... Soucis connus de cette preview :

  1. la fenêtre contient une titlebar de trop dans la version linux
  2. toutes les couleurs et fonds ne sont pas encore stabilisés
  3. la tabbox n'est pas finalisée pour windows et linux

Normalement, cette preview marche parfaitement avec la Freebox v6. Cela marche avec la mienne. Sur cette FB v6 dont je dispose, je vois toujours deux boitiers : le n°1 est celui sur lequel vous pouvez sauver, le n°2 est le freebox v6 server qui est incorrectement listé par l'API... Je n'y peux rien.

N'hésitez pas à ajouter des commentaires sur cet article si vous avez des soucis avec cette version. Merci !

Monday 7 February 2011

Lesson well taken, thanks Mozilla

When Mozilla trademarked Firefox, many people complained loudly. How dared Mozilla trademark a name related to open source and free software... I did not complain. I made comments, because the original trademark policy needed some light clarifications, but I did not complain at all. I found it perfectly wise and normal for Mozilla to protect the name of its flagship product to avoid clones of Firefox under the same name/logo. I never found the trademark harmful to the Open Source nature of Firefox and still think the free zealots who switched the name/logo to Iceweasel are stupid fanatics. Ubuntu's name and logo are protected too and they never shout at that.

So when I started working on my current new editor, I did the same and trademarked BlueGriffon immediately.

And since a pure copy of http://bluegriffon.org appeared some days ago under the URL http://bluegriffon.FR, it was a good idea. The site was such a copy of mine that the TM signs, the logo, the prose, the images, everything was copied. The download links were changed, the contact emails were changed and more important, ads were added... The cybersquatter behind that is apparently well known to copy/abuse very visible open source or free projects to drive ad-based income.

Here, thanks to the TM registration, a cease-and-desist letter was enough. The domain is now in the hands of my company even if the DNS changes are not widely spread yet. A legal action would have given the same result : TM infringement was clear, and AFNIC rules were clearly in our favor.

So thanks Mozilla, thanks a lot for the lesson. Sincerely.

Wednesday 27 October 2010

Mozilla Office

(disclaimer: I speak for myself and represent nobody else, period ; this is only my personal opinion and I give it because it's all about editors after all)

I read with great interest Stuart Turton's article about what future Mozilla should give itself. In particular, the strong suggestion for a "Mozilla Office" caught my eye.

I could not disagree more with Turton here, I find his article just pure nonsense. And I write that with my editor's implementor hat on, that's why I'm commenting here now.

The problem is not the software, it's not the UI, it's not the platform, it's not the openness. It's the format(s)... Unfortunately, *.doc, *.ppt and friends are over-dominant on the market and the whole world rely on them. Read me well: the whole world rely on them. Yeah, yeah, some apple lovers use *.key :-) If you really think OpenOffice formats are taking over, I recommend a training period in an ashram far away to open your third eye... It's certainly not going change only because a good - even an innovative - HTML-based tool appears on the market. So everything is a question of pivot format: the pivot formats of office software are not web-based and Mozilla has no extra value about it, cannot have any extra value, until HTML+CSS are much more powerful than they are now and really really really interoperable across browsers, or unless Mozilla reaches a monopolistic position on the market... Well...:-) I don't even mention the fact CSS is not made for that unless you use only a profile of CSS, in other terms a restricted set of features, in terms of selectors.

On another hand, Mozilla can bring a lot to the mobile world. The mobile browser world is the most static one: no extensions, almost only core changes but rarely UI changes, minimalistic UI and set of features. Bleh ! Mozilla can shake that, for the greatest benefit of all.

Last but not least, last time I checked, the Mozilla Manifesto was about an open Internet. Not about text editors.

So yes, the world needs a good alternative to MS Office. Yes, the world definitely needs an alternative to *.doc and other Office formats. No, Mozilla is not, in my strictly personal opinion, a good candidate for that Holy Quest.

Nota bene: this has an interesting corollary... If the web becomes something really fully interoperable, ie if markup and CSS become so well interoperably implemented that for instance a web page rendered/printed by a browser is pixel-precisely similar to the same page rendered/printed by any other browser, then YES an open and standards web-based alternative to Microsoft Office becomes possible. Conclusion: to save Microsoft Office, one of Redmond's money-spinners, the web must not be fully interoperable. Oh 95% is ok, as soon as the 5 last percents remain a pain in the ass for people trying to switch from proprietary formats to open web-based formats. I just opened a little bit the curtains, do you see well the landscape behind them?

Tuesday 5 October 2010

3-fingers gestures in Minefield, Mac OS X

On Mac OS X, three-fingers gestures (top-to-bottom or bottom-to-top) used to scroll to the bottom or top of the document. I am really used to it and find it much more important to my daily browsing life than the new settings, showing or hiding Panorama. I restored the previous settings with the following:

  • set browser.gesture.swipe.down preference to cmd_scrollBottom
  • set browser.gesture.swipe.up preference to cmd_scrollTop

Friday 1 October 2010

BlueGriffon: Open World Forum Innovation Award!

I am delighted and proud to let you know that BlueGriffon was today the top winner of the Open World Forum Innovation Awards!

help needed about inDOMUtils and dynamic pseudo-classes

Nevermind...

Wednesday 29 September 2010

Why is getElementsByTagName() faster that querySelectorAll()?

I read with great interest Nicholas C. Zakas's article about the speed difference between getElementsByTagName() and querySelectorAll(). Since he tested this with Gecko, let me give more details here.

Nicholas is only partly right in his article. The fact querySelectorAll() deals with the full power of selectors does matter a lot here. When a call to that method is made, Firefox does the following:

  1. parse the selector into a nsCSSSelectorList ; I'm sure you will easily agree that is more expensive than just dealing with one single token representing one single element name or a "*" in getElementsByTagName()..
  2. match that nsCSSSelectorList against the document tree ; since a selector in the selectorList can contain any type of simple selector, combinator, pseudo, that requires more testing on the selectorList

So could selectorMatches() be optimized to avoid testing classes, attribute selectors and the whole set of CSS selectors using a RuleProcessor if the queried selector is restricted to let's say one single type element name or one ID? Probably not worth the extra bit. But querySelectorAll() could default to a static clone of the results of getElementsByTagName() or getElementById() or even getElementsByClass() or whatever in case of such a single simple selector allowing a DOM Level 1 equivalent for the call. That would require some rather easy tests in nsGenericElement::doQuerySelectorAll to check if selectorList is "atomic" or not.

That said, the results of getElementsByTagName() are also cached. The second call to it is much faster than the first one, something you can hardly do with querySelectorAll() and the diversity of its arguments...

All in all, querySelectorAll() is slower mostly because it does much much much more than getElementsByTagName() and it does it very differently. Well, it *has* to do it very differently. Perhaps the optimization suggested above is a good thing...

Monday 20 September 2010

Tantek onboard

Just saw Tantek Çelik appear on planet.mozilla.org. Just saw also the announcement on Planet Mozilla Blog and it made me react immediately because Tantek's introduction there is not enough.

Tantek is not just yet another contractor with a good standards background. Tantek is the man behind one of the most superb browsers of its time: Internet Explorer for Mac, with first-class CSS support. He is also a loooong-time influential member of the CSS Working Group (if I recall correctly, Tantek joined the CSS WG in 1998) and contributed directly to many of our specs. If two or three names have to be attached to Microformats, Tantek's is one of them. It's a side note but he's also an old and good friend of mine I have immense respect for. Tantek is a guru, a real one, and Planet Mozilla Blog's announcement did not reflect it.

Seeing Tantek become a mozillian is an old dream. I think I mentioned it during a dinner in his flat when he decided to leave Microsoft. But Tantek joined Technorati instead. So welcome Tantek !

Oh, and his last name starts with a Ç (&Ccedil;), don't write it C :-)

Monday 6 September 2010

TwitFactory, Twitter, OAuth and FOSS

TwitFactory, my twitter client based on xulrunner, is not far from the attic. Given the recent authentication change in Twitter and the obligation to use now OAuth, I don't see how I could keep the application based on easily readable JavaScript AND preserve the security of an associated OAuth key. Even if TwitFactory is not Open Source, all Open Source applications share the same concern. How can we write Open Source software if a key inside the code is readable, copyable, abusable?

Even if TwitFactory could use a binary component containing an encrypted key, fully free or open source software cannot do that.

On the same topic, I do recommend reading a 3-pages excellent article by Ryan Paul on Ars Technica.

Sunday 5 September 2010

Flash can freeze Firefox on Mac

I have no idea how to file that bug in BMO and I'm not even sure it's a BMO bug since it's more probably a Flash plugin bug so let me describe it here:

  • the Firefox 3.6.8 home page recommended me recently to update my Flash plugin on my Mac OS X box (Snow Leopard)
  • so I did...
  • since that day, many web sites showing Flash-based videos freeze making the browser totally unusable with CPU usage > 95%. A good example is http://lci.tf1.fr/
  • I originally thought a bad interaction between Flash and AdBlockPlus was guilty but I removed ABP and the problem is still here ; the Flash plugin is almost certainly guilty here

The new Flash plugin was probably pushed to users for security reasons. But for UX reasons, it's probably better to stop pushing it until this problem is gone...

Friday 3 September 2010

Editor and CSS 3 Backgrounds

In the editor (Mozilla Composer, Nvu, KompoZer), there is a dialog for image insertion. That dialog shows a preview of the currently selected image. That preview relies on the following code:

  1. load the image inside an <html:img> element
  2. wait until it's loaded
  3. get its natural width and height
  4. resize the image to make it fit nicely in its container box, whatever the width and height of the image
With the help of CSS 3 Backgrounds, this code is gone and all we have now is:
  1. load the image as the background image of <xul:box> element

with the following CSS styles on that box:

background-size: contain;
background-repeat: no-repeat;
background-position: center;

:-)

Tuesday 31 August 2010

Wysiwyg editing is hard #2, let's apply a larger font size

Let's say the user wants to use a larger font size on the LAST paragraph in the following example:

<style>
#section p { font-size: larger ! important}
.warning { color: red; border: thin solid red }
</style>
<div id="section">
<p>This is NOT a warning</p>
<p class="warning">This is a warning</p>
</div>

We're in a Wysiwyg environment, the user got the document from an unkown source, places the caret in the paragraph or selects the whole paragraph, click on some UI thingy meaning "I want a larger font" and he/she expects a larger font size for the paragraph, whatever has the editing tool to do for that... The user has no knowledge of the underlying technology - in our case CSS - and he/she's the perfect target for Wysiwyg editors. Let's suppose the editing tool manipulates stylesheets and hates HTML attributes and inline styles, and that's also our goal.

First thought and first problem, we cannot apply font-size: larger to the paragraph since it's already applied... But, wait, how do you know it's already applied? Just looking at the computed value of font-size, you can't since that will reply only an absolute value like 18px! So to determine if and how you can tweak a given property on a given element, you first need to browse all the CSS rules applying to your element. In Gecko, you can use the inIDOMUtils DOM Inspector interface and namely its getCSSStyleRules() method. Then for each rule applying to the element, you need to check if the property is applied to the element through that rule and if it is, compute the specificity of the selector and preserve the rule, the specificity of the rule and the priority (think !important) of the declaration in an array. When that's done for all rules, sort the array according to the CSS Cascade rules... Yep, that's right, you read it well, you need to recascade yourself the whole thing because the CSS Object Model has no getCascadedValue() method for the time being. Oh and of course, nothing either to compute the specificity of a given selector...

Once you have the cascaded the whole thing, you have the rule applying the current font-size to the element, its specificity and the priority of the declaration. Of course, there is a trivial case where no rule applies to the element for that property and your final data set is empty. 

Then the editing tool has no choice, it must create a rule with a specificity greater than or equal to the specificity of the rule we found and caring about the priority of the declaration...

  • If the data set above is empty or if the rule's specificity is equal to or less than the specificity of a class selector, AND IF the user says through some UI dialog we can safely apply the change to all <p class="warning">, then we can create a .warning { font-size: ...px } or .warning { font-size: ...px !important } rule at the end of our stylesheet where ... is a font-size value greater than the computed value of font-size on the element. Hey, yeah, you have to compute that value yourself again :-( We won't deal with the p.warning possibility because it's just impossible to show an average user a dialog asking for permission to change the styles applied to all paragraph of class warning and not other elements...
  • Else if the rule's specificity is equal to or less than the specificity of an #ID selector, we can safely insert a #myNewId { font-size: ...px }  or #myNewId { font-size: ...px ! important } at the end of our stylesheet but please note the editing tool has to query the user for an ID or select a random - and unreadable - one by itself. Of course, the font-size computation issue detailed just above still applies here.
  • Else if the rule's specificity is equal to or less than the specificity of an #ID selector and a type element selector, we can safely insert a p#myNewId { font-size: ...px } or p#myNewId { font-size: ...px ! important } at the end of our stylesheet. And the font-size computation and the ID UI query issues still apply here.
  • Else we have the most complex case: we need to prompt the user for an ID or find a random one and derive a rule from the selector of the rule we found above adding an ID simple selector to the last chain of simple selectors in the selector. In other terms in our case here, create #section p#myNewId { font-size: larger ! important} from #section p { font-size: larger ! important}.

Woof. Of course, the CSS Object Model's minimalistic interfaces don't help a lot here and the editing tool's author will end up writing a lot of code that is already implemented in the rendering engine, but not exposed. Welcome to my world :-)

Saturday 28 August 2010

Floating panels question

Now we have floating panels in Gecko, I hit a small issue : if two floating panels are visible on screen AND overlap, how do you raise the deepest in z-order??? There seems to be no method to raise a panel above the others. focus() does not help, moving the panel in its parent's child list hides the panel, I found no method for that in the interfaces. The only workaround I found is to hide and show again the panel but that introduces a bad flickering. Help !

- page 3 of 36 -