Changeset 40098 in webkit
- Timestamp:
- Jan 21, 2009 2:55:01 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r40097 r40098 1 2009-01-21 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Beth Dakin. 4 5 Test to make sure accessibility doesn't crash when a table is modified through JavaScript 6 7 * accessibility/table-modification-crash-expected.txt: Added. 8 * accessibility/table-modification-crash.html: Added. 9 1 10 2009-01-16 Eric Seidel <eric@webkit.org> 2 11 -
trunk/WebCore/ChangeLog
r40097 r40098 1 2009-01-21 Chris Fleizach <cfleizach@apple.com> 2 3 Reviewed by Beth Dakin. 4 5 Bug 23443: Table accessibility should be re-enabled after fixing crash that occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() 6 https://bugs.webkit.org/show_bug.cgi?id=23443 7 8 Test: accessibility/table-modification-crash.html 9 10 * page/AccessibilityObject.cpp: 11 (WebCore::AccessibilityObject::updateBackingStore): 12 * page/AccessibilityObject.h: 13 * page/AccessibilityRenderObject.cpp: 14 (WebCore::AccessibilityRenderObject::childrenChanged): 15 (WebCore::AccessibilityRenderObject::children): 16 (WebCore::AccessibilityRenderObject::updateBackingStore): 17 * page/AccessibilityRenderObject.h: 18 (WebCore::AccessibilityRenderObject::markChildrenDirty): 19 * page/AccessibilityTable.cpp: 20 (WebCore::AccessibilityTable::AccessibilityTable): 21 * page/mac/AccessibilityObjectWrapper.mm: 22 (-[AccessibilityObjectWrapper accessibilityActionNames]): 23 (-[AccessibilityObjectWrapper accessibilityAttributeNames]): 24 (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 25 (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]): 26 (-[AccessibilityObjectWrapper accessibilityHitTest:]): 27 (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]): 28 (-[AccessibilityObjectWrapper accessibilityIsIgnored]): 29 (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]): 30 (-[AccessibilityObjectWrapper accessibilityPerformPressAction]): 31 (-[AccessibilityObjectWrapper accessibilityPerformAction:]): 32 (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]): 33 (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 34 (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]): 35 (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]): 36 (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]): 37 * rendering/RenderObject.cpp: 38 (WebCore::RenderObject::destroy): 39 * rendering/RenderWidget.cpp: 40 (WebCore::RenderWidget::destroy): 41 1 42 2009-01-16 Eric Seidel <eric@webkit.org> 2 43 -
trunk/WebCore/page/AccessibilityObject.cpp
r39601 r40098 1029 1029 } 1030 1030 1031 void AccessibilityObject::updateBackingStore() 1032 { 1033 } 1034 1031 1035 } // namespace WebCore -
trunk/WebCore/page/AccessibilityObject.h
r40003 r40098 401 401 #endif 402 402 403 // allows for an AccessibilityObject to update its render tree or perform 404 // other operations update type operations 405 virtual void updateBackingStore(); 406 403 407 protected: 404 408 unsigned m_id; -
trunk/WebCore/page/AccessibilityRenderObject.cpp
r40030 r40098 2216 2216 void AccessibilityRenderObject::childrenChanged() 2217 2217 { 2218 clearChildren(); 2219 2220 if (accessibilityIsIgnored()) { 2221 AccessibilityObject* parent = parentObject(); 2222 if (parent) 2223 parent->childrenChanged(); 2218 // this method is meant as a quick way of marking dirty 2219 // a portion of the accessibility tree 2220 2221 markChildrenDirty(); 2222 2223 // this object may not be accessible (and thus may not appear 2224 // in the hierarchy), which means we need to go up the parent 2225 // chain and mark the parent's dirty. Ideally, we would want 2226 // to only access the next object that is not ignored, but 2227 // asking an element if it's ignored can lead to an examination of the 2228 // render tree which is dangerous. 2229 for (AccessibilityObject* parent = parentObject(); parent; parent = parent->parentObject()) { 2230 if (parent->isAccessibilityRenderObject()) 2231 static_cast<AccessibilityRenderObject *>(parent)->markChildrenDirty(); 2224 2232 } 2225 2233 } … … 2245 2253 const AccessibilityObject::AccessibilityChildrenVector& AccessibilityRenderObject::children() 2246 2254 { 2255 if (m_childrenDirty) { 2256 clearChildren(); 2257 m_childrenDirty = false; 2258 } 2259 2247 2260 if (!m_haveChildren) 2248 2261 addChildren(); … … 2405 2418 } 2406 2419 2420 void AccessibilityRenderObject::updateBackingStore() 2421 { 2422 if (!m_renderer) 2423 return; 2424 m_renderer->view()->layoutIfNeeded(); 2425 } 2407 2426 2408 2427 } // namespace WebCore -
trunk/WebCore/page/AccessibilityRenderObject.h
r40003 r40098 210 210 virtual IntRect doAXBoundsForRange(const PlainTextRange&) const; 211 211 212 virtual void updateBackingStore(); 213 212 214 protected: 213 215 RenderObject* m_renderer; 214 216 AccessibilityRole m_ariaRole; 217 mutable bool m_childrenDirty; 215 218 216 219 void setRenderObject(RenderObject* renderer) { m_renderer = renderer; } … … 232 235 AccessibilityObject* accessibilityParentForImageMap(HTMLMapElement* map) const; 233 236 237 void markChildrenDirty() const { m_childrenDirty = true; } 234 238 }; 235 239 -
trunk/WebCore/page/AccessibilityTable.cpp
r39414 r40098 54 54 m_headerContainer(0) 55 55 { 56 // FIXME: We need to disable Accessibility Tables entirely on the Mac until <rdar://problem/6372481> is resolved. 57 #if PLATFORM(MAC) 56 #if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) 58 57 m_isAccessibilityTable = false; 59 #else 58 #else 60 59 m_isAccessibilityTable = isTableExposableThroughAccessibility(); 61 60 #endif 62 63 61 } 64 62 -
trunk/WebCore/page/mac/AccessibilityObjectWrapper.mm
r40033 r40098 581 581 - (NSArray*)accessibilityActionNames 582 582 { 583 m_object->updateBackingStore(); 584 583 585 static NSArray* actionElementActions = [[NSArray alloc] initWithObjects: NSAccessibilityPressAction, NSAccessibilityShowMenuAction, nil]; 584 586 static NSArray* defaultElementActions = [[NSArray alloc] initWithObjects: NSAccessibilityShowMenuAction, nil]; … … 600 602 - (NSArray*)accessibilityAttributeNames 601 603 { 604 m_object->updateBackingStore(); 605 602 606 if (m_object->isAttachment()) 603 607 return [[self attachmentView] accessibilityAttributeNames]; … … 1125 1129 return nil; 1126 1130 1131 m_object->updateBackingStore(); 1132 1127 1133 if ([attributeName isEqualToString: NSAccessibilityRoleAttribute]) 1128 1134 return [self role]; … … 1431 1437 - (id)accessibilityFocusedUIElement 1432 1438 { 1439 m_object->updateBackingStore(); 1440 1433 1441 RefPtr<AccessibilityObject> focusedObj = m_object->focusedUIElement(); 1434 1442 … … 1441 1449 - (id)accessibilityHitTest:(NSPoint)point 1442 1450 { 1451 m_object->updateBackingStore(); 1452 1443 1453 RefPtr<AccessibilityObject> axObject = m_object->doAccessibilityHitTest(IntPoint(point)); 1444 1454 if (axObject) … … 1449 1459 - (BOOL)accessibilityIsAttributeSettable:(NSString*)attributeName 1450 1460 { 1461 m_object->updateBackingStore(); 1462 1451 1463 if ([attributeName isEqualToString: @"AXSelectedTextMarkerRange"]) 1452 1464 return YES; … … 1483 1495 - (BOOL)accessibilityIsIgnored 1484 1496 { 1497 m_object->updateBackingStore(); 1498 1485 1499 if (m_object->isAttachment()) 1486 1500 return [[self attachmentView] accessibilityIsIgnored]; … … 1490 1504 - (NSArray* )accessibilityParameterizedAttributeNames 1491 1505 { 1506 m_object->updateBackingStore(); 1507 1492 1508 if (m_object->isAttachment()) 1493 1509 return nil; … … 1570 1586 - (void)accessibilityPerformPressAction 1571 1587 { 1588 m_object->updateBackingStore(); 1589 1572 1590 if (m_object->isAttachment()) 1573 1591 [[self attachmentView] accessibilityPerformAction:NSAccessibilityPressAction]; … … 1614 1632 - (void)accessibilityPerformAction:(NSString*)action 1615 1633 { 1634 m_object->updateBackingStore(); 1635 1616 1636 if ([action isEqualToString:NSAccessibilityPressAction]) 1617 1637 [self accessibilityPerformPressAction]; … … 1623 1643 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attributeName 1624 1644 { 1645 m_object->updateBackingStore(); 1646 1625 1647 WebCoreTextMarkerRange* textMarkerRange = nil; 1626 1648 NSNumber* number = nil; … … 1745 1767 return nil; 1746 1768 1769 m_object->updateBackingStore(); 1770 1747 1771 // common parameter type check/casting. Nil checks in handlers catch wrong type case. 1748 1772 // NOTE: This assumes nil is not a valid parameter, because it is indistinguishable from … … 1990 2014 - (NSUInteger)accessibilityIndexOfChild:(id)child 1991 2015 { 2016 m_object->updateBackingStore(); 2017 1992 2018 const AccessibilityObject::AccessibilityChildrenVector& children = m_object->children(); 1993 2019 … … 2006 2032 - (NSUInteger)accessibilityArrayAttributeCount:(NSString *)attribute 2007 2033 { 2034 m_object->updateBackingStore(); 2035 2008 2036 if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) { 2009 2037 const AccessibilityObject::AccessibilityChildrenVector& children = m_object->children(); … … 2019 2047 - (NSArray *)accessibilityArrayAttributeValues:(NSString *)attribute index:(NSUInteger)index maxCount:(NSUInteger)maxCount 2020 2048 { 2049 m_object->updateBackingStore(); 2050 2021 2051 if ([attribute isEqualToString:NSAccessibilityChildrenAttribute]) { 2022 2052 if (m_object->children().isEmpty()) { -
trunk/WebCore/rendering/RenderObject.cpp
r40074 r40098 2623 2623 RenderCounter::destroyCounterNodes(this); 2624 2624 2625 if (AXObjectCache::accessibilityEnabled()) 2625 if (AXObjectCache::accessibilityEnabled()) { 2626 document()->axObjectCache()->childrenChanged(this->parent()); 2626 2627 document()->axObjectCache()->remove(this); 2627 2628 } 2628 2629 animation()->cancelAnimations(this); 2629 2630 -
trunk/WebCore/rendering/RenderWidget.cpp
r39175 r40098 76 76 v->removeWidget(this); 77 77 78 if (AXObjectCache::accessibilityEnabled()) 78 if (AXObjectCache::accessibilityEnabled()) { 79 document()->axObjectCache()->childrenChanged(this->parent()); 79 80 document()->axObjectCache()->remove(this); 80 81 } 81 82 remove(); 82 83
Note: See TracChangeset
for help on using the changeset viewer.