| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 if (decision == IgnoreObject) | 591 if (decision == IgnoreObject) |
| 592 return true; | 592 return true; |
| 593 | 593 |
| 594 // If this element is within a parent that cannot have children, it should n
ot be exposed. | 594 // If this element is within a parent that cannot have children, it should n
ot be exposed. |
| 595 if (isDescendantOfBarrenParent()) | 595 if (isDescendantOfBarrenParent()) |
| 596 return true; | 596 return true; |
| 597 | 597 |
| 598 if (roleValue() == IgnoredRole) | 598 if (roleValue() == IgnoredRole) |
| 599 return true; | 599 return true; |
| 600 | 600 |
| 601 if (roleValue() == PresentationalRole || inheritsPresentationalRole()) | 601 if ((roleValue() == NoneRole || roleValue() == PresentationalRole) || inheri
tsPresentationalRole()) |
| 602 return true; | 602 return true; |
| 603 | 603 |
| 604 // An ARIA tree can only have tree items and static text as children. | 604 // An ARIA tree can only have tree items and static text as children. |
| 605 if (!isAllowedChildOfTree()) | 605 if (!isAllowedChildOfTree()) |
| 606 return true; | 606 return true; |
| 607 | 607 |
| 608 // TODO: we should refactor this - but right now this is necessary to make | 608 // TODO: we should refactor this - but right now this is necessary to make |
| 609 // sure scroll areas stay in the tree. | 609 // sure scroll areas stay in the tree. |
| 610 if (isAttachment()) | 610 if (isAttachment()) |
| 611 return false; | 611 return false; |
| (...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 AXObject* parent = parentObject(); | 2289 AXObject* parent = parentObject(); |
| 2290 if (!parent->isAXRenderObject()) | 2290 if (!parent->isAXRenderObject()) |
| 2291 return false; | 2291 return false; |
| 2292 | 2292 |
| 2293 Node* elementNode = toAXRenderObject(parent)->node(); | 2293 Node* elementNode = toAXRenderObject(parent)->node(); |
| 2294 if (!elementNode || !elementNode->isElementNode()) | 2294 if (!elementNode || !elementNode->isElementNode()) |
| 2295 return false; | 2295 return false; |
| 2296 | 2296 |
| 2297 QualifiedName tagName = toElement(elementNode)->tagQName(); | 2297 QualifiedName tagName = toElement(elementNode)->tagQName(); |
| 2298 if (tagName == ulTag || tagName == olTag || tagName == dlTag) | 2298 if (tagName == ulTag || tagName == olTag || tagName == dlTag) |
| 2299 return parent->roleValue() == PresentationalRole; | 2299 return (parent->roleValue() == NoneRole || parent->roleValue() == Presen
tationalRole); |
| 2300 | 2300 |
| 2301 return false; | 2301 return false; |
| 2302 } | 2302 } |
| 2303 | 2303 |
| 2304 LayoutRect AXRenderObject::computeElementRect() const | 2304 LayoutRect AXRenderObject::computeElementRect() const |
| 2305 { | 2305 { |
| 2306 RenderObject* obj = m_renderer; | 2306 RenderObject* obj = m_renderer; |
| 2307 | 2307 |
| 2308 if (!obj) | 2308 if (!obj) |
| 2309 return LayoutRect(); | 2309 return LayoutRect(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 if (label && label->renderer()) { | 2344 if (label && label->renderer()) { |
| 2345 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2345 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2346 result.unite(labelRect); | 2346 result.unite(labelRect); |
| 2347 } | 2347 } |
| 2348 } | 2348 } |
| 2349 | 2349 |
| 2350 return result; | 2350 return result; |
| 2351 } | 2351 } |
| 2352 | 2352 |
| 2353 } // namespace blink | 2353 } // namespace blink |
| OLD | NEW |