From cam at mcc.id.au Sat Feb 1 17:15:01 2014
From: cam at mcc.id.au (Cameron McCormack)
Date: Sat, 01 Feb 2014 17:15:01 -0800
Subject: [whatwg] Document.activeElement should return the root element in
non-HTML documents when no element has focus
Message-ID: <52ED9C15.10903@mcc.id.au>
Document.activeElement is currently defined to return the
element
if there is not element with focus, or null if there's no
element. I think it needs to return the root element when the document
isn't an HTML document (like an SVG document).
From cam at mcc.id.au Sat Feb 1 21:01:14 2014
From: cam at mcc.id.au (Cameron McCormack)
Date: Sat, 01 Feb 2014 21:01:14 -0800
Subject: [whatwg] Document.title for SVG documents
Message-ID: <52EDD11A.5030606@mcc.id.au>
Currently, HTML defines Document.title on SVG documents to defer to
whatever the SVG specification defines for SVGDocument.title. The
SVGDocument interface has gone away, so this will need to be updated.
From some basic testing, it looks like SVG needs the same behaviour as
HTML -- first element in the document, plus the white space
collapsing behaviour.
Do you want to just handle that all in HTML? I'm not sure there's much
value to duplicating either the searching for the title element or the
white space collapsing behaviour in SVG itself.
From cam at mcc.id.au Sat Feb 1 21:28:48 2014
From: cam at mcc.id.au (Cameron McCormack)
Date: Sat, 01 Feb 2014 21:28:48 -0800
Subject: [whatwg] Document.title for SVG documents
In-Reply-To: <52EDD11A.5030606@mcc.id.au>
References: <52EDD11A.5030606@mcc.id.au>
Message-ID: <52EDD790.7080303@mcc.id.au>
On 1/02/2014 9:01 pm, Cameron McCormack wrote:
> Do you want to just handle that all in HTML? I'm not sure there's much
> value to duplicating either the searching for the title element or the
> white space collapsing behaviour in SVG itself.
Oh, and for the setter, it looks like implementations don't do anything
when assigning to document.title in SVG documents. (Chrome does
something funny where it remembers what you assign to document.title,
but it doesn't affect what's in the element.)
I don't have a strong opinion on whether we should make the setter do
something useful or nothing at all. If we do, any newly created
element should be appended to the document element.
From dschulze at adobe.com Sat Feb 1 22:01:50 2014
From: dschulze at adobe.com (Dirk Schulze)
Date: Sun, 2 Feb 2014 06:01:50 +0000
Subject: [whatwg] Document.title for SVG documents
In-Reply-To: <52EDD11A.5030606@mcc.id.au>
References: <52EDD11A.5030606@mcc.id.au>
Message-ID: <3630DA86-381D-4907-A93F-080EED3A6C02@adobe.com>
> On Feb 1, 2014, at 9:03 PM, "Cameron McCormack" wrote:
>
> Currently, HTML defines Document.title on SVG documents to defer to whatever the SVG specification defines for SVGDocument.title. The SVGDocument interface has gone away, so this will need to be updated. From some basic testing, it looks like SVG needs the same behaviour as HTML -- first element in the document, plus the white space collapsing behaviour.
Could you be more specific about that? It is not just the first title element in the document, but the first direct child of the element root. A title nested in a group or graphical element has a different meaning and shall not be used as title. If there is a nested title element but no direct title child of the SVG root, then the document has no title. This distinction is important for accessibility.
>
> Do you want to just handle that all in HTML? I'm not sure there's much value to duplicating either the searching for the title element or the white space collapsing behaviour in SVG itself.
From cam at mcc.id.au Sat Feb 1 22:04:29 2014
From: cam at mcc.id.au (Cameron McCormack)
Date: Sat, 01 Feb 2014 22:04:29 -0800
Subject: [whatwg] Document.title for SVG documents
In-Reply-To: <3630DA86-381D-4907-A93F-080EED3A6C02@adobe.com>
References: <52EDD11A.5030606@mcc.id.au>
<3630DA86-381D-4907-A93F-080EED3A6C02@adobe.com>
Message-ID: <52EDDFED.3000307@mcc.id.au>
On 1/02/2014 10:01 pm, Dirk Schulze wrote:
> Could you be more specific about that? It is not just the first title
> element in the document, but the first direct child of the element
> root.
That is what the spec says but that is not what implementations do.
> A title nested in a group or graphical element has a different
> meaning and shall not be used as title. If there is a nested title
> element but no direct title child of the SVG root, then the document
> has no title. This distinction is important for accessibility.
Sure. I'd be happy with keeping the special SVG behaviour here too.
Ian, if you still would prefer a hook in the SVG spec for you to refer
to, rather than including this behaviour -- first child of the
document element -- then I can define for example "SVG title element"
that represents that element.
From cam at mcc.id.au Sat Feb 1 22:22:25 2014
From: cam at mcc.id.au (Cameron McCormack)
Date: Sat, 01 Feb 2014 22:22:25 -0800
Subject: [whatwg] Should onfoo event handler properties be on Element or
HTMLElement?
In-Reply-To: <52E04FB8.5040604@mit.edu>
References: <52544D14.8030905@mit.edu>
<52E04FB8.5040604@mit.edu>
Message-ID: <52EDE421.8050707@mcc.id.au>
On 22/01/2014 3:09 pm, Boris Zbarsky wrote:
> Or neither, if desired. In Gecko we don't expose the SVG* properties in
> IDL at all...
We decided against requesting adding an onzoom attribute to
GlobalEventHandlers to avoid any complications with whatever solution
comes out of the CSSWG who are looking into new zoom related
functionality (which possibly could come out with an event named "zoom",
which then might be incompatible with SVGZoom).
From annevk at annevk.nl Sun Feb 2 05:09:45 2014
From: annevk at annevk.nl (Anne van Kesteren)
Date: Sun, 2 Feb 2014 13:09:45 +0000
Subject: [whatwg] Document.activeElement should return the root element
in non-HTML documents when no element has focus
In-Reply-To: <52ED9C15.10903@mcc.id.au>
References: <52ED9C15.10903@mcc.id.au>
Message-ID:
On Sun, Feb 2, 2014 at 1:15 AM, Cameron McCormack wrote:
> Document.activeElement is currently defined to return the element if
> there is not element with focus, or null if there's no element. I
> think it needs to return the root element when the document isn't an HTML
> document (like an SVG document).
You mean when there's no element?
--
http://annevankesteren.nl/
From jonas at sicking.cc Sun Feb 2 14:37:39 2014
From: jonas at sicking.cc (Jonas Sicking)
Date: Sun, 2 Feb 2014 14:37:39 -0800
Subject: [whatwg] IE10 inconsistency with Blob / createObjectURL
In-Reply-To:
References:
Message-ID:
Yup, this seems like a bug in IE. Microsoft doesn't read this list
though, so I suggest contacting them directly.
You might also want to file a bug against the File spec to get the
spec to be even more explicit about the requirements here.
https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WebAppsWG
/ Jonas
On Fri, Jan 31, 2014 at 6:48 PM, K. Gadd wrote:
> Apologies if this has come up on the list before:
>
> IE10 appears to have shipped implementations of the Blob constructor along
> with createObjectURL. While they work, there appears to be a significant
> deviation from the spec behavior (at the very least, Firefox and Chrome
> implement these APIs as I'd expect).
>
> When a Blob gets GCed in IE10, it appears to intentionally destroy the
> object URL associated with it, instead of waiting for you to revoke the
> object URL. When this happens it spits out a vague console message:
>
> HTML7007: One or more blob URLs were revoked by closing the blob for which
> they were created. These URLs will no longer resolve as the data backing
> the URL has been freed.
>
> This is confusing because the API doesn't even have a way to 'close' blobs;
> all that is necessary to trigger this is to let a Blob get collected by
> going out of scope.
>
> From reading the spec I don't see any language that suggests this behavior
> is allowed or expected. I can try to work around it by retaining all the
> blobs but it seems unnecessary...
>
> -kg
From cam at mcc.id.au Sun Feb 2 19:34:24 2014
From: cam at mcc.id.au (Cameron McCormack)
Date: Mon, 03 Feb 2014 14:34:24 +1100
Subject: [whatwg] Document.activeElement should return the root element
in non-HTML documents when no element has focus
In-Reply-To:
References: <52ED9C15.10903@mcc.id.au>
Message-ID: <52EF0E40.1080006@mcc.id.au>
Cameron McCormack wrote:
>> Document.activeElement is currently defined to return the
>> element if there is no element with focus, or null if there's no
>> element. I think it needs to return the root element when
>> the document isn't an HTML document (like an SVG document).
Anne van Kesteren wrote:
> You mean when there's no element?
When the document isn't an HTML document and when there is no element
with focus. Browsers agree on returning null in an HTML document when
there is no element with focus, no element, but still a document
element.
From mike at w3.org Mon Feb 3 02:14:26 2014
From: mike at w3.org (Michael[tm] Smith)
Date: Mon, 3 Feb 2014 19:14:26 +0900
Subject: [whatwg] inputmode feedback
In-Reply-To:
References: <83D6DB4D-DC3B-483D-9FD9-62D182D20F1A@apple.com>
<20131206092729.GA95292@sideshowbarker>
<20131206133045.GD95292@sideshowbarker>
<20131216093615.GI32206@sideshowbarker>
Message-ID: <20140203101426.GE35206@sideshowbarker>
Ian Hickson , 2014-01-22 00:54 +0000:
> The idea of the inputmode="" attribute is that it gives the mode that is
> most likely to be needed by the user when providing input. There's various
> modes that seem to make sense:
>
> - inserting raw latin-script characters, like passwords, product codes
>
> - inserting human-readable latin-script short-form text, like search
> queries
>
> - inserting human-readable latin-script human names
>
> - inserting human-readable latin-script long-form text, like blog posts
>
> - inserting numeric data, like credit card numbers
>
> - inserting text in other scripts, of which I know nothing
>
> - inserting human-readable latin-script text within long-form text in
> other scripts
>
> You don't use the same kind of keyboard for inserting raw latin-script
> characters as for inserting Japanese long-form prose, so it makes sense to
> me that they'd use different input modes.
>
> Why is this wrong?
I personally think it's not wrong. Well, mostly not wrong, at least (see
below for what I think is one specific, fixable problem.) But I believe one
objection that others have made to the current set of modes is that for
Latin input it provides values that conflate typing-aids hints with the
script hint, while for Japanese input, it does not.
That means there's at least one possibly-useful mode that inputmode
currently does make expressible: a "name" mode for kana input (to
correspond to the latin-name mode).
What I mean is, what value would an author choose if they wanted to
indicate a mode for inserting human-readable kana-input human names?
It's true there's no capitalization in Japanese names (as there is with
Latin names), so if all that the -name value indicated was namecase
autocapitalization, we wouldn't need a kana-name value.
But a UA could use the latin-name mode for more than just turning on
namecase autocapitalization. For example, the spec notes that the mode
could trigger "text prediction from the user's contact list".
So what would an author do if they if they wanted a mode that signals both
kana input and "text prediction from the user's contact list"?
Asking that question makes me realize that we probably don't actually want
a "-name" mode for the contact-list case anyway -- because a Japanese user
is likely to have a contact list that contains names both in Kanji and in
Latin characters. So if we really want to provide "text prediction from the
user's contact list", I think we'd probably want to just add an script-less
inputmode=contact value for that.
Also, there are things other than human names for which namecase (aka
titlecase) is useful: For example, a field where the user is expected to
type in a book title or movie title. For those kinds of fields, you clearly
wouldn't want "text prediction from the user's contact list" turned on
also. Instead you'd just want it to be inputmode=titlecase.
Anyway, I think the root problem might be that we have inputmode=latin-name
to begin with. So I'd suggest either dropping it entirely, or replacing it
with the two new values inputmode=titlecase and inputmode=contact.
And as far as using inputmode for specifying typing aids instead of just
script, I don't what other kinds of typing aids (other than the contact
case) would be relevant for Japanese input. The main typing aids the spec
mentions are autocapitalization, autocorrect, and text prediction. Among
those, capitalization isn't relevant for Japanese input at all. And as far
as autocorrect, in my experience at least, autocorrect isn't a feature
that's commonly used anywhere with IMEs for Japanese input, so it's not
relevant. And as far as text prediction, in Japanese IMEs text prediction
is always turned on anyway, and I can't think of cases where a user would
really care to have it turned off (or be bothered by having it on).
Come to think of it, in soft keyboards on smartphones for Latin input too,
text prediction is always on anyway. So maybe these days there's not much
of a real need to provide a hint for a "text prediction on" typing aid --
because "text prediction on" is the default anyway. Maybe instead there's
now more of a need for a "text prediction off" typing aid, I dunno.
> On Mon, 16 Dec 2013, Michael[tm] Smith wrote:
> >
> > As I commented in bug 23961, the value of the inputmode attribute was
> > originally specified as taking a list of tokens, where one token is
> > optionally the name of a script like "latin" and the rest of the tokens
> > were optional modifiers.
> >
> > So you could imagine a value like inputmode="latin titlecase
> > prediction".
> >
> > I'm not saying I think the use cases actually merit changing the
> > inputmode microsyntax to be a list of tokens like that. But it might be
> > preferable to introducing yet more attributes.
>
> We originally had this in Wbe Forms 2.0, but it is far more complex than
> necessary, IMHO. Authors don't need that level of control in the vast
> majority of cases.
Yeah, agreed. After thinking about it, it seems to me that we don't really
have a need for any new combinations. If we were to add anything new for
the use cases that have come up, I think it would just be a inputmode=contact
value and maybe an inputmode=titlecase value (which would just imply Latin
input, since it'd only be relevant to Latin). And drop inputmode=latin-name.
--Mike
--
Michael[tm] Smith http://people.w3.org/mike
From annevk at annevk.nl Mon Feb 3 02:29:42 2014
From: annevk at annevk.nl (Anne van Kesteren)
Date: Mon, 3 Feb 2014 10:29:42 +0000
Subject: [whatwg] Document.activeElement should return the root element
in non-HTML documents when no element has focus
In-Reply-To: <52EF0E40.1080006@mcc.id.au>
References: <52ED9C15.10903@mcc.id.au>
<52EF0E40.1080006@mcc.id.au>
Message-ID:
On Mon, Feb 3, 2014 at 3:34 AM, Cameron McCormack wrote:
> When the document isn't an HTML document and when there is no element with
> focus. Browsers agree on returning null in an HTML document when there is
> no element with focus, no element, but still a document element.
So how does that work for text/xml? Do you dispatch on namespace of
the root element? If the root element is html in the HTML namespace,
you have that behavior, and otherwise you return the root element
itself? At least thus far we have cared a great deal about not
introducing more differences between HTML and XHTML than necessary. I
could see us caring less about it now though.
--
http://annevankesteren.nl/
From bzbarsky at MIT.EDU Mon Feb 3 04:36:37 2014
From: bzbarsky at MIT.EDU (Boris Zbarsky)
Date: Mon, 03 Feb 2014 07:36:37 -0500
Subject: [whatwg] Document.activeElement should return the root element
in non-HTML documents when no element has focus
In-Reply-To:
References: <52ED9C15.10903@mcc.id.au> <52EF0E40.1080006@mcc.id.au>
Message-ID: <52EF8D55.3060705@mit.edu>
On 2/3/14 5:29 AM, Anne van Kesteren wrote:
> So how does that work for text/xml? Do you dispatch on namespace of
> the root element?
What Gecko does is that if the document is an HTMLDocument (so is
text/html or application/xhtml+xml) and hence has a .body property we
use that. Otherwise we use .documentElement.
Of course the spec has no concept of HTMLDocument and has a .body on all
documents...
-Boris
From simonp at opera.com Mon Feb 3 05:27:53 2014
From: simonp at opera.com (Simon Pieters)
Date: Mon, 03 Feb 2014 14:27:53 +0100
Subject: [whatwg] Document.activeElement should return the root element
in non-HTML documents when no element has focus
In-Reply-To:
References: <52ED9C15.10903@mcc.id.au>
<52EF0E40.1080006@mcc.id.au>
Message-ID:
On Mon, 03 Feb 2014 11:29:42 +0100, Anne van Kesteren
wrote:
> On Mon, Feb 3, 2014 at 3:34 AM, Cameron McCormack wrote:
>> When the document isn't an HTML document and when there is no element
>> with
>> focus. Browsers agree on returning null in an HTML document when there
>> is
>> no element with focus, no element, but still a document element.
[...]
> If the root element is html in the HTML namespace,
> you have that behavior, and otherwise you return the root element
> itself?
That sounds good to me.
--
Simon Pieters
Opera Software
From ben at benv.ca Mon Feb 3 11:23:33 2014
From: ben at benv.ca (Ben Vinegar)
Date: Mon, 3 Feb 2014 11:23:33 -0800
Subject: [whatwg] Feedback on seamless iframe attribute
Message-ID:
Hi there,
I wanted to offer some feedback on the seamless iframe attribute. [1]
Some context: I?m a software engineer at Disqus, an embedded discussion
platform that uses iframes heavily. I?m also the co-author of Third-party
JavaScript, and I?ve given talks about seamless and how to emulate its
behaviour in browsers that don?t support it.
Ultimately, seamless doesn?t affect Disqus, because it only applies to
iframes that share the same origin as the browsing context. Which is good,
because we don?t want to use the seamless attribute anyways ? it would let
publishers manipulate the styles of our application, which besides being
potentially dangerous, is not something we want them doing.
But while we?re not interested in the style component of the seamless
attribute, we ? and probably all developers that hack on iframes ? are
interested in the resizing behaviour it introduces. Right now we deploy
fairly complex code, both inside the iframed document, and on the parent
document, to resize the iframe element when the iframed content changes
size [2]. Every iframed application with dynamically-sized content does the
same.
To me, it?s crazy that it?s 2013 and there?s still no native way to have
the browser automatically resize an iframe. And yet we have seamless. But
it not only resizes: it adds all this other bundled behaviour, and strictly
serves a fringe use case where somebody is distributing iframes on the same
origin.
My suggestion is to split seamless into its three major parts: style
inheritance, iframe resizing, and browsing context. Let the iframed
_document_ declare whether it opts into style inheritance and/or parent
browsing context (the latter can already be achieved by ). Let the iframe _element_ declare whether it should
auto-resize (e.g.