[ATK] Fix style issues in AccessibilityUIElementAtk
authormario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 12:33:27 +0000 (12:33 +0000)
committermario@webkit.org <mario@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 12:33:27 +0000 (12:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121898

Reviewed by Chris Fleizach.

Avoid the '.f' suffix for float literals and use G_VALUE_INIT
instead of { 0, { { 0 } } } to initialize a GValue.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::clickPointX): Remove suffix.
(AccessibilityUIElement::clickPointY): Ditto.
(AccessibilityUIElement::intValue): Use G_VALUE_INIT and remove suffix.
(AccessibilityUIElement::minValue): Ditto.
(AccessibilityUIElement::maxValue): Ditto.
(AccessibilityUIElement::numberAttributeValue): Remove suffix.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::numberAttributeValue): Remove suffix.
(WTR::AccessibilityUIElement::x): Ditto.
(WTR::AccessibilityUIElement::y): Ditto.
(WTR::AccessibilityUIElement::width): Ditto.
(WTR::AccessibilityUIElement::height): Ditto.
(WTR::AccessibilityUIElement::clickPointX): Ditto.
(WTR::AccessibilityUIElement::clickPointY): Ditto.
(WTR::AccessibilityUIElement::intValue): Ditto.
(WTR::AccessibilityUIElement::minValue): Ditto.
(WTR::AccessibilityUIElement::maxValue): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156388 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

index 5d15f14..78ec11f 100644 (file)
@@ -1,3 +1,32 @@
+2013-09-25  Mario Sanchez Prada  <mario.prada@samsung.com>
+
+        [ATK] Fix style issues in AccessibilityUIElementAtk
+        https://bugs.webkit.org/show_bug.cgi?id=121898
+
+        Reviewed by Chris Fleizach.
+
+        Avoid the '.f' suffix for float literals and use G_VALUE_INIT
+        instead of { 0, { { 0 } } } to initialize a GValue.
+
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        (AccessibilityUIElement::clickPointX): Remove suffix.
+        (AccessibilityUIElement::clickPointY): Ditto.
+        (AccessibilityUIElement::intValue): Use G_VALUE_INIT and remove suffix.
+        (AccessibilityUIElement::minValue): Ditto.
+        (AccessibilityUIElement::maxValue): Ditto.
+        (AccessibilityUIElement::numberAttributeValue): Remove suffix.
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::numberAttributeValue): Remove suffix.
+        (WTR::AccessibilityUIElement::x): Ditto.
+        (WTR::AccessibilityUIElement::y): Ditto.
+        (WTR::AccessibilityUIElement::width): Ditto.
+        (WTR::AccessibilityUIElement::height): Ditto.
+        (WTR::AccessibilityUIElement::clickPointX): Ditto.
+        (WTR::AccessibilityUIElement::clickPointY): Ditto.
+        (WTR::AccessibilityUIElement::intValue): Ditto.
+        (WTR::AccessibilityUIElement::minValue): Ditto.
+        (WTR::AccessibilityUIElement::maxValue): Ditto.
+
 2013-09-25  Krzysztof Czech  <k.czech@samsung.com>
 
         [EFL] accessibility/loading-iframe-sends-notification.html is failing
index 59e0778..c26e6f9 100644 (file)
@@ -583,13 +583,13 @@ double AccessibilityUIElement::height()
 double AccessibilityUIElement::clickPointX()
 {
     // Note: This is not something we have in ATK.
-    return 0.f;
+    return 0;
 }
 
 double AccessibilityUIElement::clickPointY()
 {
     // Note: This is not something we have in ATK.
-    return 0.f;
+    return 0;
 }
 
 JSStringRef AccessibilityUIElement::orientation() const
@@ -611,40 +611,40 @@ JSStringRef AccessibilityUIElement::orientation() const
 
 double AccessibilityUIElement::intValue() const
 {
-    GValue value = { 0, { { 0 } } };
+    GValue value = G_VALUE_INIT;
 
     if (!ATK_IS_VALUE(m_element))
-        return 0.0f;
+        return 0;
 
     atk_value_get_current_value(ATK_VALUE(m_element), &value);
     if (!G_VALUE_HOLDS_FLOAT(&value))
-        return 0.0f;
+        return 0;
     return g_value_get_float(&value);
 }
 
 double AccessibilityUIElement::minValue()
 {
-    GValue value = { 0, { { 0 } } };
+    GValue value = G_VALUE_INIT;
 
     if (!ATK_IS_VALUE(m_element))
-        return 0.0f;
+        return 0;
 
     atk_value_get_minimum_value(ATK_VALUE(m_element), &value);
     if (!G_VALUE_HOLDS_FLOAT(&value))
-        return 0.0f;
+        return 0;
     return g_value_get_float(&value);
 }
 
 double AccessibilityUIElement::maxValue()
 {
-    GValue value = { 0, { { 0 } } };
+    GValue value = G_VALUE_INIT;
 
     if (!ATK_IS_VALUE(m_element))
-        return 0.0f;
+        return 0;
 
     atk_value_get_maximum_value(ATK_VALUE(m_element), &value);
     if (!G_VALUE_HOLDS_FLOAT(&value))
-        return 0.0f;
+        return 0;
     return g_value_get_float(&value);
 }
 
@@ -931,7 +931,7 @@ JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
 double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
 {
     // FIXME: implement
-    return 0.0f;
+    return 0;
 }
 
 bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
index e18ad91..9bc78a5 100644 (file)
@@ -592,7 +592,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::stringAttributeValue(JSStringRe
 double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
 {
     // FIXME: implement
-    return 0.0f;
+    return 0;
 }
 
 PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementAttributeValue(JSStringRef attribute) const
@@ -728,7 +728,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
 double AccessibilityUIElement::x()
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     int x, y;
     atk_component_get_position(ATK_COMPONENT(m_element.get()), &x, &y, ATK_XY_SCREEN);
@@ -738,7 +738,7 @@ double AccessibilityUIElement::x()
 double AccessibilityUIElement::y()
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     int x, y;
     atk_component_get_position(ATK_COMPONENT(m_element.get()), &x, &y, ATK_XY_SCREEN);
@@ -748,7 +748,7 @@ double AccessibilityUIElement::y()
 double AccessibilityUIElement::width()
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     int width, height;
     atk_component_get_size(ATK_COMPONENT(m_element.get()), &width, &height);
@@ -758,7 +758,7 @@ double AccessibilityUIElement::width()
 double AccessibilityUIElement::height()
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     int width, height;
     atk_component_get_size(ATK_COMPONENT(m_element.get()), &width, &height);
@@ -768,24 +768,24 @@ double AccessibilityUIElement::height()
 double AccessibilityUIElement::clickPointX()
 {
     // FIXME: implement
-    return 0.0f;
+    return 0;
 }
 
 double AccessibilityUIElement::clickPointY()
 {
     // FIXME: implement
-    return 0.0f;
+    return 0;
 }
 
 double AccessibilityUIElement::intValue() const
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     GValue value = G_VALUE_INIT;
     atk_value_get_current_value(ATK_VALUE(m_element.get()), &value);
     if (!G_VALUE_HOLDS_FLOAT(&value))
-        return 0.0f;
+        return 0;
 
     return g_value_get_float(&value);
 }
@@ -793,12 +793,12 @@ double AccessibilityUIElement::intValue() const
 double AccessibilityUIElement::minValue()
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     GValue value = G_VALUE_INIT;
     atk_value_get_minimum_value(ATK_VALUE(m_element.get()), &value);
     if (!G_VALUE_HOLDS_FLOAT(&value))
-        return 0.0f;
+        return 0;
 
     return g_value_get_float(&value);
 }
@@ -806,12 +806,12 @@ double AccessibilityUIElement::minValue()
 double AccessibilityUIElement::maxValue()
 {
     if (!m_element || !ATK_IS_OBJECT(m_element.get()))
-        return 0.0f;
+        return 0;
 
     GValue value = G_VALUE_INIT;
     atk_value_get_maximum_value(ATK_VALUE(m_element.get()), &value);
     if (!G_VALUE_HOLDS_FLOAT(&value))
-        return 0.0f;
+        return 0;
 
     return g_value_get_float(&value);
 }