| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 | 607 |
| 608 if (m_layoutObject->isText()) { | 608 if (m_layoutObject->isText()) { |
| 609 // static text beneath MenuItems and MenuButtons are just reported along
with the menu item, so it's ignored on an individual level | 609 // static text beneath MenuItems and MenuButtons are just reported along
with the menu item, so it's ignored on an individual level |
| 610 AXObject* parent = parentObjectUnignored(); | 610 AXObject* parent = parentObjectUnignored(); |
| 611 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar
iaRoleAttribute() == MenuButtonRole)) { | 611 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar
iaRoleAttribute() == MenuButtonRole)) { |
| 612 if (ignoredReasons) | 612 if (ignoredReasons) |
| 613 ignoredReasons->append(IgnoredReason(AXStaticTextUsedAsNameFor,
parent)); | 613 ignoredReasons->append(IgnoredReason(AXStaticTextUsedAsNameFor,
parent)); |
| 614 return true; | 614 return true; |
| 615 } | 615 } |
| 616 LayoutText* layoutText = toLayoutText(m_layoutObject); | 616 LayoutText* layoutText = toLayoutText(m_layoutObject); |
| 617 if (!layoutText->firstTextBox()) { | 617 if (!layoutText->hasTextBoxes()) { |
| 618 if (ignoredReasons) | 618 if (ignoredReasons) |
| 619 ignoredReasons->append(IgnoredReason(AXEmptyText)); | 619 ignoredReasons->append(IgnoredReason(AXEmptyText)); |
| 620 return true; | 620 return true; |
| 621 } | 621 } |
| 622 | 622 |
| 623 // Don't ignore static text in editable text controls. | 623 // Don't ignore static text in editable text controls. |
| 624 for (AXObject* parent = parentObject(); parent; parent = parent->parentO
bject()) { | 624 for (AXObject* parent = parentObject(); parent; parent = parent->parentO
bject()) { |
| 625 if (parent->roleValue() == TextFieldRole) | 625 if (parent->roleValue() == TextFieldRole) |
| 626 return false; | 626 return false; |
| 627 } | 627 } |
| (...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2635 if (label && label->layoutObject()) { | 2635 if (label && label->layoutObject()) { |
| 2636 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2636 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2637 result.unite(labelRect); | 2637 result.unite(labelRect); |
| 2638 } | 2638 } |
| 2639 } | 2639 } |
| 2640 | 2640 |
| 2641 return result; | 2641 return result; |
| 2642 } | 2642 } |
| 2643 | 2643 |
| 2644 } // namespace blink | 2644 } // namespace blink |
| OLD | NEW |