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

Side by Side Diff: third_party/WebKit/Source/web/WebDocument.cpp

Issue 1589623002: Keep track of accessibility focus across windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final suggestions Created 4 years, 10 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
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 return cache ? WebAXObject(cache->getOrCreate(document->layoutView())) : Web AXObject(); 259 return cache ? WebAXObject(cache->getOrCreate(document->layoutView())) : Web AXObject();
260 } 260 }
261 261
262 WebAXObject WebDocument::accessibilityObjectFromID(int axID) const 262 WebAXObject WebDocument::accessibilityObjectFromID(int axID) const
263 { 263 {
264 const Document* document = constUnwrap<Document>(); 264 const Document* document = constUnwrap<Document>();
265 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache()); 265 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache());
266 return cache ? WebAXObject(cache->objectFromAXID(axID)) : WebAXObject(); 266 return cache ? WebAXObject(cache->objectFromAXID(axID)) : WebAXObject();
267 } 267 }
268 268
269 WebAXObject WebDocument::focusedAccessibilityObject() const
270 {
271 const Document* document = constUnwrap<Document>();
272 AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache());
273 return cache ? WebAXObject(cache->focusedObject()) : WebAXObject();
274 }
275
269 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const 276 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const
270 { 277 {
271 WebVector<WebDraggableRegion> draggableRegions; 278 WebVector<WebDraggableRegion> draggableRegions;
272 const Document* document = constUnwrap<Document>(); 279 const Document* document = constUnwrap<Document>();
273 if (document->hasAnnotatedRegions()) { 280 if (document->hasAnnotatedRegions()) {
274 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions (); 281 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions ();
275 draggableRegions = WebVector<WebDraggableRegion>(regions.size()); 282 draggableRegions = WebVector<WebDraggableRegion>(regions.size());
276 for (size_t i = 0; i < regions.size(); i++) { 283 for (size_t i = 0; i < regions.size(); i++) {
277 const AnnotatedRegionValue& value = regions[i]; 284 const AnnotatedRegionValue& value = regions[i];
278 draggableRegions[i].draggable = value.draggable; 285 draggableRegions[i].draggable = value.draggable;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 m_private = elem; 340 m_private = elem;
334 return *this; 341 return *this;
335 } 342 }
336 343
337 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 344 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
338 { 345 {
339 return toDocument(m_private.get()); 346 return toDocument(m_private.get());
340 } 347 }
341 348
342 } // namespace blink 349 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698