OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |