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

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

Issue 2006043002: Improved the reporting of background color information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added blank line to test expectations. 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 | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('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, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 { 505 {
506 if (isDetached()) 506 if (isDetached())
507 return; 507 return;
508 508
509 AXObjectCacheImpl& cache = axObjectCache(); 509 AXObjectCacheImpl& cache = axObjectCache();
510 510
511 if (cache.modificationCount() == m_lastModificationCount) 511 if (cache.modificationCount() == m_lastModificationCount)
512 return; 512 return;
513 513
514 m_lastModificationCount = cache.modificationCount(); 514 m_lastModificationCount = cache.modificationCount();
515 m_cachedBackgroundColor = computeBackgroundColor();
515 m_cachedIsInertOrAriaHidden = computeIsInertOrAriaHidden(); 516 m_cachedIsInertOrAriaHidden = computeIsInertOrAriaHidden();
516 m_cachedIsDescendantOfLeafNode = (leafNodeAncestor() != 0); 517 m_cachedIsDescendantOfLeafNode = (leafNodeAncestor() != 0);
517 m_cachedIsDescendantOfDisabledNode = (disabledAncestor() != 0); 518 m_cachedIsDescendantOfDisabledNode = (disabledAncestor() != 0);
518 m_cachedHasInheritedPresentationalRole = (inheritsPresentationalRoleFrom() ! = 0); 519 m_cachedHasInheritedPresentationalRole = (inheritsPresentationalRoleFrom() ! = 0);
519 m_cachedIsPresentationalChild = (ancestorForWhichThisIsAPresentationalChild( ) != 0); 520 m_cachedIsPresentationalChild = (ancestorForWhichThisIsAPresentationalChild( ) != 0);
520 m_cachedIsIgnored = computeAccessibilityIsIgnored(); 521 m_cachedIsIgnored = computeAccessibilityIsIgnored();
521 m_cachedLiveRegionRoot = isLiveRegion() ? 522 m_cachedLiveRegionRoot = isLiveRegion() ?
522 this : 523 this :
523 (parentObjectIfExists() ? parentObjectIfExists()->liveRegionRoot() : 0); 524 (parentObjectIfExists() ? parentObjectIfExists()->liveRegionRoot() : 0);
524 m_cachedAncestorExposesActiveDescendant = computeAncestorExposesActiveDescen dant(); 525 m_cachedAncestorExposesActiveDescendant = computeAncestorExposesActiveDescen dant();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 } 918 }
918 919
919 String AXObject::textFromAriaDescribedby(AXRelatedObjectVector* relatedObjects) const 920 String AXObject::textFromAriaDescribedby(AXRelatedObjectVector* relatedObjects) const
920 { 921 {
921 AXObjectSet visited; 922 AXObjectSet visited;
922 HeapVector<Member<Element>> elements; 923 HeapVector<Member<Element>> elements;
923 elementsFromAttribute(elements, aria_describedbyAttr); 924 elementsFromAttribute(elements, aria_describedbyAttr);
924 return textFromElements(true, visited, elements, relatedObjects); 925 return textFromElements(true, visited, elements, relatedObjects);
925 } 926 }
926 927
928 RGBA32 AXObject::backgroundColor() const
929 {
930 updateCachedAttributeValuesIfNeeded();
931 return m_cachedBackgroundColor;
932 }
933
927 AccessibilityOrientation AXObject::orientation() const 934 AccessibilityOrientation AXObject::orientation() const
928 { 935 {
929 // In ARIA 1.1, the default value for aria-orientation changed from 936 // In ARIA 1.1, the default value for aria-orientation changed from
930 // horizontal to undefined. 937 // horizontal to undefined.
931 return AccessibilityOrientationUndefined; 938 return AccessibilityOrientationUndefined;
932 } 939 }
933 940
934 static String queryString(WebLocalizedString::Name name) 941 static String queryString(WebLocalizedString::Name name)
935 { 942 {
936 return Locale::defaultLocale().queryString(name); 943 return Locale::defaultLocale().queryString(name);
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 1738
1732 DEFINE_TRACE(AXObject) 1739 DEFINE_TRACE(AXObject)
1733 { 1740 {
1734 visitor->trace(m_children); 1741 visitor->trace(m_children);
1735 visitor->trace(m_parent); 1742 visitor->trace(m_parent);
1736 visitor->trace(m_cachedLiveRegionRoot); 1743 visitor->trace(m_cachedLiveRegionRoot);
1737 visitor->trace(m_axObjectCache); 1744 visitor->trace(m_axObjectCache);
1738 } 1745 }
1739 1746
1740 } // namespace blink 1747 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698