| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 | 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 return IgnoredRole; | 487 return IgnoredRole; |
| 488 | 488 |
| 489 if (isHTMLIFrameElement(*getNode())) { | 489 if (isHTMLIFrameElement(*getNode())) { |
| 490 const AtomicString& ariaRole = getAttribute(roleAttr); | 490 const AtomicString& ariaRole = getAttribute(roleAttr); |
| 491 if (ariaRole == "none" || ariaRole == "presentation") | 491 if (ariaRole == "none" || ariaRole == "presentation") |
| 492 return IframePresentationalRole; | 492 return IframePresentationalRole; |
| 493 return IframeRole; | 493 return IframeRole; |
| 494 } | 494 } |
| 495 | 495 |
| 496 // There should only be one banner/contentInfo per page. If header/footer ar
e being used within an article or section | 496 // There should only be one banner/contentInfo per page. If header/footer ar
e being used within an article or section |
| 497 // then it should not be exposed as whole page's banner/contentInfo | 497 // then it should not be exposed as whole page's banner/contentInfo but as a
group role. |
| 498 if (getNode()->hasTagName(headerTag) && !isDescendantOfElementType(articleTa
g) && !isDescendantOfElementType(sectionTag)) | 498 if (getNode()->hasTagName(headerTag)) { |
| 499 if (isDescendantOfElementType(articleTag) || isDescendantOfElementType(s
ectionTag) |
| 500 || (getNode()->parentElement() && getNode()->parentElement()->hasTag
Name(mainTag))) { |
| 501 return GroupRole; |
| 502 } |
| 499 return BannerRole; | 503 return BannerRole; |
| 504 } |
| 500 | 505 |
| 501 if (getNode()->hasTagName(footerTag) && !isDescendantOfElementType(articleTa
g) && !isDescendantOfElementType(sectionTag)) | 506 if (getNode()->hasTagName(footerTag)) { |
| 507 if (isDescendantOfElementType(articleTag) || isDescendantOfElementType(s
ectionTag) |
| 508 || (getNode()->parentElement() && getNode()->parentElement()->hasTag
Name(mainTag))) { |
| 509 return GroupRole; |
| 510 } |
| 502 return FooterRole; | 511 return FooterRole; |
| 512 } |
| 503 | 513 |
| 504 if (getNode()->hasTagName(blockquoteTag)) | 514 if (getNode()->hasTagName(blockquoteTag)) |
| 505 return BlockquoteRole; | 515 return BlockquoteRole; |
| 506 | 516 |
| 507 if (getNode()->hasTagName(captionTag)) | 517 if (getNode()->hasTagName(captionTag)) |
| 508 return CaptionRole; | 518 return CaptionRole; |
| 509 | 519 |
| 510 if (getNode()->hasTagName(figcaptionTag)) | 520 if (getNode()->hasTagName(figcaptionTag)) |
| 511 return FigcaptionRole; | 521 return FigcaptionRole; |
| 512 | 522 |
| (...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2920 return placeholder; | 2930 return placeholder; |
| 2921 } | 2931 } |
| 2922 | 2932 |
| 2923 DEFINE_TRACE(AXNodeObject) | 2933 DEFINE_TRACE(AXNodeObject) |
| 2924 { | 2934 { |
| 2925 visitor->trace(m_node); | 2935 visitor->trace(m_node); |
| 2926 AXObject::trace(visitor); | 2936 AXObject::trace(visitor); |
| 2927 } | 2937 } |
| 2928 | 2938 |
| 2929 } // namespace blink | 2939 } // namespace blink |
| OLD | NEW |