WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
a11y-language-attribute.patch (text/plain), 5.07 KB, created by
Krzysztof Czech
on 2013-04-19 00:17:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Krzysztof Czech
Created:
2013-04-19 00:17:25 PDT
Size:
5.07 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 505364c..6e68270 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2013-04-09 Krzysztof Czech <k.czech@samsung.com> >+ >+ [GTK][WK2] accessibility/language-attribute.html is failing >+ https://bugs.webkit.org/show_bug.cgi?id=106342 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Unskipping accessibility/language-attribute.html. >+ >+ * platform/gtk-wk2/TestExpectations: >+ > 2013-04-09 Zan Dobersek <zdobersek@igalia.com> > > Unreviewed GTK gardening. >diff --git a/LayoutTests/platform/gtk-wk2/TestExpectations b/LayoutTests/platform/gtk-wk2/TestExpectations >index 97ff530..0d76aea 100644 >--- a/LayoutTests/platform/gtk-wk2/TestExpectations >+++ b/LayoutTests/platform/gtk-wk2/TestExpectations >@@ -304,7 +304,6 @@ webkit.org/b/106337 accessibility/aria-help.html [ Failure ] > webkit.org/b/106338 accessibility/aria-hidden-updates-alldescendants.html [ Failure ] > webkit.org/b/106340 accessibility/img-fallsback-to-title.html [ Failure ] > webkit.org/b/106341 accessibility/label-for-control-hittest.html [ Failure ] >-webkit.org/b/106342 accessibility/language-attribute.html [ Failure ] > webkit.org/b/106343 accessibility/loading-iframe-sends-notification.html [ Failure ] > webkit.org/b/106344 accessibility/placeholder.html [ Failure ] > webkit.org/b/106346 accessibility/svg-remote-element.html [ Timeout ] >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index ffbaa29..b302a3e 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2013-04-09 Krzysztof Czech <k.czech@samsung.com> >+ >+ [GTK][WK2] accessibility/language-attribute.html is failing >+ https://bugs.webkit.org/show_bug.cgi?id=106342 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adds support for getting language information. >+ >+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: >+ (WTR::AccessibilityUIElement::language): >+ > 2013-04-09 Thiago Marcos P. Santos <thiago.santos@intel.com> > > [WK2] Drop WebProcess capabilities on Linux using seccomp filters >diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp >index 4eea312..a54a560 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp >@@ -42,10 +42,21 @@ > > namespace WTR { > >+static void attributesClear(AtkAttributeSet* attributesSet) >+{ >+ for (GSList* attributes = attributesSet; attributes; attributes = attributes->next) { >+ AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data); >+ g_free(atkAttribute->name); >+ g_free(atkAttribute->value); >+ g_free(atkAttribute); >+ } >+} >+ > static gchar* attributeSetToString(AtkAttributeSet* attributeSet) > { >+ GOwnPtr<GSList> atkAttributes(attributeSet); > GString* str = g_string_new(0); >- for (GSList* attributes = attributeSet; attributes; attributes = attributes->next) { >+ for (GSList* attributes = atkAttributes.get(); attributes; attributes = attributes->next) { > AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data); > GOwnPtr<gchar> attributeData(g_strconcat(attribute->name, ":", attribute->value, NULL)); > g_string_append(str, attributeData.get()); >@@ -53,6 +64,8 @@ static gchar* attributeSetToString(AtkAttributeSet* attributeSet) > g_string_append(str, ", "); > } > >+ attributesClear(atkAttributes.get()); >+ > return g_string_free(str, FALSE); > } > >@@ -570,8 +583,32 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::stringValue() > > JSRetainPtr<JSStringRef> AccessibilityUIElement::language() > { >- // FIXME: implement >- return JSStringCreateWithCharacters(0, 0); >+ if (!m_element || !ATK_IS_OBJECT(m_element)) >+ return JSStringCreateWithCharacters(0, 0); >+ >+ GOwnPtr<gchar> language; >+ // In ATK, the document language is exposed as the document's locale. >+ if (atk_object_get_role(ATK_OBJECT(m_element)) == ATK_ROLE_DOCUMENT_FRAME) { >+ language.set(g_strdup_printf("AXLanguage: %s", atk_document_get_locale(ATK_DOCUMENT(m_element)))); >+ return JSStringCreateWithUTF8CString(language.get()); >+ } >+ >+ // For all other objects, the language is exposed as an AtkText attribute. >+ if (!ATK_IS_TEXT(m_element)) >+ return JSStringCreateWithCharacters(0, 0); >+ >+ GOwnPtr<GSList> textAttributes(atk_text_get_default_attributes(ATK_TEXT(m_element))); >+ for (GSList* attributes = textAttributes.get(); attributes; attributes = attributes->next) { >+ AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data); >+ if (!strcmp(atkAttribute->name, atk_text_attribute_get_name(ATK_TEXT_ATTR_LANGUAGE))) { >+ language.set(g_strdup_printf("AXLanguage: %s", atkAttribute->value)); >+ break; >+ } >+ } >+ >+ attributesClear(textAttributes.get()); >+ >+ return JSStringCreateWithUTF8CString(language.get()); > } > > JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 106342
:
197020
|
198729
| 198819