Page 2 of 3

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 2:55 pm
by Jim Too
Is Firefox 3.0.x still correct for the title of this thread? The reports (including the OP's) seem to indicate that this is a 2.0 issue.

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 3:11 pm
by therube
Giorgio wrote:so it must be a subtler Gecko < 1.9.1 bug
So yes, FF2 & FF3.

FF3=Gecko 1.9.0
FF2=Gecko 1.8.1

(FF3.5=Gecko 1.9.1)

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 5:03 pm
by Guest
I'm using Firefox 3.0.17 on Linux + NoScript 1.9.9.36 and having same problem with fonts. I used Firebug to investigate and found that FF uses additional stylesheet (resource://gre/res/quirk.css) on those pages (FF reports that pages are in standard compliance mode). I think, NoScript somehow forces FF to switch to quirks mode on page load and then back to standard compliance mode, but FF "forgets" to detach quirk.css.

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 5:47 pm
by Giorgio Maone
Guest wrote:I'm using Firefox 3.0.17 on Linux + NoScript 1.9.9.36 and having same problem with fonts. I used Firebug to investigate and found that FF uses additional stylesheet (resource://gre/res/quirk.css) on those pages (FF reports that pages are in standard compliance mode). I think, NoScript somehow forces FF to switch to quirks mode on page load and then back to standard compliance mode, but FF "forgets" to detach quirk.css.
Good call, investigating...

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 6:06 pm
by Guest
I've had the exact same problem, with Noscript on Flock's latest release.

At first I thought it was the flock browser, as I checked it against Chrome and IE with no problems. Then I remembered that there had been some updates this morning to a couple of extentions. Sure enough by process of elimination its No Script. Its odd because it only affects some sites. Before today it was fine.

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 7:43 pm
by SVlad
Have same problem with css font at 3.0.17 and .36 all was ok at .35 :(
Guys could you test your extantion on 3.0.x before make it public?
Where to get old version?
Thanks

Re: Enlarged Fonts on Firefox 3.0.x and below, NoScript 1.9.9.36

Posted: Tue Jan 19, 2010 8:11 pm
by Giorgio Maone
SVlad wrote:Guys could you test your extantion on 3.0.x before make it public?
We do. This issue happens on some sites only, and we can't test every site in every browser, you know.
SVlad wrote: Where to get old version?
Here and here in this thread.

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Tue Jan 19, 2010 11:15 pm
by Power
Some more info in case someone needs it. (Previous post was by me, but unregistered.)
  • Setting noscript.surrogate.enabled to false indeed fixes the problem (as a workaround, of course).
  • You can view the contents of resource://gre/res/quirk.css file by copy-pasting the URI to address bar and hitting Enter. That file is a browser stylesheet, obviously designed to be used in quirks mode only.
  • quirk.css affects many things. One of them is font size in <table> HTML elements: it resets font size and some other font props to browser default values (otherwise these values are inherited from parent HTML element), that's why we see larger/smaller fonts on some sites. Another thing is sizing model in <input> elements, it causes some text fields to reduce size.
  • How can I see that quirk.css is applied to the page? Navigate to affected page and select some <input> or <table> element in Firebug (or in DOM Inspector). Switch to CSS of the element (in Firebug you'll have to check "Show User Agent CSS").
  • I also have Stylish 1.0.7 addon installed. If I toggle (enable/disable) some style for page after page is loaded, all font sizes etc. return to normal. If I then reload the page, problem reappears. That makes me think that: 1) FF is in standard compliance mode after page is loaded; 2) Stylish triggers some sort of re-rendering the page, during which FF realizes that it doesn't need the quirk.css stylesheet in standard compliance mode.

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 12:45 am
by orion
breaks webpages on routers also,
seems to affekt poorly coded webpages were ' is missed in java scripts.
there is a need of string cleanup or something, my guess ;)
divide by zero
were stars come out at night

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 1:03 am
by Giorgio Maone
Should be finally fixed in latest development build 1.9.3.39, needed two different approaches in Gecko 1.8.x (Fx2) and Gecko 1.9.0 (Fx 3.0) :P

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 1:52 am
by Guest
Giorgio Maone wrote:Should be finally fixed in latest development build 1.9.3.39, needed two different approaches in Gecko 1.8.x (Fx2) and Gecko 1.9.0 (Fx 3.0) :P
That fixed it! Thanks.

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 2:01 am
by Power
Giorgio Maone wrote:Should be finally fixed in latest development build 1.9.3.39, needed two different approaches in Gecko 1.8.x (Fx2) and Gecko 1.9.0 (Fx 3.0) :P
Yes, seems working.
But have you any idea why script surrogates affected page styles?

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 8:28 am
by Giorgio Maone
Power wrote:But have you any idea why script surrogates affected page styles?
Starting with Gecko 1.9.0, javascript: URIs are loaded asynchronously.
Therefore using the old location.href="javascript:x()" to inject content Javascript safely in a web page doesn't serve the purpose anymore for page-level surrogates, which need to run synchronously before the page content starts to be parsed.

Using Components.utils.Sandbox doesn't work either, because it wraps the DOM, thus preventing tricks like method or getter substitution which are used routinely by most surrogates.

So I had to find an alternate injection method, and came up with insertion and automatic deletion of <script> DOM nodes.
But as soon as I reference document.documentElement (needed as an anchor node), Gecko creates a temporary minimal DOM: in Gecko < 1.9.1, this sets the "quirks mode" flag (because there's no DOCTYPE at that time), and it's never reset when a DOCTYPE is actually found, later. In Gecko 1.9.1 and above the DOCTYPE gets honored as soon as it's found, no matter what had happened earlier.

Now, working around on Gecko 1.8.x was relatively simple: I just reverted to the old location.href method.
Gecko 1.9.0 was a tougher beast, since as I said this method won't work for page surrogates and I need to stick with DOM insertion.
However your suggestion about Stylish provided with a hackish but effective work-around: just after page surrogates have run, I add and remove an empty AGENT stylesheet, which causes the layout flags to be reset.

Of course, these tricks are unneeded on Gecko 1.9.1 and above, therefore now we've got three code paths for page-level surrogates. Ouch.

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 9:01 am
by Guest
Giorgio Maone wrote:Should be finally fixed in latest development build 1.9.3.39, needed two different approaches in Gecko 1.8.x (Fx2) and Gecko 1.9.0 (Fx 3.0) :P
Yeah, pages are back to normal now. Using Firefox 2.0.0.20 with latest build is okay.

Re: HTML sizes broken on Fx 3.0.x and below, NS 1.9.9.36

Posted: Wed Jan 20, 2010 7:23 pm
by hewee
Thank you for the fix on the fonts.

Your next coffee I will buy.

NoScript v1.9.9.39 fixed it.