Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 2052783002: Accessibility objects with layers shouldn't be ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeVox test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698