| 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 if (ignoredReasons) | 575 if (ignoredReasons) |
| 576 ignoredReasons->append(IgnoredReason(AXAncestorDisallowsChild, treeA
ncestor)); | 576 ignoredReasons->append(IgnoredReason(AXAncestorDisallowsChild, treeA
ncestor)); |
| 577 return true; | 577 return true; |
| 578 } | 578 } |
| 579 | 579 |
| 580 // A LayoutPart is an iframe element or embedded object element or something
like | 580 // A LayoutPart is an iframe element or embedded object element or something
like |
| 581 // that. We don't want to ignore those. | 581 // that. We don't want to ignore those. |
| 582 if (m_layoutObject->isLayoutPart()) | 582 if (m_layoutObject->isLayoutPart()) |
| 583 return false; | 583 return false; |
| 584 | 584 |
| 585 // Make sure renderers with layers stay in the tree. |
| 586 if (getLayoutObject() && getLayoutObject()->hasLayer() && getNode() && getNo
de()->hasChildren()) |
| 587 return false; |
| 588 |
| 585 // find out if this element is inside of a label element. | 589 // find out if this element is inside of a label element. |
| 586 // if so, it may be ignored because it's the label for a checkbox or radio b
utton | 590 // if so, it may be ignored because it's the label for a checkbox or radio b
utton |
| 587 AXObject* controlObject = correspondingControlForLabelElement(); | 591 AXObject* controlObject = correspondingControlForLabelElement(); |
| 588 if (controlObject && controlObject->isCheckboxOrRadio() && controlObject->na
meFromLabelElement()) { | 592 if (controlObject && controlObject->isCheckboxOrRadio() && controlObject->na
meFromLabelElement()) { |
| 589 if (ignoredReasons) { | 593 if (ignoredReasons) { |
| 590 HTMLLabelElement* label = labelElementContainer(); | 594 HTMLLabelElement* label = labelElementContainer(); |
| 591 if (label && label != getNode()) { | 595 if (label && label != getNode()) { |
| 592 AXObject* labelAXObject = axObjectCache().getOrCreate(label); | 596 AXObject* labelAXObject = axObjectCache().getOrCreate(label); |
| 593 ignoredReasons->append(IgnoredReason(AXLabelContainer, labelAXOb
ject)); | 597 ignoredReasons->append(IgnoredReason(AXLabelContainer, labelAXOb
ject)); |
| 594 } | 598 } |
| (...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2502 result.unite(labelRect); | 2506 result.unite(labelRect); |
| 2503 } | 2507 } |
| 2504 } | 2508 } |
| 2505 } | 2509 } |
| 2506 } | 2510 } |
| 2507 | 2511 |
| 2508 return result; | 2512 return result; |
| 2509 } | 2513 } |
| 2510 | 2514 |
| 2511 } // namespace blink | 2515 } // namespace blink |
| OLD | NEW |