Skip to content

Commit

Permalink
Merge r175100 - AX: Do the early return when role is different than U…
Browse files Browse the repository at this point in the history
…nknownRole

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

Reviewed by Chris Fleizach.

We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
Just check m_ariaRole instead.

No new tests, no behavior change, just some cleanup

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::determineAccessibilityRole):

Canonical link: https://commits.webkit.org/154760.156@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@175908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eail authored and carlosgcampos committed Nov 11, 2014
1 parent f2e7b2c commit ff3c261
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
19 changes: 19 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,22 @@
2014-10-23 Krzysztof Czech <k.czech@samsung.com>

AX: Do the early return when role is different than UnknownRole
https://bugs.webkit.org/show_bug.cgi?id=137880

Reviewed by Chris Fleizach.

We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
Just check m_ariaRole instead.

No new tests, no behavior change, just some cleanup

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::determineAccessibilityRole):

2014-10-23 Milan Crha <mcrha@redhat.com>

RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
Expand Down
7 changes: 2 additions & 5 deletions Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Expand Up @@ -278,12 +278,9 @@ AccessibilityRole AccessibilityNodeObject::determineAccessibilityRole()
if (!node())
return UnknownRole;

m_ariaRole = determineAriaRoleAttribute();
if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole)
return m_ariaRole;

AccessibilityRole ariaRole = ariaRoleAttribute();
if (ariaRole != UnknownRole)
return ariaRole;

if (node()->isLink())
return WebCoreLinkRole;
if (node()->isTextNode())
Expand Down
7 changes: 2 additions & 5 deletions Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Expand Up @@ -2470,13 +2470,10 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
if (!m_renderer)
return UnknownRole;

m_ariaRole = determineAriaRoleAttribute();
if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole)
return m_ariaRole;

Node* node = m_renderer->node();
AccessibilityRole ariaRole = ariaRoleAttribute();
if (ariaRole != UnknownRole)
return ariaRole;

RenderBoxModelObject* cssBox = renderBoxModelObject();

if (node && node->isLink()) {
Expand Down
7 changes: 2 additions & 5 deletions Source/WebCore/accessibility/AccessibilityTableRow.cpp
Expand Up @@ -61,11 +61,8 @@ AccessibilityRole AccessibilityTableRow::determineAccessibilityRole()
if (!isTableRow())
return AccessibilityRenderObject::determineAccessibilityRole();

m_ariaRole = determineAriaRoleAttribute();

AccessibilityRole ariaRole = ariaRoleAttribute();
if (ariaRole != UnknownRole)
return ariaRole;
if ((m_ariaRole = determineAriaRoleAttribute()) != UnknownRole)
return m_ariaRole;

return RowRole;
}
Expand Down

0 comments on commit ff3c261

Please sign in to comment.