Re: [whatwg] URL: file: URLs

2012-10-28 Thread Boris Zbarsky

On 10/27/12 3:35 PM, Anne van Kesteren wrote:

This is covered as we do this for all URLs currently with a relative
scheme (http/ws/...). I know you indicated this as potentially
problematic


Let's have that fight separately.  ;)


2)  file:// URIs are parsed as a no authority URL in Gecko.  Quoting the
IDL comment:

...

The parser in the specification should handle these in the same way.


Same as the comment I quoted?  As same as something else?


I have not introduced a no authority concept however. The parser in
the specification also preserves the host as other user agents seem to
preserve it.


Well, the Gecko parser preserves the host at this stage assuming the URI 
was correctly formatted with a host.  Again:


  blah://foo/bar = blah://foo/bar

The interesting things happen when you have 0, 1, or 3 slashes between 
':' and foo.  The handling of foo after this point is a separate issue.



4)  For no authority URLs, including file://, on Windows and OS/2 only, if
what looks like authority section looks like a drive letter, it's treated as
part of the path.  For example, file://c:/ is treated as the filename
c:\.  Looks like a drive letter is defined as ASCII letter (any case),
followed by a ':' or '|' and then followed by end of string or '/' or '\\'.
I'm not sure why this is checking for '\\' again, honestly.  ;)


Is this part of URL parsing or part of doing something with the
resulting URL?


In Gecko, it's part of URL parsing.  More precisely, it's part of the 
normalization performed as part of constructing a URL object from a 
string.  Since this is also how we parse URLs, it's effectively all part 
of the package.


But note that it would be a bit odd of file://c:/ claimed to have a host 
of c with a default port or some such...



5)  When parsing a no authority URL (including file://), and when item 4
above does not apply, it looks like Gecko skips everything after file://
up until the next '/', '?', or '#' char before parsing path stuff.


So the host is dropped?


In Gecko, I believe so, yes.  I'm not saying this is desirable; just 
what Gecko does.



6)  On Windows and OS/2, when dynamically parsing a path for a no
authority URL (not sure whether this is actually web-exposed, fwiw...)
Gecko will do something involving looking for a path that's only an ASCII
letter followed by ':' or '|' followed by end of string.

...

7)  When doing URI equality comparisons

...

8)  When actually resolving a file:// URL

These points do not seem to be about parsing, correct?


Well, point 6 is about parsing, sort of.

7 and 8 are not, though at some point we'll need to define equality 
comparisons anyway.


-Boris




[whatwg] [wiki] The WHATWG Wiki has been upgraded

2012-10-28 Thread Gordon P. Hemsley
For those who missed the announcement on IRC and Twitter last week:

The WHATWG Wiki has been upgraded to MediaWiki 1.19.2:

http://wiki.whatwg.org/

This update brings with it a lot of the changes you're probably
already used to from Wikipedia, including the new Vector theme.

Over the many years since the WHATWG Wiki was first set up, a lot of
cruft has accumulated in its configuration files. I have attempted to
remove a lot of that, in order to allow the modern default values to
come through. I don't if this will have much effect on the everyday
use of the wiki, but I thought I'd let you know.

In addition to the primary software update, I have also installed a
number of extensions, and these will have an effect on your use of the
wiki.

There are three extensions that I want to bring your attention to specifically.

The first one is ParserFunctions, which allows you to use some logical
functions in pages to (for example) create conditional output. This is
most useful, IMO, in templates, so you can condition the display of
the template based on the presence, absence, or value of template
parameters. See [[Template:Obsolete]] for an example:

http://wiki.whatwg.org/wiki/Template:Obsolete

The second extension I want to bring your attention to is
SyntaxHighlight. This allows you to use the syntaxhighlight element
in a wiki page to automatically highlight whatever source code you
include. Given who we are, I've set it up to assume the language you
are highlighting is 'html5', but you can also specify another language
using the 'lang' attribute. (Note: This is not the same 'lang'
attribute that you would normally find in HTML. It's looking for a
programming language, not a BCP47 language tag.)

And the third, and potentially the most useful, extension is Gadgets.
This extension allows any administrator to install JavaScript and CSS
gadgets directly onto the wiki, for use by all. I've installed a
subset of the gadgets installed on Wikipedia which I think are the
most useful. I've also turned many of them on by default; you can see
full list of available gadgets (and edit your personal gadget
availability) by going to My preferences  Gadgets.

To see the full list of installed extensions, go to [[Special:Version]]:

http://wiki.whatwg.org/wiki/Special:Version

If you know of any useful extensions or gadgets that you think are
missing from the WHATWG Wiki, let me know and I'll be happy to install
them. And, as I am now the caretaker of the wiki (taking over, I
believe, from AryehGregor), let me know about any other wiki issues
you might have.

By the way, I think the wiki is a particularly useful place to store
information that might otherwise get lost in the shuffle of IRC logs
and e-mail archives, so if you have any such tidbits, head over to the
wiki and write them down!

If you don't yet have a wiki account, you'll have to ask someone for
help, as we've had some issues with spam accounts. But don't worry,
it's very simple to get help, as I've set it up so that any
autoconfirmed user can register an account. All they need is your
e-mail address and your desired username. If you just let out a cry on
IRC, someone should be able to help you, or you can contact one of the
permanent autoconfirmed users listed here:

http://wiki.whatwg.org/index.php?title=Special:ListUsersgroup=autoconfirmed

Happy wikiing!

Gordon

P.S. If you think you should be a permanent autoconfirmed member (and
you're not), ping me on IRC or drop me a line off-list and I'll see
what I can do. ;)

-- 
Gordon P. Hemsley
m...@gphemsley.org
http://gphemsley.org/ • http://gphemsley.org/blog/