[ATK] Adds an accessibility support to access a value of the color control element
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Sep 2013 14:19:02 +0000 (14:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Sep 2013 14:19:02 +0000 (14:19 +0000)
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: https://svn.webkit.org/repository/webkit/trunk@155041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/accessibility/color-well-expected.txt [moved from LayoutTests/platform/mac/accessibility/color-well-expected.txt with 100% similarity]
LayoutTests/platform/efl-wk1/TestExpectations
LayoutTests/platform/efl-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

index 97aa3578a96dbb3220547b553b91e014e695307e..d6eb1bead971f2dc0fd1fc95a637b93a27b53c88 100644 (file)
@@ -1,3 +1,17 @@
+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.
index 482773d1c9c52bcc0f04ea2665db553cce4afabe..822af80ac098f65efe63daf5ac5da2a0f6b3a3fa 100644 (file)
@@ -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 ]
index 17f1dc2475cd3d1b41218819d1ed74cb5296e99d..b0eb86294b21415d082083daa19608e825acb7fb 100644 (file)
@@ -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 ]
index baf8203ff168731ae9c9fab985e9b59a1cc173f8..71bd829504230836ae962762162a65f5990053f4 100644 (file)
@@ -1,3 +1,17 @@
+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.
index df76e77408492cecdbbeb516bcac8ea3a8c9d4c4..a21d3d949586db52dfca95bef205763bffeb1743 100644 (file)
@@ -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());
 }
index 8bc2488b15223e1d99cbe782b7759e94a5274e4e..b38b229fa0873237e8a10e3933c8c7755f6c77b2 100644 (file)
@@ -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;
 }
 
index 18d85277e3fafbababfa44f00211244c190a6c98..37180c56441b41632023a1ffc674fcaaef0059b5 100644 (file)
@@ -1,3 +1,17 @@
+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
index 41bc9697d355f651bf0611570b085428f021f3e4..d068e659cb95e845a75a3d3e00d5672403b11a90 100644 (file)
@@ -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:
index 2813800f429d995a4942b1e8e5113ab8c0644a4b..a9e80ad74dc8ba923b18537e1c7caa51d7f97e57 100644 (file)
@@ -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: