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

Side by Side Diff: Source/web/WebAXObject.cpp

Issue 779513007: Introduce new API ariaAutoComplete() to expose correct state and object attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 { 217 {
218 if (isDetached()) 218 if (isDetached())
219 return WebAXOptionalBoolUndefined; 219 return WebAXOptionalBoolUndefined;
220 220
221 return static_cast<WebAXOptionalBool>(m_private->isAriaGrabbed()); 221 return static_cast<WebAXOptionalBool>(m_private->isAriaGrabbed());
222 } 222 }
223 223
224 bool WebAXObject::isAriaReadOnly() const 224 bool WebAXObject::isAriaReadOnly() const
225 { 225 {
226 if (isDetached()) 226 if (isDetached())
227 return 0; 227 return 0;
Mike West 2014/12/09 14:12:02 Noticed this in passing: would you mind putting to
228 228
229 return equalIgnoringCase(m_private->getAttribute(HTMLNames::aria_readonlyAtt r), "true"); 229 return equalIgnoringCase(m_private->getAttribute(HTMLNames::aria_readonlyAtt r), "true");
230 } 230 }
231 231
232 WebString WebAXObject::ariaAutoComplete() const
233 {
234 if (isDetached())
235 return WebString();
236
237 return m_private->ariaAutoComplete();
238 }
239
232 bool WebAXObject::isButtonStateMixed() const 240 bool WebAXObject::isButtonStateMixed() const
233 { 241 {
234 if (isDetached()) 242 if (isDetached())
235 return 0; 243 return 0;
236 244
237 return m_private->checkboxOrRadioValue() == ButtonStateMixed; 245 return m_private->checkboxOrRadioValue() == ButtonStateMixed;
238 } 246 }
239 247
240 bool WebAXObject::isChecked() const 248 bool WebAXObject::isChecked() const
241 { 249 {
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 m_private = object; 1246 m_private = object;
1239 return *this; 1247 return *this;
1240 } 1248 }
1241 1249
1242 WebAXObject::operator WTF::PassRefPtr<AXObject>() const 1250 WebAXObject::operator WTF::PassRefPtr<AXObject>() const
1243 { 1251 {
1244 return m_private.get(); 1252 return m_private.get();
1245 } 1253 }
1246 1254
1247 } // namespace blink 1255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698