Grupos de Google ya no admite publicaciones ni suscripciones nuevas de Usenet. El contenido anterior sigue visible.

Gecko sniffing

0 vistas
Ir al primer mensaje no leído

VK

no leída,
24 nov 2006, 9:40:03 a.m.24/11/2006
para
Hi,

I'm checking the SVG sniffing block in our library. I need to sort out
Firefox 1.5 or higher (SVG as such), then Firefox 2.0 or higher
(TextPath) and in either case check for Windows 98 platform (no SVG
text support). The current block was:

if ((window) && (document.implementation)) {
if ((typeof window.opera == 'object')
&& (parseInt(navigator.appVersion,10) >= 9)) {
SVL.disabled = false;
}
else if ((netscape)
&& (netscape.security)
&& (document.implementation
.hasFeature('org.w3c.dom.svg', '1.0'))) {
SVL.isWin98 = (navigator.userAgent.indexOf('Win98') != -1);
SVL.disabled = false;
}
else {
/*NOP*/
}
}

but it's appeared to be too generic now. Also I'm not clear about
Camino: if I understand properly its SVG engine was not updated so
still corresponds to Firefox 1.5 one? What would be the way to match
Camino SVG engine?

Boris Zbarsky

no leída,
26 nov 2006, 12:29:11 p.m.26/11/2006
para
VK wrote:
> but it's appeared to be too generic now.

Meaning what? If you're really trying to separate out different Gecko versions
from each other, the way to go is to just look at the Gecko version...

> Also I'm not clear about Camino: if I understand properly its SVG engine was not updated so
> still corresponds to Firefox 1.5 one?

Er... with the same Gecko version?

-Boris

VK

no leída,
26 nov 2006, 1:14:31 p.m.26/11/2006
para

Boris Zbarsky wrote:
> If you're really trying to separate out different Gecko versions
> from each other, the way to go is to just look at the Gecko version...

Right: this is what I need (not at all to say I want). But what is the
most reliable way to do it? navigator.appVersion returns something as
unhelpful as "5.0 (Windows; En-US)". I can see the right version in
userAgent string - but before I jump on "ol' good" :-) indexOf and
RegExp I wanted to ask if there is something more elegant for Firefox
version detection: some field in navigator or window? Not to say I
cannot study it myself, but if anyone has an immediate answer...

Also could anyone explain the meaning of hasFeature('org.w3c.dom.svg',
'1.0') ? I do not recall any setting in Firefox like "Disable SVG". At
the same time I remember some popup on the first SVG viewing, something
like "Do you agree to use this software?" or so.If I would click "No"
then would it be hasFeature false on check? Overall I want to
understand if and when say Firefox 1.5 reports
hasFeature('org.w3c.dom.svg', '1.0') as false?

>> Also I'm not clear about Camino: if I understand properly its SVG engine
>> was not updated so still corresponds to Firefox 1.5 one?
>
> Er... with the same Gecko version?

The current Camino version is 1.0.3 AFAICT it didn't change with
Firefox 2.0 release. Does it mean that the current Camino release is
still bearing the SVG engine equivalent to the one on Firefox 1.5 (w/o
TextPath)? Is there a way to reliably detect both Firefox 1.5 and
Camino 1.0.x in one check?

Boris Zbarsky

no leída,
26 nov 2006, 1:45:54 p.m.26/11/2006
para
VK wrote:
> Right: this is what I need (not at all to say I want). But what is the
> most reliable way to do it?

Looking at navigator.userAgent is the only way at the moment... File a bug for
a better way?

> Also could anyone explain the meaning of hasFeature('org.w3c.dom.svg',
> '1.0') ?

It tests that all the following are true:

1) --enable-svg was used when compiling Gecko
2) There is an SVG renderer available (used to be a problem before
we started using cairo for SVG across the board; not an issue
with Firefox 2.0).
3) The "svg.enabled" preference is set to true.

> I do not recall any setting in Firefox like "Disable SVG".

It's not exposed in the UI, but it's there.

> The current Camino version is 1.0.3 AFAICT it didn't change with
> Firefox 2.0 release. Does it mean that the current Camino release is
> still bearing the SVG engine equivalent to the one on Firefox 1.5 (w/o
> TextPath)?

No idea. Again, you need to look at the Gecko version, not the browser UI version.

> Is there a way to reliably detect both Firefox 1.5 and
> Camino 1.0.x in one check?

Yes, look at the Gecko version.

-Boris

VK

no leída,
26 nov 2006, 2:23:28 p.m.26/11/2006
para

Boris Zbarsky wrote:
> Looking at navigator.userAgent is the only way at the moment... File a bug for
> a better way?

I very well will as soon as I have a bit more time: "5.0" in appVersion
is meaningless: unless it was intended to say that Firefox is the "lost
tribe of Israel" :-) where Netscape 4 was followed by Netscape 6 right
away and it came to the sorry state of AOL-Netscape 8.x - so Firefox
takes from the point of the wrong choice. In this case it is highly
symbolic but anyone would prefer something more technically useful :-)

> > Also could anyone explain the meaning of hasFeature('org.w3c.dom.svg',
> > '1.0') ?
>
> It tests that all the following are true:
>
> 1) --enable-svg was used when compiling Gecko
> 2) There is an SVG renderer available (used to be a problem before
> we started using cairo for SVG across the board; not an issue
> with Firefox 2.0).
> 3) The "svg.enabled" preference is set to true.

So was it my imagination or there was a confirmation popup on the very
first SVG rendering? I'd like to avoid a reinstall just to check it, so
if you could confirm if any "activation dialog" is built into Firefox
Cairo?

> > The current Camino version is 1.0.3 AFAICT it didn't change with
> > Firefox 2.0 release. Does it mean that the current Camino release is
> > still bearing the SVG engine equivalent to the one on Firefox 1.5 (w/o
> > TextPath)?
>
> No idea. Again, you need to look at the Gecko version, not the browser UI version.

If I go by checking "Firefox/x.x" string in userAgent then it doesn't
help for Camino because obviously it doesn't report itself as Firefox.
If I go by the build vector, then say Firefox 1.5.0.8 reports it (in
userAgent) as "rv:1.8.0.8"
In such case I need a reliable build/version mapping to say know that
1.8.0.8 matches Firefox 1.5.0.8 and say x.y.z matches Camino 1.0.3 Do
you know where could I get such table?

Boris Zbarsky

no leída,
26 nov 2006, 2:50:51 p.m.26/11/2006
para
VK wrote:
> I very well will as soon as I have a bit more time: "5.0" in appVersion
> is meaningless

Yes. Sadly, given existing browser-sniffing out there it just needs to be a
number > 4...

> So was it my imagination or there was a confirmation popup on the very
> first SVG rendering?

There shouldn't have been, as far as I know. The preference defaults to
"enabled" but is there in case SVG needs to be disabled in a hurry for security
reasons.

> If I go by checking "Firefox/x.x" string in userAgent then it doesn't
> help for Camino because obviously it doesn't report itself as Firefox.
> If I go by the build vector, then say Firefox 1.5.0.8 reports it (in
> userAgent) as "rv:1.8.0.8"

Right. You want the "rv:...." part.

> In such case I need a reliable build/version mapping to say know that
> 1.8.0.8 matches Firefox 1.5.0.8 and say x.y.z matches Camino 1.0.3 Do
> you know where could I get such table?

Why do you need that? You just need a mapping from the "rv:.." part to an
indication of whether that version does the SVG things you need, no?

-Boris

VK

no leída,
26 nov 2006, 3:04:17 p.m.26/11/2006
para
> > I very well will as soon as I have a bit more time: "5.0" in appVersion
> > is meaningless
>
> Yes. Sadly, given existing browser-sniffing out there it just needs to be a
> number > 4...

Oh... It should dong on me earlier. No use to file anything then... so
shall it be a feature, not a bug...

> > So was it my imagination or there was a confirmation popup on the very
> > first SVG rendering?
>
> There shouldn't have been, as far as I know. The preference defaults to
> "enabled" but is there in case SVG needs to be disabled in a hurry for security
> reasons.

Thanks. I still better check on all fresh installations of 1.5 and 2.0
official releases (1.5 is still fully relevant at least till April). It
is important to know for sure for the "first contact" page.

> You just need a mapping from the "rv:.." part to an
> indication of whether that version does the SVG things you need, no?

Roughly right... I need (by studying the "rv" part) to tell for sure
that:
1) it is Firefox 1.5.0 or higher
2) it is Firefox 2.0.0 or higher
3) it is Camino 1.0.0 - 1.0.3
No other Gecko builds are of our current interest and Netscape 8.x is
covered by the VML part of the library.

So what exact mapping rv / "box version" would it be? Is there a table
to look at?

Boris Zbarsky

no leída,
26 nov 2006, 3:44:42 p.m.26/11/2006
para
VK wrote:
> Roughly right... I need (by studying the "rv" part) to tell for sure
> that:
> 1) it is Firefox 1.5.0 or higher
> 2) it is Firefox 2.0.0 or higher
> 3) it is Camino 1.0.0 - 1.0.3

Why? That is, why do you not care about the _application_ version as opposed to
the renderer version?

> So what exact mapping rv / "box version" would it be? Is there a table
> to look at?

Firefox 1.5.x uses Gecko 1.8.0.x (same x).
Firefox 2.0.x uses Gecko 1.8.1.x (same x).

Not sure what Camino uses, but you shouldn't care either -- just look at the
Gecko versions and see which ones support what you need, then sniff for those
versions.

See also http://www.geckoisgecko.org/

-Boris

VK

no leída,
26 nov 2006, 4:20:04 p.m.26/11/2006
para

Boris Zbarsky wrote:
> Why? That is, why do you not care about the _application_ version as opposed to
> the renderer version?

Because - by re-phrasing the slogan of the site you pointed to - "Gecko
is Gecko, Firefox 1.5 is Firefox 1.5, Firefox 2.0 is Firefox 2.0,
Camino is Camino, Mozilla suite is Mozilla suite and Netscape 8 in
"Gecko mode" is also all different beast". While for mid-basic
manipulations it is possible to presume WORA, for things like SVG it is
still unavailable luxiry - at least for robust solutions.

> > So what exact mapping rv / "box version" would it be? Is there a table
> > to look at?
>
> Firefox 1.5.x uses Gecko 1.8.0.x (same x).
> Firefox 2.0.x uses Gecko 1.8.1.x (same x).

That is a very helpful info, thank you.

> Not sure what Camino uses, but you shouldn't care either -- just look at the
> Gecko versions and see which ones support what you need, then sniff for those
> versions.

What would be possible if I had a blood written commitment that Camino
1.x Cairo does exactly the same things in exactly the same way as
Firefox 1.5 does. :-) :-|
Full disclosure: I'm getting no more pleasure of using
userAgent.indexOf then you are of explaining how to do it (thus the
mutual pleasure close to zero or below it). From the other side who's
the environment creators and who's only acting upon? Some shiny day I
believe it will be a fully implemented SVG engine equally acting among
all SVG-supporting UA's and all users will update to these versions.
Then it will be only two stable environment to deal with (SVG and VML)
and the happy times will come. Until then indexOf.

Thank you for all your help. After I check the presence/absence of
"activation dialog" on the first Cairo use I'll post it here.

Boris Zbarsky

no leída,
26 nov 2006, 5:14:17 p.m.26/11/2006
para
VK wrote:
> Because - by re-phrasing the slogan of the site you pointed to - "Gecko
> is Gecko, Firefox 1.5 is Firefox 1.5, Firefox 2.0 is Firefox 2.0,
> Camino is Camino, Mozilla suite is Mozilla suite and Netscape 8 in
> "Gecko mode" is also all different beast"

They shouldn't be if they have matching Gecko versions. Do you have evidence
that they are where SVG is concerned? If they do differ, we have a major problem.

-Boris

VK

no leída,
26 nov 2006, 6:21:33 p.m.26/11/2006
para

Fx 1.5 has no TextPath, Fx 2.0 does; both "silently break" on text
output but only on Windows 98. Netscape 8 in "Gecko mode" doesn't have
SVG but it supports VML over IE module. That's for starter.

But why is it a problem? I mean it is a technical problem to overcome,
but not something to close the project or to put the team on a
sleepless debugging night :-) That is normal that a specific program
release has specific problem on specific platform in a specific
environment of other software. Usually nothing really crucial - yet you
have to see it in all aspect before to stamp "tested". I mean did you
see many CD's with label "Should work on any Windows 32-bit platform"?
And if you see would you expect to buy it? Same way I cannot put the
name under something like "Should work on any Gecko platform".
Definitely it will be mentioned in the manual, but on the "stamp" it
will be "Tested for Firefox 1.5.x, 2.0.x, Opera 9.0.x, Internet
Explorer 6.0, 7.0, ..." Tested - not "should work". If I did not see it
stable working in some environment I better break the execution right
away rather than relay on luck. You should agree with such position
because Firefox either was not announced compatible with MacOS 10.2
until a very particular drop-down menu issue was identified and fixed.
You too rather prefer to say "non compatible" rather than let the
application crash even one time out of hundred.

The library will be *seen* working under Fx 1.5, Fx 2.0, Camino 1.0.3 -
with different OS and OS versions atop it is the max coverage for Gecko
family we can provide right now. What I didn't see in full - I don't
want to promise to anyone.

Because of Cairo fixes and extensions between Fx 1.5 and Fx 2.0 I want
to know exactly that it is Fx 1.5, Fx 2.0 or Camino 1.0.3
Not a Mozilla Suite, not a nightly build, nor a release candidate: only
the above ones from getfirefox.com and caminobrowser.org

Thanks to your help I have nearly all needed info by now.

Boris Zbarsky

no leída,
26 nov 2006, 6:32:59 p.m.26/11/2006
para
VK wrote:
> Fx 1.5 has no TextPath, Fx 2.0 does

They have different Gecko versions.

> both "silently break" on text output but only on Windows 98.

Right.

> Netscape 8 in "Gecko mode" doesn't have SVG but it supports VML over IE module.

That can be tested for by testing for the SVG feature, as you already do.

> The library will be *seen* working under Fx 1.5, Fx 2.0, Camino 1.0.3 -
> with different OS and OS versions atop it is the max coverage for Gecko
> family we can provide right now. What I didn't see in full - I don't
> want to promise to anyone.

My point was that no matter what you tell your customers your code will be
capable of working with a lot more than just those, if done right, even if you
don't get the chance to test. I'm not saying you should promise more than you
can deliver; I'm saying you can easily deliver more than the promise.

> Because of Cairo fixes and extensions between Fx 1.5 and Fx 2.0 I want
> to know exactly that it is Fx 1.5, Fx 2.0 or Camino 1.0.3

This information will be uniquely determined by the Gecko version number.

-Boris

0 mensajes nuevos