Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 2931893002: More precise use of multiline state (Closed)
Patch Set: Remove unnecessary changes Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 return AXDefaultActionVerb::kOpen; 1213 return AXDefaultActionVerb::kOpen;
1214 default: 1214 default:
1215 if (IsCheckable()) { 1215 if (IsCheckable()) {
1216 return CheckedState() != kCheckedStateTrue 1216 return CheckedState() != kCheckedStateTrue
1217 ? AXDefaultActionVerb::kCheck 1217 ? AXDefaultActionVerb::kCheck
1218 : AXDefaultActionVerb::kUncheck; 1218 : AXDefaultActionVerb::kUncheck;
1219 } 1219 }
1220 return AXDefaultActionVerb::kClick; 1220 return AXDefaultActionVerb::kClick;
1221 } 1221 }
1222 } 1222 }
1223
1224 bool AXObject::IsMultiline() const {
1225 Node* node = this->GetNode();
1226 if (!node)
1227 return false;
1228
1229 if (isHTMLTextAreaElement(*node))
1230 return true;
1231
1232 if (HasEditableStyle(*node))
1233 return true;
1234
1235 if (!IsNativeTextControl() && !IsNonNativeTextControl())
1236 return false;
1237
1238 return AOMPropertyOrARIAAttributeIsTrue(AOMBooleanProperty::kMultiline);
1239 }
1240
1241 bool AXObject::AriaPressedIsPresent() const { 1223 bool AXObject::AriaPressedIsPresent() const {
1242 return !GetAttribute(aria_pressedAttr).IsEmpty(); 1224 return !GetAttribute(aria_pressedAttr).IsEmpty();
1243 } 1225 }
1244 1226
1245 bool AXObject::AriaCheckedIsPresent() const { 1227 bool AXObject::AriaCheckedIsPresent() const {
1246 return !GetAttribute(aria_checkedAttr).IsEmpty(); 1228 return !GetAttribute(aria_checkedAttr).IsEmpty();
1247 } 1229 }
1248 1230
1249 bool AXObject::SupportsActiveDescendant() const { 1231 bool AXObject::SupportsActiveDescendant() const {
1250 // According to the ARIA Spec, all ARIA composite widgets, ARIA text boxes 1232 // According to the ARIA Spec, all ARIA composite widgets, ARIA text boxes
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 } 2139 }
2158 2140
2159 DEFINE_TRACE(AXObject) { 2141 DEFINE_TRACE(AXObject) {
2160 visitor->Trace(children_); 2142 visitor->Trace(children_);
2161 visitor->Trace(parent_); 2143 visitor->Trace(parent_);
2162 visitor->Trace(cached_live_region_root_); 2144 visitor->Trace(cached_live_region_root_);
2163 visitor->Trace(ax_object_cache_); 2145 visitor->Trace(ax_object_cache_);
2164 } 2146 }
2165 2147
2166 } // namespace blink 2148 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698