| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 336 |
| 337 RefPtr<AXObject> newObj = 0; | 337 RefPtr<AXObject> newObj = 0; |
| 338 if (widget->isFrameView()) | 338 if (widget->isFrameView()) |
| 339 newObj = AXScrollView::create(toScrollView(widget)); | 339 newObj = AXScrollView::create(toScrollView(widget)); |
| 340 else if (widget->isScrollbar()) | 340 else if (widget->isScrollbar()) |
| 341 newObj = AXScrollbar::create(toScrollbar(widget)); | 341 newObj = AXScrollbar::create(toScrollbar(widget)); |
| 342 | 342 |
| 343 // Will crash later if we have two objects for the same widget. | 343 // Will crash later if we have two objects for the same widget. |
| 344 ASSERT(!get(widget)); | 344 ASSERT(!get(widget)); |
| 345 | 345 |
| 346 // Catch the case if an (unsupported) widget type is used. Only FrameView an
d ScrollBar are supported now. |
| 347 ASSERT(newObj); |
| 348 if (!newObj) |
| 349 return 0; |
| 350 |
| 346 getAXID(newObj.get()); | 351 getAXID(newObj.get()); |
| 347 | 352 |
| 348 m_widgetObjectMapping.set(widget, newObj->axObjectID()); | 353 m_widgetObjectMapping.set(widget, newObj->axObjectID()); |
| 349 m_objects.set(newObj->axObjectID(), newObj); | 354 m_objects.set(newObj->axObjectID(), newObj); |
| 350 newObj->init(); | 355 newObj->init(); |
| 351 attachWrapper(newObj.get()); | 356 attachWrapper(newObj.get()); |
| 352 return newObj.get(); | 357 return newObj.get(); |
| 353 } | 358 } |
| 354 | 359 |
| 355 AXObject* AXObjectCache::getOrCreate(Node* node) | 360 AXObject* AXObjectCache::getOrCreate(Node* node) |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 } | 1024 } |
| 1020 | 1025 |
| 1021 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) | 1026 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) |
| 1022 { | 1027 { |
| 1023 // The anchor node may not be accessible. Post the notification for the | 1028 // The anchor node may not be accessible. Post the notification for the |
| 1024 // first accessible object. | 1029 // first accessible object. |
| 1025 postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode)
, AXScrolledToAnchor); | 1030 postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode)
, AXScrolledToAnchor); |
| 1026 } | 1031 } |
| 1027 | 1032 |
| 1028 } // namespace WebCore | 1033 } // namespace WebCore |
| OLD | NEW |