Store the language internally instead of using lang attribute for WebVTT nodes
https://bugs.webkit.org/show_bug.cgi?id=108858

Patch by Dima Gorbik <dgorbik@apple.com> on 2013-02-06
Reviewed by Eric Carlson.

Source/WebCore:

Only language webvtt elements should have a lang attribute so we have to store
the language internally in the element. Refactored the code to make
computeInheritedLanguage virtual.

Existing tests were modified to cover this case.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::WebVTTElement):
(WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
(WebCore::WebVTTElement::createEquivalentHTMLElement): clone the internal language property.
* html/track/WebVTTElement.h:
(WebCore::WebVTTElement::language):
(WebCore::WebVTTElement::setLanguage):
* html/track/WebVTTParser.cpp: only set the lang attribute for language objects.
(WebCore::WebVTTParser::constructTreeFromToken):

LayoutTests:

* media/track/captions-webvtt/styling-lang.vtt:
* media/track/track-css-matching-lang-expected.txt:
* media/track/track-css-matching-lang.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142043 268f45cc-cd09-0410-ab3c-d52691b4dbfc