Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-09-18 Thread Anne van Kesteren
On Wed, Sep 18, 2013 at 11:10 AM, L. David Baron wrote: > In Gecko it's also implemented through CSS inheritance, but it's not > exposed to Web content as a CSS property. (Internally it's > '-x-lang', but that name isn't exposed.) > > We use the language for: > * font selection > * language-spe

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-09-18 Thread L. David Baron
On Wednesday 2013-05-01 01:01 -0700, Elliott Sprehn wrote: > On Wed, Apr 24, 2013 at 9:22 AM, Peter Occil wrote: > > I have no objection to the name "baseLang" rather than "language" as the > > name of the DOM attribute. > > > > But if there isn't more interest or you decide not to add this DOM >

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-09-16 Thread Ian Hickson
On Mon, 16 Sep 2013, Peter Occil wrote: > > - Localization of form controls in languages where browser support is > lacking, such as some minor languages. > > - Localization of HTML elements, especially date formatting of span and > div elements in the page's default language [...] > > You said

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-09-16 Thread Peter Occil
r 16, 2013 6:05 PM To: Jukka K. Korpela Cc: whatwg@lists.whatwg.org Subject: Re: [whatwg] HTML: A DOM attribute that returns the language of a node On Fri, 2 Aug 2013, Jukka K. Korpela wrote: 2013-08-02 2:43, Ryosuke Niwa wrote: > > > > Are you saying that for HTML contentedita

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-09-16 Thread Ian Hickson
On Thu, 1 Aug 2013, Ryosuke Niwa wrote: > > > > Are you saying that for HTML contenteditable-based editors that want > > to support drag-and-drop editing, they need to be able to annotate the > > outgoing HTML fragment with the effective language so that when it's > > embedded somewhere, the ri

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-09-16 Thread Ian Hickson
On Fri, 2 Aug 2013, Jukka K. Korpela wrote: > 2013-08-02 2:43, Ryosuke Niwa wrote: > > > > > > Are you saying that for HTML contenteditable-based editors that want > > > to support drag-and-drop editing, they need to be able to annotate > > > the outgoing HTML fragment with the effective languag

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-08-12 Thread Ryosuke Niwa
On Aug 8, 2013, at 7:29 AM, Jukka K. Korpela wrote: > 2013-08-08 2:57, Ryosuke Niwa wrote: > >> On Aug 2, 2013, at 6:10 AM, Jukka K. Korpela >> wrote: > [...] >>> But regarding the effect of language markup on fonts, the effect is >>> limited to situations where the font is not specified in a

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-08-08 Thread Jukka K. Korpela
2013-08-08 2:57, Ryosuke Niwa wrote: On Aug 2, 2013, at 6:10 AM, Jukka K. Korpela wrote: [...] But regarding the effect of language markup on fonts, the effect is limited to situations where the font is not specified in a style sheet. This is a rather uncommon scenario these days; authors are

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-08-07 Thread Ryosuke Niwa
On Aug 2, 2013, at 6:10 AM, Jukka K. Korpela wrote: > 2013-08-02 2:43, Ryosuke Niwa wrote: > >>> Are you saying that for HTML contenteditable-based editors that want to >>> support drag-and-drop editing, they need to be able to annotate the >>> outgoing HTML fragment with the effective language

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-08-02 Thread Jukka K. Korpela
2013-08-02 2:43, Ryosuke Niwa wrote: Are you saying that for HTML contenteditable-based editors that want to support drag-and-drop editing, they need to be able to annotate the outgoing HTML fragment with the effective language so that when it's embedded somewhere, the right fonts get used? Ye

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-08-01 Thread Ryosuke Niwa
On Jul 26, 2013, at 11:20 AM, Ian Hickson wrote: > On Wed, 24 Jul 2013, Ryosuke Niwa wrote: >> On Jul 16, 2013, at 11:25 AM, Ian Hickson wrote: >>> On Tue, 16 Jul 2013, Takayoshi Kochi (河内 隆仁) wrote: IIUC WebKit uses internally node's language to determine which font to use to

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-26 Thread Ian Hickson
On Wed, 24 Jul 2013, Ryosuke Niwa wrote: > On Jul 16, 2013, at 11:25 AM, Ian Hickson wrote: > > On Tue, 16 Jul 2013, Takayoshi Kochi (河内 隆仁) wrote: > >> > >> IIUC WebKit uses internally node's language to determine which font > >> to use to render text, e.g for Han unification > >> (https://en.

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-24 Thread Ryosuke Niwa
On Jul 16, 2013, at 11:25 AM, Ian Hickson wrote: > On Tue, 16 Jul 2013, Takayoshi Kochi ($B2OFb(B $BN4?N(B) wrote: >> >> IIUC WebKit uses internally node's language to determine which font to use >> to render text, >> e.g for Han unification (https://en.wikipedia.org/wiki/Han_unification) >

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-16 Thread Ian Hickson
On Tue, 16 Jul 2013, Takayoshi Kochi (河内 隆仁) wrote: > > IIUC WebKit uses internally node's language to determine which font to use > to render text, > e.g for Han unification (https://en.wikipedia.org/wiki/Han_unification) > WebKit has to choose > a proper glyph depending on its lang attribute for

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-15 Thread Matt Falkenhagen
(resending from correct address) On Tue, Jul 16, 2013 at 10:18 AM, Takayoshi Kochi (河内 隆仁) wrote: > IIUC WebKit uses internally node's language to determine which font to use > to render text, > e.g for Han unification (https://en.wikipedia.org/wiki/Han_unification) > WebKit has to choose > a pro

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-15 Thread 河内 隆仁
IIUC WebKit uses internally node's language to determine which font to use to render text, e.g for Han unification (https://en.wikipedia.org/wiki/Han_unification) WebKit has to choose a proper glyph depending on its lang attribute for the same Unicode codepoint. Matt (falken@) knows more about thi

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-13 Thread Peter Occil
ps/current-work/multipage/states-of-the-type-attribute.html#input-impl-notes -Original Message- From: Ian Hickson Sent: Saturday, July 13, 2013 11:39 AM To: Peter Occil Cc: WHATWG Subject: Re: [whatwg] HTML: A DOM attribute that returns the language of a node On Fri, 12 Jul 2013, Pe

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-13 Thread Ian Hickson
On Fri, 12 Jul 2013, Peter Occil wrote: > > Well, my true hope is that such a DOM attribute like "language" will be > specified in the HTML or DOM spec. Especially since it's not currently > possible to get the language of a node through JavaScript methods alone. What's the use case for having

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-12 Thread Peter Occil
Archives/Public/public-rdfa-wg/2013May/0064.html -Original Message- From: Ian Hickson Sent: Friday, July 12, 2013 3:48 PM To: Peter Occil Cc: WHATWG Subject: Re: [whatwg] HTML: A DOM attribute that returns the language of a node On Wed, 24 Apr 2013, Peter Occil wrote: Well in my case,

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-07-12 Thread Ian Hickson
On Wed, 24 Apr 2013, Peter Occil wrote: > > Well in my case, I have written an HTML parser in Java and C# [1][2], > which parses HTML documents and returns an object that implements a > subset of the DOM, so far. As far as possible, I included only methods > and attributes that were specified

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-05-01 Thread Anne van Kesteren
On Wed, May 1, 2013 at 9:01 AM, Elliott Sprehn wrote: > fwiw WebKit (and Blink) implement this through CSS inheritance since you > need to know the lang for all kinds of things and walking up the DOM > repeatedly would be expensive. > > -webkit-locale is inherited by default and contains the enclo

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-05-01 Thread Elliott Sprehn
On Wed, May 1, 2013 at 1:49 AM, Robert O'Callahan wrote: > On Wed, May 1, 2013 at 8:01 PM, Elliott Sprehn wrote: > >> fwiw WebKit (and Blink) implement this through CSS inheritance since you >> need to know the lang for all kinds of things and walking up the DOM >> repeatedly would be expensive. >

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-05-01 Thread Robert O'Callahan
On Wed, May 1, 2013 at 8:01 PM, Elliott Sprehn wrote: > fwiw WebKit (and Blink) implement this through CSS inheritance since you > need to know the lang for all kinds of things and walking up the DOM > repeatedly would be expensive. > > -webkit-locale is inherited by default and contains the encl

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-05-01 Thread Elliott Sprehn
On Wed, Apr 24, 2013 at 9:22 AM, Peter Occil wrote: > > I have no objection to the name "baseLang" rather than "language" as the > name of the DOM attribute. > > But if there isn't more interest or you decide not to add this DOM > attribute, I encourage you to at least: > > fwiw WebKit (and Blink

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-04-24 Thread Peter Occil
advisable for me to extend my Java/C# DOM by adding a "getLanguage" method? (See my previous message for context.) --Peter -Original Message- From: Anne van Kesteren Sent: Wednesday, April 24, 2013 10:03 AM To: Peter Occil Cc: WHATWG Subject: Re: [whatwg] HTML: A DOM attri

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-04-24 Thread Anne van Kesteren
On Wed, Apr 24, 2013 at 6:49 AM, Peter Occil wrote: > While a "language" attribute on Node may also be useful to > HTML+RDFa processors in JavaScript, I have no plans to implement > such a processor in JavaScript, though. There's https://www.w3.org/Bugs/Public/show_bug.cgi?id=16489 fwiw. Interest

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-04-23 Thread Peter Occil
tps://github.com/peteroupc/HtmlParser [2] https://github.com/peteroupc/HtmlParserCSharp [3] http://www.w3.org/TR/rdfa-in-html/ -Original Message- From: Kang-Hao (Kenny) Lu Sent: Tuesday, April 23, 2013 11:08 PM To: Peter Occil Cc: WHAT Working Group Subject: Re: [whatwg] HTML: A DOM attrib

Re: [whatwg] HTML: A DOM attribute that returns the language of a node

2013-04-23 Thread Kang-Hao (Kenny) Lu
(13/04/23 16:44), Peter Occil wrote: > I believe there should be a DOM attribute that returns the language > of a node, as defined in section 3.2.3.3 "The lang and xml:lang > attributes". What's your use case? If you want to style a particular language then there's the CSS :lang() pseudo-class. U

[whatwg] HTML: A DOM attribute that returns the language of a node

2013-04-23 Thread Peter Occil
I believe there should be a DOM attribute that returns the language of a node, as defined in section 3.2.3.3 "The lang and xml:lang attributes". While there is a "lang" DOM attribute, it's inadequate because it's only affected by the element's "lang" content attribute. Also, I don't see a way t