Chromium Code Reviews| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 // The HTML element should not be exposed as an element. That's what the Ren derView element does. | 382 // The HTML element should not be exposed as an element. That's what the Ren derView element does. |
| 383 if (isHTMLHtmlElement(node)) | 383 if (isHTMLHtmlElement(node)) |
| 384 return IgnoredRole; | 384 return IgnoredRole; |
| 385 | 385 |
| 386 if (node && node->hasTagName(iframeTag)) | 386 if (node && node->hasTagName(iframeTag)) |
| 387 return IframeRole; | 387 return IframeRole; |
| 388 | 388 |
| 389 if (isEmbeddedObject()) | 389 if (isEmbeddedObject()) |
| 390 return EmbeddedObjectRole; | 390 return EmbeddedObjectRole; |
| 391 | 391 |
| 392 if (node && node->hasTagName(figcaptionTag)) | |
| 393 return FigcaptionRole; | |
| 394 | |
| 392 if (node && node->hasTagName(figureTag)) | 395 if (node && node->hasTagName(figureTag)) |
| 393 return FigureRole; | 396 return FigureRole; |
| 394 | 397 |
| 395 // There should only be one banner/contentInfo per page. If header/footer ar e being used within an article or section | 398 // There should only be one banner/contentInfo per page. If header/footer ar e being used within an article or section |
| 396 // then it should not be exposed as whole page's banner/contentInfo | 399 // then it should not be exposed as whole page's banner/contentInfo |
| 397 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) | 400 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) |
| 398 return BannerRole; | 401 return BannerRole; |
| 399 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) | 402 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl eTag) && !isDescendantOfElementType(sectionTag)) |
| 400 return FooterRole; | 403 return FooterRole; |
| 401 | 404 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 571 // aria-hidden is meant to override visibility as the determinant in AX hierarchy inclusion. | 574 // aria-hidden is meant to override visibility as the determinant in AX hierarchy inclusion. |
| 572 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) | 575 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) |
| 573 return DefaultBehavior; | 576 return DefaultBehavior; |
| 574 | 577 |
| 575 return IgnoreObject; | 578 return IgnoreObject; |
| 576 } | 579 } |
| 577 | 580 |
| 578 return AXObject::defaultObjectInclusion(); | 581 return AXObject::defaultObjectInclusion(); |
| 579 } | 582 } |
| 580 | 583 |
| 581 bool AXRenderObject::computeAccessibilityIsIgnored() const | 584 bool AXRenderObject::computeAccessibilityIsIgnored() const |
|
dmazzoni
2014/09/03 21:26:17
Note: I just realized you may want to add support
| |
| 582 { | 585 { |
| 583 #if ENABLE(ASSERT) | 586 #if ENABLE(ASSERT) |
| 584 ASSERT(m_initialized); | 587 ASSERT(m_initialized); |
| 585 #endif | 588 #endif |
| 586 | 589 |
| 587 // Check first if any of the common reasons cause this element to be ignored . | 590 // Check first if any of the common reasons cause this element to be ignored . |
| 588 // Then process other use cases that need to be applied to all the various r oles | 591 // Then process other use cases that need to be applied to all the various r oles |
| 589 // that AXRenderObjects take on. | 592 // that AXRenderObjects take on. |
| 590 AXObjectInclusion decision = defaultObjectInclusion(); | 593 AXObjectInclusion decision = defaultObjectInclusion(); |
| 591 if (decision == IncludeObject) | 594 if (decision == IncludeObject) |
| (...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2341 if (label && label->renderer()) { | 2344 if (label && label->renderer()) { |
| 2342 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); | 2345 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); |
| 2343 result.unite(labelRect); | 2346 result.unite(labelRect); |
| 2344 } | 2347 } |
| 2345 } | 2348 } |
| 2346 | 2349 |
| 2347 return result; | 2350 return result; |
| 2348 } | 2351 } |
| 2349 | 2352 |
| 2350 } // namespace blink | 2353 } // namespace blink |
| OLD | NEW |