| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 if (ignoredReasons) | 640 if (ignoredReasons) |
| 641 ignoredReasons->append(IgnoredReason(AXAncestorDisallowsChild, treeA
ncestor)); | 641 ignoredReasons->append(IgnoredReason(AXAncestorDisallowsChild, treeA
ncestor)); |
| 642 return true; | 642 return true; |
| 643 } | 643 } |
| 644 | 644 |
| 645 // A LayoutPart is an iframe element or embedded object element or something
like | 645 // A LayoutPart is an iframe element or embedded object element or something
like |
| 646 // that. We don't want to ignore those. | 646 // that. We don't want to ignore those. |
| 647 if (m_layoutObject->isLayoutPart()) | 647 if (m_layoutObject->isLayoutPart()) |
| 648 return false; | 648 return false; |
| 649 | 649 |
| 650 // Make sure renderers with layers stay in the tree. |
| 651 if (getLayoutObject() && getLayoutObject()->hasLayer() && getNode() && getNo
de()->hasChildren()) |
| 652 return false; |
| 653 |
| 650 // find out if this element is inside of a label element. | 654 // find out if this element is inside of a label element. |
| 651 // if so, it may be ignored because it's the label for a checkbox or radio b
utton | 655 // if so, it may be ignored because it's the label for a checkbox or radio b
utton |
| 652 AXObject* controlObject = correspondingControlForLabelElement(); | 656 AXObject* controlObject = correspondingControlForLabelElement(); |
| 653 if (controlObject && controlObject->isCheckboxOrRadio() && controlObject->na
meFromLabelElement()) { | 657 if (controlObject && controlObject->isCheckboxOrRadio() && controlObject->na
meFromLabelElement()) { |
| 654 if (ignoredReasons) { | 658 if (ignoredReasons) { |
| 655 HTMLLabelElement* label = labelElementContainer(); | 659 HTMLLabelElement* label = labelElementContainer(); |
| 656 if (label && label != getNode()) { | 660 if (label && label != getNode()) { |
| 657 AXObject* labelAXObject = axObjectCache().getOrCreate(label); | 661 AXObject* labelAXObject = axObjectCache().getOrCreate(label); |
| 658 ignoredReasons->append(IgnoredReason(AXLabelContainer, labelAXOb
ject)); | 662 ignoredReasons->append(IgnoredReason(AXLabelContainer, labelAXOb
ject)); |
| 659 } | 663 } |
| (...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2567 result.unite(labelRect); | 2571 result.unite(labelRect); |
| 2568 } | 2572 } |
| 2569 } | 2573 } |
| 2570 } | 2574 } |
| 2571 } | 2575 } |
| 2572 | 2576 |
| 2573 return result; | 2577 return result; |
| 2574 } | 2578 } |
| 2575 | 2579 |
| 2576 } // namespace blink | 2580 } // namespace blink |
| OLD | NEW |