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

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

Issue 2234913002: Added support for header and footer inside other sections, according to HTML API Mappings 1.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test expectations. Created 4 years, 4 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
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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 711
712 // text elements that are just empty whitespace should not be returned 712 // text elements that are just empty whitespace should not be returned
713 // FIXME(dmazzoni): we probably shouldn't ignore this if the style is 'p re', or similar... 713 // FIXME(dmazzoni): we probably shouldn't ignore this if the style is 'p re', or similar...
714 if (layoutText->text().impl()->containsOnlyWhitespace()) { 714 if (layoutText->text().impl()->containsOnlyWhitespace()) {
715 if (ignoredReasons) 715 if (ignoredReasons)
716 ignoredReasons->append(IgnoredReason(AXEmptyText)); 716 ignoredReasons->append(IgnoredReason(AXEmptyText));
717 return true; 717 return true;
718 } 718 }
719 return false; 719 return false;
720 } 720 }
721
721 if (isHeading()) 722 if (isHeading())
722 return false; 723 return false;
723 724
724 if (isLandmarkRelated()) 725 if (isLandmarkRelated())
725 return false; 726 return false;
726 727
728 // Header and footer tags may also be exposed as landmark roles but not alwa ys.
729 if (getNode() && (getNode()->hasTagName(headerTag) || getNode()->hasTagName( footerTag)))
730 return false;
731
727 if (isLink()) 732 if (isLink())
728 return false; 733 return false;
729 734
730 // all controls are accessible 735 // all controls are accessible
731 if (isControl()) 736 if (isControl())
732 return false; 737 return false;
733 738
734 if (ariaRoleAttribute() != UnknownRole) 739 if (ariaRoleAttribute() != UnknownRole)
735 return false; 740 return false;
736 741
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 result.unite(labelRect); 2623 result.unite(labelRect);
2619 } 2624 }
2620 } 2625 }
2621 } 2626 }
2622 } 2627 }
2623 2628
2624 return result; 2629 return result;
2625 } 2630 }
2626 2631
2627 } // namespace blink 2632 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698