| OLD | NEW | 
|     1 /* |     1 /* | 
|     2 * Copyright (C) 2012, Google Inc. All rights reserved. |     2 * Copyright (C) 2012, Google Inc. All rights reserved. | 
|     3 * |     3 * | 
|     4 * Redistribution and use in source and binary forms, with or without |     4 * Redistribution and use in source and binary forms, with or without | 
|     5 * modification, are permitted provided that the following conditions |     5 * modification, are permitted provided that the following conditions | 
|     6 * are met: |     6 * are met: | 
|     7 * |     7 * | 
|     8 * 1.  Redistributions of source code must retain the above copyright |     8 * 1.  Redistributions of source code must retain the above copyright | 
|     9 *     notice, this list of conditions and the following disclaimer. |     9 *     notice, this list of conditions and the following disclaimer. | 
|    10 * 2.  Redistributions in binary form must reproduce the above copyright |    10 * 2.  Redistributions in binary form must reproduce the above copyright | 
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   326             return ColorWellRole; |   326             return ColorWellRole; | 
|   327         if (type == InputTypeNames::time) |   327         if (type == InputTypeNames::time) | 
|   328             return TimeRole; |   328             return TimeRole; | 
|   329         return TextFieldRole; |   329         return TextFieldRole; | 
|   330     } |   330     } | 
|   331     if (isHTMLSelectElement(*node())) { |   331     if (isHTMLSelectElement(*node())) { | 
|   332         HTMLSelectElement& selectElement = toHTMLSelectElement(*node()); |   332         HTMLSelectElement& selectElement = toHTMLSelectElement(*node()); | 
|   333         return selectElement.multiple() ? ListBoxRole : PopUpButtonRole; |   333         return selectElement.multiple() ? ListBoxRole : PopUpButtonRole; | 
|   334     } |   334     } | 
|   335     if (isHTMLTextAreaElement(*node())) |   335     if (isHTMLTextAreaElement(*node())) | 
|   336         return TextAreaRole; |   336         return TextFieldRole; | 
|   337     if (headingLevel()) |   337     if (headingLevel()) | 
|   338         return HeadingRole; |   338         return HeadingRole; | 
|   339     if (isHTMLDivElement(*node())) |   339     if (isHTMLDivElement(*node())) | 
|   340         return DivRole; |   340         return DivRole; | 
|   341     if (isHTMLMeterElement(*node())) |   341     if (isHTMLMeterElement(*node())) | 
|   342         return MeterRole; |   342         return MeterRole; | 
|   343     if (isHTMLOutputElement(*node())) |   343     if (isHTMLOutputElement(*node())) | 
|   344         return StatusRole; |   344         return StatusRole; | 
|   345     if (isHTMLParagraphElement(*node())) |   345     if (isHTMLParagraphElement(*node())) | 
|   346         return ParagraphRole; |   346         return ParagraphRole; | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   393  |   393  | 
|   394     AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole); |   394     AccessibilityRole role = ariaRoleToWebCoreRole(ariaRole); | 
|   395  |   395  | 
|   396     // ARIA states if an item can get focus, it should not be presentational. |   396     // ARIA states if an item can get focus, it should not be presentational. | 
|   397     if ((role == NoneRole || role == PresentationalRole) && canSetFocusAttribute
      ()) |   397     if ((role == NoneRole || role == PresentationalRole) && canSetFocusAttribute
      ()) | 
|   398         return UnknownRole; |   398         return UnknownRole; | 
|   399  |   399  | 
|   400     if (role == ButtonRole) |   400     if (role == ButtonRole) | 
|   401         role = buttonRoleType(); |   401         role = buttonRoleType(); | 
|   402  |   402  | 
|   403     if (role == TextAreaRole && !ariaIsMultiline()) |  | 
|   404         role = TextFieldRole; |  | 
|   405  |  | 
|   406     role = remapAriaRoleDueToParent(role); |   403     role = remapAriaRoleDueToParent(role); | 
|   407  |   404  | 
|   408     if (role) |   405     if (role) | 
|   409         return role; |   406         return role; | 
|   410  |   407  | 
|   411     return UnknownRole; |   408     return UnknownRole; | 
|   412 } |   409 } | 
|   413  |   410  | 
|   414 void AXNodeObject::elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Ele
      ment>>& elements, const QualifiedName& attribute) const |   411 void AXNodeObject::elementsFromAttribute(WillBeHeapVector<RawPtrWillBeMember<Ele
      ment>>& elements, const QualifiedName& attribute) const | 
|   415 { |   412 { | 
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   750     return false; |   747     return false; | 
|   751 } |   748 } | 
|   752  |   749  | 
|   753 bool AXNodeObject::isPasswordField() const |   750 bool AXNodeObject::isPasswordField() const | 
|   754 { |   751 { | 
|   755     Node* node = this->node(); |   752     Node* node = this->node(); | 
|   756     if (!isHTMLInputElement(node)) |   753     if (!isHTMLInputElement(node)) | 
|   757         return false; |   754         return false; | 
|   758  |   755  | 
|   759     AccessibilityRole ariaRole = ariaRoleAttribute(); |   756     AccessibilityRole ariaRole = ariaRoleAttribute(); | 
|   760     if (ariaRole != TextFieldRole && ariaRole != TextAreaRole && ariaRole != Unk
      nownRole) |   757     if (ariaRole != TextFieldRole && ariaRole != UnknownRole) | 
|   761         return false; |   758         return false; | 
|   762  |   759  | 
|   763     return toHTMLInputElement(node)->type() == InputTypeNames::password; |   760     return toHTMLInputElement(node)->type() == InputTypeNames::password; | 
|   764 } |   761 } | 
|   765  |   762  | 
|   766 bool AXNodeObject::isProgressIndicator() const |   763 bool AXNodeObject::isProgressIndicator() const | 
|   767 { |   764 { | 
|   768     return roleValue() == ProgressIndicatorRole; |   765     return roleValue() == ProgressIndicatorRole; | 
|   769 } |   766 } | 
|   770  |   767  | 
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1040             level++; |  1037             level++; | 
|  1041         else if (parentRole == TreeRole) |  1038         else if (parentRole == TreeRole) | 
|  1042             break; |  1039             break; | 
|  1043     } |  1040     } | 
|  1044  |  1041  | 
|  1045     return level; |  1042     return level; | 
|  1046 } |  1043 } | 
|  1047  |  1044  | 
|  1048 String AXNodeObject::ariaAutoComplete() const |  1045 String AXNodeObject::ariaAutoComplete() const | 
|  1049 { |  1046 { | 
|  1050     if (roleValue() != ComboBoxRole && roleValue() != TextAreaRole) |  1047     if (roleValue() != ComboBoxRole) | 
|  1051         return String(); |  1048         return String(); | 
|  1052  |  1049  | 
|  1053     const AtomicString& ariaAutoComplete = getAttribute(aria_autocompleteAttr).l
      ower(); |  1050     const AtomicString& ariaAutoComplete = getAttribute(aria_autocompleteAttr).l
      ower(); | 
|  1054  |  1051  | 
|  1055     if (ariaAutoComplete == "inline" || ariaAutoComplete == "list" |  1052     if (ariaAutoComplete == "inline" || ariaAutoComplete == "list" | 
|  1056         || ariaAutoComplete == "both") |  1053         || ariaAutoComplete == "both") | 
|  1057         return ariaAutoComplete; |  1054         return ariaAutoComplete; | 
|  1058  |  1055  | 
|  1059     return String(); |  1056     return String(); | 
|  1060 } |  1057 } | 
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2085     float range = maxValueForRange() - minValueForRange(); |  2082     float range = maxValueForRange() - minValueForRange(); | 
|  2086     float value = valueForRange(); |  2083     float value = valueForRange(); | 
|  2087  |  2084  | 
|  2088     value += range * (percentChange / 100); |  2085     value += range * (percentChange / 100); | 
|  2089     setValue(String::number(value)); |  2086     setValue(String::number(value)); | 
|  2090  |  2087  | 
|  2091     axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged)
      ; |  2088     axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged)
      ; | 
|  2092 } |  2089 } | 
|  2093  |  2090  | 
|  2094 } // namespace blink |  2091 } // namespace blink | 
| OLD | NEW |