| 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 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3623 // For web areas, set the aria-label on the HTML element. | 3623 // For web areas, set the aria-label on the HTML element. |
| 3624 if (isWebArea()) | 3624 if (isWebArea()) |
| 3625 domNode = m_renderer->document()->documentElement(); | 3625 domNode = m_renderer->document()->documentElement(); |
| 3626 else | 3626 else |
| 3627 domNode = m_renderer->node(); | 3627 domNode = m_renderer->node(); |
| 3628 | 3628 |
| 3629 if (domNode && domNode->isElementNode()) | 3629 if (domNode && domNode->isElementNode()) |
| 3630 static_cast<Element*>(domNode)->setAttribute(aria_labelAttr, name); | 3630 static_cast<Element*>(domNode)->setAttribute(aria_labelAttr, name); |
| 3631 } | 3631 } |
| 3632 | 3632 |
| 3633 void AccessibilityRenderObject::updateBackingStore() | |
| 3634 { | |
| 3635 if (!m_renderer) | |
| 3636 return; | |
| 3637 | |
| 3638 // Updating layout may delete m_renderer and this object. | |
| 3639 m_renderer->document()->updateLayoutIgnorePendingStylesheets(); | |
| 3640 } | |
| 3641 | |
| 3642 static bool isLinkable(const AccessibilityRenderObject& object) | 3633 static bool isLinkable(const AccessibilityRenderObject& object) |
| 3643 { | 3634 { |
| 3644 if (!object.renderer()) | 3635 if (!object.renderer()) |
| 3645 return false; | 3636 return false; |
| 3646 | 3637 |
| 3647 // See https://wiki.mozilla.org/Accessibility/AT-Windows-API for the element
s | 3638 // See https://wiki.mozilla.org/Accessibility/AT-Windows-API for the element
s |
| 3648 // Mozilla considers linkable. | 3639 // Mozilla considers linkable. |
| 3649 return object.isLink() || object.isImage() || object.renderer()->isText(); | 3640 return object.isLink() || object.isImage() || object.renderer()->isText(); |
| 3650 } | 3641 } |
| 3651 | 3642 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3757 | 3748 |
| 3758 m_roleForMSAA = msaaRoleForRenderer(m_renderer); | 3749 m_roleForMSAA = msaaRoleForRenderer(m_renderer); |
| 3759 | 3750 |
| 3760 if (m_roleForMSAA == UnknownRole) | 3751 if (m_roleForMSAA == UnknownRole) |
| 3761 m_roleForMSAA = roleValue(); | 3752 m_roleForMSAA = roleValue(); |
| 3762 | 3753 |
| 3763 return m_roleForMSAA; | 3754 return m_roleForMSAA; |
| 3764 } | 3755 } |
| 3765 | 3756 |
| 3766 } // namespace WebCore | 3757 } // namespace WebCore |
| OLD | NEW |