[ATK] Adds an accessibility support to access a value of the color control element

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

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-09-04
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Implements a possibility of retrieving a value of the color control element.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):

Tools:

Added accessibility role of the color control element.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(roleToString):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::roleToString):

LayoutTests:

Moving mac's color-well-expected.txt result to base accessibility folder.
Unskipping accessibility/color-well.html for EFL port.

* accessibility/color-well-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/color-well-expected.txt.
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c151c812
2013-09-04 Krzysztof Czech <k.czech@samsung.com>
[ATK] Adds an accessibility support to access a value of the color control element
https://bugs.webkit.org/show_bug.cgi?id=114354
Reviewed by Mario Sanchez Prada.
Moving mac's color-well-expected.txt result to base accessibility folder.
Unskipping accessibility/color-well.html for EFL port.
* accessibility/color-well-expected.txt: Renamed from LayoutTests/platform/mac/accessibility/color-well-expected.txt.
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
2013-09-04 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK gardening.
......@@ -175,7 +175,6 @@ webkit.org/b/112020 accessibility/transformed-element.html [ Failure Crash ]
webkit.org/b/112021 accessibility/visible-elements.html [ Failure Crash ]
accessibility/aria-checkbox-sends-notification.html [ Skip ]
accessibility/color-well.html [ Skip ]
accessibility/deleting-iframe-destroys-axcache.html [ Skip ]
accessibility/img-fallsback-to-title.html [ Skip ]
accessibility/internal-link-anchors2.html [ Skip ]
......
......@@ -252,7 +252,6 @@ webkit.org/b/117182 accessibility/text-role-with-aria-hidden-inside.html [ Failu
webkit.org/b/112019 accessibility/title-ui-element-correctness.html [ Crash ]
accessibility/aria-checkbox-sends-notification.html [ Skip ]
accessibility/color-well.html [ Skip ]
accessibility/deleting-iframe-destroys-axcache.html [ Skip ]
accessibility/img-fallsback-to-title.html [ Skip ]
accessibility/internal-link-anchors2.html [ Skip ]
......
2013-09-04 Krzysztof Czech <k.czech@samsung.com>
[ATK] Adds an accessibility support to access a value of the color control element
https://bugs.webkit.org/show_bug.cgi?id=114354
Reviewed by Mario Sanchez Prada.
Implements a possibility of retrieving a value of the color control element.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(getInterfaceMaskFromObject):
2013-09-04 Andreas Kling <akling@apple.com>
Use Vector<Ref<T>> in three random WebCore loops.
......@@ -626,6 +626,14 @@ static gchar* webkitAccessibleTextGetText(AtkText* text, gint startOffset, gint
}
}
#if ENABLE(INPUT_TYPE_COLOR)
if (coreObject->roleValue() == ColorWellRole) {
int r, g, b;
coreObject->colorValue(r, g, b);
return g_strdup_printf("rgb %7.5f %7.5f %7.5f 1", r / 255., g / 255., b / 255.);
}
#endif
ret = ret.substring(startOffset, end - startOffset);
return g_strdup(ret.utf8().data());
}
......
......@@ -1036,6 +1036,12 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
if (role == SliderRole || role == SpinButtonRole || role == ScrollBarRole)
interfaceMask |= 1 << WAI_VALUE;
#if ENABLE(INPUT_TYPE_COLOR)
// Color type.
if (role == ColorWellRole)
interfaceMask |= 1 << WAI_TEXT;
#endif
return interfaceMask;
}
......
2013-09-04 Krzysztof Czech <k.czech@samsung.com>
[ATK] Adds an accessibility support to access a value of the color control element
https://bugs.webkit.org/show_bug.cgi?id=114354
Reviewed by Mario Sanchez Prada.
Added accessibility role of the color control element.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(roleToString):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::roleToString):
2013-09-04 Mario Sanchez Prada <mario.prada@samsung.com>
REGRESSION (r132328): /WebKit2APITests/TestWebKitAccessibility unit test is failing
......
......@@ -104,6 +104,8 @@ static inline const char* roleToString(AtkRole role)
return "AXCanvas";
case ATK_ROLE_CHECK_BOX:
return "AXCheckBox";
case ATK_ROLE_COLOR_CHOOSER:
return "AXColorWell";
case ATK_ROLE_COLUMN_HEADER:
return "AXColumnHeader";
case ATK_ROLE_COMBO_BOX:
......
......@@ -193,6 +193,8 @@ static const gchar* roleToString(AtkRole role)
return "AXCanvas";
case ATK_ROLE_CHECK_BOX:
return "AXCheckBox";
case ATK_ROLE_COLOR_CHOOSER:
return "AXColorWell";
case ATK_ROLE_COLUMN_HEADER:
return "AXColumnHeader";
case ATK_ROLE_COMBO_BOX:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment