[atk] Replace deprecated call to atk_document_get_locale() in DumpRenderTree
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jun 2013 21:39:42 +0000 (21:39 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jun 2013 21:39:42 +0000 (21:39 +0000)
commitc095ca9020ca7d41250438e6a71ef21b51ec4a5c
tree92096f489ff24798b5ea93754db4053a6243c962
parentaebe391f82bf1427ae4abfaac117ee0f5006bce8
[atk] Replace deprecated call to atk_document_get_locale() in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=115647

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2013-06-12
Reviewed by Martin Robinson.

Source/WebCore:

Override the get_object_locale() method of WebkitAccessibleWrapperAtk's internal
AtkObject, to include custom implementations for AtkDocument and AtkText objects,
taking the logic as-is from AtkDocument::get_document_locale() and DumpRenderTree's
AccessibilityUIElementAtk::language(), respectively.

Apart from improving encapsulation, this avoids calling deprecated get_document_locale()
method.

No new functionality, no new tests.

* accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
(webkitAccessibleDocumentInterfaceInit): Chains implementation of
AtkDocument::get_document_locale() to AtkObject::get_object_locale().
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetObjectLocale): Add implementation of locale resolution for
objects of type AtkDocument and AtkText.
(webkitAccessibleClassInit): Override AtkObject::get_object_locale() method.

Tools:

Locale resolution is moved to WebKitAccessibleWrapperAtk using
AtkObject::get_object_locale() API. Now, implementation of
AccessibilityUIElement::language() in both DumpRenderTree and WebKitTestRunner can
be leveraged to get_object_locale() of AtkObject.

Apart from improving encapsulation, this avoids calling deprecated get_document_locale()
method.

No new functionality, no new tests.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::language): Leverage locale resolution to
AtkObject::get_object_locale().
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::language): Leverage locale resolution to
AtkObject::get_object_locale().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp