| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Apple 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "config.h" | 29 #include "config.h" |
| 30 #include "core/accessibility/AXObject.h" | 30 #include "core/accessibility/AXObject.h" |
| 31 | 31 |
| 32 #include "core/accessibility/AXObjectCacheImpl.h" | 32 #include "core/accessibility/AXObjectCacheImpl.h" |
| 33 #include "core/dom/NodeTraversal.h" | 33 #include "core/dom/NodeTraversal.h" |
| 34 #include "core/editing/VisibleUnits.h" | 34 #include "core/editing/VisibleUnits.h" |
| 35 #include "core/editing/htmlediting.h" | 35 #include "core/editing/htmlediting.h" |
| 36 #include "core/frame/LocalFrame.h" | 36 #include "core/frame/LocalFrame.h" |
| 37 #include "core/frame/Settings.h" |
| 37 #include "core/rendering/RenderListItem.h" | 38 #include "core/rendering/RenderListItem.h" |
| 38 #include "core/rendering/RenderTheme.h" | 39 #include "core/rendering/RenderTheme.h" |
| 39 #include "core/rendering/RenderView.h" | 40 #include "core/rendering/RenderView.h" |
| 40 #include "platform/UserGestureIndicator.h" | 41 #include "platform/UserGestureIndicator.h" |
| 41 #include "platform/text/PlatformLocale.h" | 42 #include "platform/text/PlatformLocale.h" |
| 42 #include "wtf/StdLibExtras.h" | 43 #include "wtf/StdLibExtras.h" |
| 43 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 44 | 45 |
| 45 using blink::WebLocalizedString; | 46 using blink::WebLocalizedString; |
| 46 | 47 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 case MenuButtonRole: | 208 case MenuButtonRole: |
| 208 case MenuItemRole: | 209 case MenuItemRole: |
| 209 case MenuItemCheckBoxRole: | 210 case MenuItemCheckBoxRole: |
| 210 case MenuItemRadioRole: | 211 case MenuItemRadioRole: |
| 211 return true; | 212 return true; |
| 212 default: | 213 default: |
| 213 return false; | 214 return false; |
| 214 } | 215 } |
| 215 } | 216 } |
| 216 | 217 |
| 218 bool AXObject::isPasswordFieldAndShouldHideValue() const |
| 219 { |
| 220 Settings* settings = document()->settings(); |
| 221 if (!settings || settings->accessibilityPasswordValuesEnabled()) |
| 222 return false; |
| 223 |
| 224 return isPasswordField(); |
| 225 } |
| 226 |
| 217 bool AXObject::isTextControl() const | 227 bool AXObject::isTextControl() const |
| 218 { | 228 { |
| 219 switch (roleValue()) { | 229 switch (roleValue()) { |
| 220 case TextAreaRole: | 230 case TextAreaRole: |
| 221 case TextFieldRole: | 231 case TextFieldRole: |
| 222 case ComboBoxRole: | 232 case ComboBoxRole: |
| 223 return true; | 233 return true; |
| 224 default: | 234 default: |
| 225 return false; | 235 return false; |
| 226 } | 236 } |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 return ToggleButtonRole; | 977 return ToggleButtonRole; |
| 968 if (ariaHasPopup()) | 978 if (ariaHasPopup()) |
| 969 return PopUpButtonRole; | 979 return PopUpButtonRole; |
| 970 // We don't contemplate RadioButtonRole, as it depends on the input | 980 // We don't contemplate RadioButtonRole, as it depends on the input |
| 971 // type. | 981 // type. |
| 972 | 982 |
| 973 return ButtonRole; | 983 return ButtonRole; |
| 974 } | 984 } |
| 975 | 985 |
| 976 } // namespace blink | 986 } // namespace blink |
| OLD | NEW |