Changeset 152716 in webkit
- Timestamp:
- Jul 16, 2013 5:55:56 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r152714 r152716 1 2013-07-16 Krzysztof Czech <k.czech@ymail.com> 2 3 [ATK] Adds support for aria-haspopup property. 4 https://bugs.webkit.org/show_bug.cgi?id=117834 5 6 Reviewed by Christophe Dumez. 7 8 Moving accessibility tests related to aria-haspopup property. 9 10 * accessibility/element-haspopup-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/element-haspopup-expected.txt. 11 * accessibility/element-haspopup.html: Renamed from LayoutTests/platform/mac/accessibility/element-haspopup.html. 12 * accessibility/popup-button-title-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/popup-button-title-expected.txt. 13 * accessibility/popup-button-title.html: Renamed from LayoutTests/platform/mac/accessibility/popup-button-title.html. 14 1 15 2013-07-16 Gabor Abraham <abrhm@inf.u-szeged.hu> 2 16 -
trunk/LayoutTests/accessibility/element-haspopup.html
r152715 r152716 2 2 <html> 3 3 <head> 4 <script src="../ ../../fast/js/resources/js-test-pre.js"></script>4 <script src="../fast/js/resources/js-test-pre.js"></script> 5 5 </head> 6 6 <body id="body"> … … 27 27 </script> 28 28 29 <script src="../ ../../fast/js/resources/js-test-post.js"></script>29 <script src="../fast/js/resources/js-test-post.js"></script> 30 30 </body> 31 31 </html> -
trunk/LayoutTests/accessibility/popup-button-title.html
r152715 r152716 2 2 <html> 3 3 <head> 4 <script src="../ ../../fast/js/resources/js-test-pre.js"></script>4 <script src="../fast/js/resources/js-test-pre.js"></script> 5 5 </head> 6 6 <body id="body"> … … 25 25 </script> 26 26 27 <script src="../ ../../fast/js/resources/js-test-post.js"></script>27 <script src="../fast/js/resources/js-test-post.js"></script> 28 28 </body> 29 29 </html> -
trunk/Source/WebCore/ChangeLog
r152711 r152716 1 2013-07-16 Krzysztof Czech <k.czech@ymail.com> 2 3 [ATK] Adds support for aria-haspopup property. 4 https://bugs.webkit.org/show_bug.cgi?id=117834 5 6 Reviewed by Christophe Dumez. 7 8 Adds support for aria-haspopup property. 9 10 Tests: accessibility/element-haspopup.html 11 accessibility/popup-button-title.html 12 13 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 14 (webkitAccessibleGetAttributes): 15 1 16 2013-07-16 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> 2 17 -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r152440 r152716 495 495 if (!placeholder.isEmpty()) 496 496 attributeSet = addToAtkAttributeSet(attributeSet, "placeholder-text", placeholder.utf8().data()); 497 498 if (coreObject->ariaHasPopup()) 499 attributeSet = addToAtkAttributeSet(attributeSet, "aria-haspopup", "true"); 497 500 498 501 return attributeSet; -
trunk/Tools/ChangeLog
r152715 r152716 1 2013-07-16 Krzysztof Czech <k.czech@samsung.com> 2 3 [ATK] Adds support for aria-haspopup property. 4 https://bugs.webkit.org/show_bug.cgi?id=117834 5 6 Reviewed by Christophe Dumez. 7 8 Adds implementation for testing aria-haspopup property. 9 10 * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp: 11 (getAttributeSetValueForId): 12 (AccessibilityUIElement::stringAttributeValue): 13 (AccessibilityUIElement::hasPopup): 14 * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: 15 (WTR::getAttributeSetValueForId): 16 (WTR::AccessibilityUIElement::stringAttributeValue): 17 (WTR::AccessibilityUIElement::hasPopup): 18 1 19 2013-07-16 Michael Brüning <michael.bruning@digia.com> 2 20 -
trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
r152397 r152716 50 50 51 51 return ""; 52 } 53 54 static String getAttributeSetValueForId(AtkObject* accessible, const char* id) 55 { 56 const char* attributeValue = 0; 57 AtkAttributeSet* attributeSet = atk_object_get_attributes(accessible); 58 for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) { 59 AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data); 60 if (!strcmp(atkAttribute->name, id)) { 61 attributeValue = atkAttribute->value; 62 break; 63 } 64 } 65 66 String atkAttributeValue = String::fromUTF8(attributeValue); 67 atk_attribute_set_free(attributeSet); 68 69 return atkAttributeValue; 52 70 } 53 71 … … 805 823 return JSStringCreateWithCharacters(0, 0); 806 824 807 const char* attributeValue = 0; 808 AtkAttributeSet* attributeSet = atk_object_get_attributes(ATK_OBJECT(m_element)); 809 for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) { 810 AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data); 811 if (!strcmp(atkAttribute->name, atkAttributeName.utf8().data())) { 812 attributeValue = atkAttribute->value; 813 break; 814 } 815 } 816 JSStringRef jsString = attributeValue 817 ? JSStringCreateWithUTF8CString(attributeValue) 818 : JSStringCreateWithCharacters(0, 0); 819 atk_attribute_set_free(attributeSet); 820 821 return jsString; 825 String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element), atkAttributeName.utf8().data()); 826 return JSStringCreateWithUTF8CString(attributeValue.utf8().data()); 822 827 } 823 828 … … 1022 1027 bool AccessibilityUIElement::hasPopup() const 1023 1028 { 1024 // FIXME: implement 1025 return false; 1029 if (!m_element || !ATK_IS_OBJECT(m_element)) 1030 return false; 1031 1032 return equalIgnoringCase(getAttributeSetValueForId(ATK_OBJECT(m_element), "aria-haspopup"), "true"); 1026 1033 } 1027 1034 -
trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
r152397 r152716 52 52 String attributeString = String::fromUTF8(buffer.get()); 53 53 return attributeString == "AXPlaceholderValue" ? "placeholder-text" : String(); 54 } 55 56 static String getAttributeSetValueForId(AtkObject* accessible, const char* id) 57 { 58 const char* attributeValue = 0; 59 AtkAttributeSet* attributeSet = atk_object_get_attributes(accessible); 60 for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) { 61 AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data); 62 if (!strcmp(atkAttribute->name, id)) { 63 attributeValue = atkAttribute->value; 64 break; 65 } 66 } 67 68 String atkAttributeValue = String::fromUTF8(attributeValue); 69 atk_attribute_set_free(attributeSet); 70 71 return atkAttributeValue; 54 72 } 55 73 … … 474 492 return JSStringCreateWithCharacters(0, 0); 475 493 476 const char* attributeValue = 0; 477 AtkAttributeSet* attributeSet = atk_object_get_attributes(ATK_OBJECT(m_element.get())); 478 for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) { 479 AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data); 480 if (!strcmp(atkAttribute->name, atkAttributeName.utf8().data())) { 481 attributeValue = atkAttribute->value; 482 break; 483 } 484 } 485 JSStringRef jsString = attributeValue 486 ? JSStringCreateWithUTF8CString(attributeValue) 487 : JSStringCreateWithCharacters(0, 0); 488 atk_attribute_set_free(attributeSet); 489 490 return jsString; 494 String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), atkAttributeName.utf8().data()); 495 return JSStringCreateWithUTF8CString(attributeValue.utf8().data()); 491 496 } 492 497 … … 1075 1080 bool AccessibilityUIElement::hasPopup() const 1076 1081 { 1077 // FIXME: implement 1078 return false; 1082 if (!m_element || !ATK_IS_OBJECT(m_element.get())) 1083 return false; 1084 1085 return equalIgnoringCase(getAttributeSetValueForId(ATK_OBJECT(m_element.get()), "aria-haspopup"), "true"); 1079 1086 } 1080 1087
Note: See TracChangeset
for help on using the changeset viewer.