| 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 21 matching lines...) Expand all Loading... |
| 32 #include "core/accessibility/AXObjectCache.h" | 32 #include "core/accessibility/AXObjectCache.h" |
| 33 #include "core/accessibility/AccessibilityImageMapLink.h" | 33 #include "core/accessibility/AccessibilityImageMapLink.h" |
| 34 #include "core/accessibility/AccessibilitySVGRoot.h" | 34 #include "core/accessibility/AccessibilitySVGRoot.h" |
| 35 #include "core/accessibility/AccessibilitySpinButton.h" | 35 #include "core/accessibility/AccessibilitySpinButton.h" |
| 36 #include "core/accessibility/AccessibilityTable.h" | 36 #include "core/accessibility/AccessibilityTable.h" |
| 37 #include "core/dom/NodeTraversal.h" | 37 #include "core/dom/NodeTraversal.h" |
| 38 #include "core/editing/FrameSelection.h" | 38 #include "core/editing/FrameSelection.h" |
| 39 #include "core/editing/RenderedPosition.h" | 39 #include "core/editing/RenderedPosition.h" |
| 40 #include "core/editing/VisibleUnits.h" | 40 #include "core/editing/VisibleUnits.h" |
| 41 #include "core/editing/htmlediting.h" | 41 #include "core/editing/htmlediting.h" |
| 42 #include "core/html/HTMLHtmlElement.h" |
| 42 #include "core/html/HTMLImageElement.h" | 43 #include "core/html/HTMLImageElement.h" |
| 43 #include "core/html/HTMLLabelElement.h" | 44 #include "core/html/HTMLLabelElement.h" |
| 44 #include "core/html/HTMLOptionElement.h" | 45 #include "core/html/HTMLOptionElement.h" |
| 45 #include "core/html/HTMLSelectElement.h" | 46 #include "core/html/HTMLSelectElement.h" |
| 46 #include "core/html/HTMLTextAreaElement.h" | 47 #include "core/html/HTMLTextAreaElement.h" |
| 47 #include "core/loader/ProgressTracker.h" | 48 #include "core/loader/ProgressTracker.h" |
| 48 #include "core/page/Page.h" | 49 #include "core/page/Page.h" |
| 49 #include "core/platform/LocalizedStrings.h" | 50 #include "core/platform/LocalizedStrings.h" |
| 50 #include "core/rendering/HitTestResult.h" | 51 #include "core/rendering/HitTestResult.h" |
| 51 #include "core/rendering/RenderFieldset.h" | 52 #include "core/rendering/RenderFieldset.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 if (node && node->hasTagName(asideTag)) | 426 if (node && node->hasTagName(asideTag)) |
| 426 return LandmarkComplementaryRole; | 427 return LandmarkComplementaryRole; |
| 427 | 428 |
| 428 if (node && node->hasTagName(sectionTag)) | 429 if (node && node->hasTagName(sectionTag)) |
| 429 return DocumentRegionRole; | 430 return DocumentRegionRole; |
| 430 | 431 |
| 431 if (node && node->hasTagName(addressTag)) | 432 if (node && node->hasTagName(addressTag)) |
| 432 return LandmarkContentInfoRole; | 433 return LandmarkContentInfoRole; |
| 433 | 434 |
| 434 // The HTML element should not be exposed as an element. That's what the Ren
derView element does. | 435 // The HTML element should not be exposed as an element. That's what the Ren
derView element does. |
| 435 if (node && node->hasTagName(htmlTag)) | 436 if (node && isHTMLHtmlElement(node)) |
| 436 return IgnoredRole; | 437 return IgnoredRole; |
| 437 | 438 |
| 438 // There should only be one banner/contentInfo per page. If header/footer ar
e being used within an article or section | 439 // There should only be one banner/contentInfo per page. If header/footer ar
e being used within an article or section |
| 439 // then it should not be exposed as whole page's banner/contentInfo | 440 // then it should not be exposed as whole page's banner/contentInfo |
| 440 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl
eTag) && !isDescendantOfElementType(sectionTag)) | 441 if (node && node->hasTagName(headerTag) && !isDescendantOfElementType(articl
eTag) && !isDescendantOfElementType(sectionTag)) |
| 441 return LandmarkBannerRole; | 442 return LandmarkBannerRole; |
| 442 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl
eTag) && !isDescendantOfElementType(sectionTag)) | 443 if (node && node->hasTagName(footerTag) && !isDescendantOfElementType(articl
eTag) && !isDescendantOfElementType(sectionTag)) |
| 443 return FooterRole; | 444 return FooterRole; |
| 444 | 445 |
| 445 if (m_renderer->isBlockFlow()) | 446 if (m_renderer->isBlockFlow()) |
| (...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2512 if (label && label->renderer()) { | 2513 if (label && label->renderer()) { |
| 2513 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2514 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2514 result.unite(labelRect); | 2515 result.unite(labelRect); |
| 2515 } | 2516 } |
| 2516 } | 2517 } |
| 2517 | 2518 |
| 2518 return result; | 2519 return result; |
| 2519 } | 2520 } |
| 2520 | 2521 |
| 2521 } // namespace WebCore | 2522 } // namespace WebCore |
| OLD | NEW |