Removed redundant if statements and early returns from
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jun 2008 22:32:23 +0000 (22:32 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jun 2008 22:32:23 +0000 (22:32 +0000)
        AccessibilityRenderObject::ariaRoleAttribute.

        Reviewed by Sam Wenig.

        * page/AccessibilityRenderObject.cpp:
        (AccessibilityRenderObject::ariaRoleAttribute): Removed redundant if
        statements and early returns.

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

WebCore/ChangeLog
WebCore/page/AccessibilityRenderObject.cpp

index dff3a95..75904e5 100644 (file)
@@ -1,5 +1,16 @@
 2008-06-17  Timothy Hatcher  <timothy@apple.com>
 
+        Removed redundant if statements and early returns from
+        AccessibilityRenderObject::ariaRoleAttribute.
+
+        Reviewed by Sam Wenig.
+
+        * page/AccessibilityRenderObject.cpp:
+        (AccessibilityRenderObject::ariaRoleAttribute): Removed redundant if
+        statements and early returns.
+
+2008-06-17  Timothy Hatcher  <timothy@apple.com>
+
         Removed duplicate implementations of setTabIndex. They all matched
         the HTMLElement::setTabIndex implementation.
 
index 66e434c..345a5bd 100644 (file)
@@ -1945,14 +1945,6 @@ void AccessibilityRenderObject::setAriaRole()
 
 AccessibilityRole AccessibilityRenderObject::ariaRoleAttribute() const
 {
-    if (m_ariaRole == MenuRole)
-        return m_ariaRole;
-    if (m_ariaRole == MenuBarRole)
-        return m_ariaRole;
-    if (m_ariaRole == MenuButtonRole)
-        return m_ariaRole;
-    if (m_ariaRole == MenuItemRole)
-        return m_ariaRole;
     return m_ariaRole;
 }