[Webkit-unassigned] [Bug 44803] Decompose computing an element's computed language

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 30 11:56:26 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44803


Ilya Sherman <isherman at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |isherman at chromium.org




--- Comment #9 from Ilya Sherman <isherman at chromium.org>  2010-08-30 11:56:25 PST ---
Updated API style per Darin's suggestions


(In reply to comment #7)
> > for the API at least, i recommend spelling out Language.
> 
> I think that it should be spelled out in internal function names, too.

I'm fuzzy on the style expectations for WebKit -- if it is labelled as "lang" elsewhere in the codebase, is it more important to be consistent with that or to gradually transition toward the spelled out version?  All of the instances I have seen elsewhere in the codebase label it just as "lang", though this might just be a biased sample on my part.

> 
> But also, I don't think that "computedInheritedLanguage" is the right name - this function also takes node's own style into account.

I'm wide open to suggestions :)

> 
> +    // The language property is inherited, so we iterate over the parents to
> +    // find the first language.
> 
> This is a very short comment, no need to split it into two lines.

Fixed.  In general, what line width should I aim for?  My emacs is currently set to 80-col for work with chromium, so that's what I've been defaulting to... but I have noticed that WebKit lines tend to be much longer.

> 
> I'm not sure how much benefit an API function provides over querying an element style.

AFAICT, there is no way to query an element's style to ask for its language -- only to query whether the language is some predetermined string.  For chromium i18n, we need some API -- though not necessarily this one -- to directly query an element's language.  It also makes some sense for this API to be exported via the DOM rather than CSS, as language codes are part of the HTML specification :)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list