| 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 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 | 1613 |
| 1614 // Check if the HTML element has an aria-label for the webpage. | 1614 // Check if the HTML element has an aria-label for the webpage. |
| 1615 if (Element* documentElement = document->documentElement()) { | 1615 if (Element* documentElement = document->documentElement()) { |
| 1616 const AtomicString& ariaLabel = documentElement->getAttribute(aria_label
Attr); | 1616 const AtomicString& ariaLabel = documentElement->getAttribute(aria_label
Attr); |
| 1617 if (!ariaLabel.isEmpty()) | 1617 if (!ariaLabel.isEmpty()) |
| 1618 return ariaLabel; | 1618 return ariaLabel; |
| 1619 } | 1619 } |
| 1620 | 1620 |
| 1621 Node* owner = document->ownerElement(); | 1621 Node* owner = document->ownerElement(); |
| 1622 if (owner) { | 1622 if (owner) { |
| 1623 if (isHTMLFrameElement(*owner) || isHTMLIFrameElement(*owner)) { | 1623 if (isHTMLFrameElementBase(*owner)) { |
| 1624 const AtomicString& title = toElement(owner)->getAttribute(titleAttr
); | 1624 const AtomicString& title = toElement(owner)->getAttribute(titleAttr
); |
| 1625 if (!title.isEmpty()) | 1625 if (!title.isEmpty()) |
| 1626 return title; | 1626 return title; |
| 1627 return toElement(owner)->getNameAttribute(); | 1627 return toElement(owner)->getNameAttribute(); |
| 1628 } | 1628 } |
| 1629 if (owner->isHTMLElement()) | 1629 if (owner->isHTMLElement()) |
| 1630 return toHTMLElement(owner)->getNameAttribute(); | 1630 return toHTMLElement(owner)->getNameAttribute(); |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 String documentTitle = document->title(); | 1633 String documentTitle = document->title(); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1789 useTextUnderElement = true; | 1789 useTextUnderElement = true; |
| 1790 | 1790 |
| 1791 if (useTextUnderElement) { | 1791 if (useTextUnderElement) { |
| 1792 String text = textUnderElement(); | 1792 String text = textUnderElement(); |
| 1793 if (!text.isEmpty()) | 1793 if (!text.isEmpty()) |
| 1794 textOrder.append(AccessibilityText(text, ChildrenText)); | 1794 textOrder.append(AccessibilityText(text, ChildrenText)); |
| 1795 } | 1795 } |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 } // namespace WebCore | 1798 } // namespace WebCore |
| OLD | NEW |