Bug 130575

Summary: [ATK] Utilize new AtkValue interface coming in ATK 2.11.92
Product: WebKit Reporter: Krzysztof Czech <k.czech>
Component: AccessibilityAssignee: Krzysztof Czech <k.czech>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, mario, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Linux   
Attachments:
Description Flags
patch
mario: review+
attempt to check bots
none
attempt to check bots
none
attempt to check efl bots. none

Krzysztof Czech
Reported 2014-03-21 03:24:20 PDT
ATK 2.11.92 introduces some new API and deprecates an old one. It adds AtkRange data type which I guess it could be used to squeeze some properties of a range controls into one. New API coming to get range value with its alternative description so I guess one may be used to get aria-valuenow and aria-valuetext and there are couple of more cool features.
Attachments
patch (16.49 KB, patch)
2014-03-24 10:05 PDT, Krzysztof Czech
mario: review+
attempt to check bots (17.19 KB, patch)
2014-03-25 08:15 PDT, Krzysztof Czech
no flags
attempt to check bots (17.30 KB, patch)
2014-03-25 09:59 PDT, Krzysztof Czech
no flags
attempt to check efl bots. (17.30 KB, patch)
2014-03-26 01:53 PDT, Krzysztof Czech
no flags
Radar WebKit Bug Importer
Comment 1 2014-03-21 03:24:30 PDT
Krzysztof Czech
Comment 2 2014-03-24 10:05:39 PDT
Mario Sanchez Prada
Comment 3 2014-03-25 06:39:38 PDT
Comment on attachment 227663 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=227663&action=review Thanks for helping reduce the gap with latest ATK in WebKit! This patch looks good to me, I would just ask you to change a couple of things before landing (see them below) > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp:48 > + gdouble value; This is an internal variable so it can be a double > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp:78 > + if (AccessibilityObject* coreObject = core(value)) { > + if (currentValue) > + *currentValue = coreObject->valueForRange(); > + if (alternativeText) > + *alternativeText = g_strdup_printf("%s", coreObject->valueDescription().utf8().data()); > + } Could you switch this to an early return on !coreObject? > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp:88 > + if (AccessibilityObject* coreObject = core(value)) > + return webkitAccessibleGetIncrementValue(coreObject); > + return 0; Ditto > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp:110 > + if (AccessibilityObject* coreObject = core(value)) { > + gdouble minValue = coreObject->minValueForRange(); > + gdouble maxValue = coreObject->maxValueForRange(); > + gchar* valueDescription = g_strdup_printf("%s", coreObject->valueDescription().utf8().data()); > + return atk_range_new(minValue, maxValue, valueDescription); > + } > + return nullptr; Ditto > Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:561 > + if (AtkRange* range = atk_value_get_range(value)) { > + double value = isMinValue ? atk_range_get_lower_limit(range) : atk_range_get_upper_limit(range); > + atk_range_free(range); > + return value; > + } > + return 0; Ditto > Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:606 > +static double rangeMinMaxValue(AtkValue* value, bool isMinValue) I don't like much bool parameters for these kind of uses. Would you mind defining a enum type instead and use that insteadl? Perhaps something such as enum RangeLimit { RangeLimitMinimum, RangeLimitMaximum } or the like. > Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:613 > + if (AtkRange* range = atk_value_get_range(value)) { > + double value = isMinValue ? atk_range_get_lower_limit(range) : atk_range_get_upper_limit(range); > + atk_range_free(range); > + return value; > + } > + return 0; Ditto
Krzysztof Czech
Comment 4 2014-03-25 08:15:53 PDT
Created attachment 227751 [details] attempt to check bots
Krzysztof Czech
Comment 5 2014-03-25 08:17:32 PDT
Applied all Mario's suggestions. Waiting whether bots are green.
Krzysztof Czech
Comment 6 2014-03-25 09:59:45 PDT
Created attachment 227764 [details] attempt to check bots
Krzysztof Czech
Comment 7 2014-03-26 01:53:08 PDT
Created attachment 227836 [details] attempt to check efl bots.
WebKit Commit Bot
Comment 8 2014-03-26 03:17:13 PDT
Comment on attachment 227836 [details] attempt to check efl bots. Clearing flags on attachment: 227836 Committed r166288: <http://trac.webkit.org/changeset/166288>
WebKit Commit Bot
Comment 9 2014-03-26 03:17:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.