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

Side by Side Diff: Source/modules/accessibility/AXProgressIndicator.cpp

Issue 1004803004: Add handling to respect role attribute in AXObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 22 matching lines...) Expand all
33 AXProgressIndicator::AXProgressIndicator(LayoutProgress* layoutObject, AXObjectC acheImpl* axObjectCache) 33 AXProgressIndicator::AXProgressIndicator(LayoutProgress* layoutObject, AXObjectC acheImpl* axObjectCache)
34 : AXLayoutObject(layoutObject, axObjectCache) 34 : AXLayoutObject(layoutObject, axObjectCache)
35 { 35 {
36 } 36 }
37 37
38 PassRefPtr<AXProgressIndicator> AXProgressIndicator::create(LayoutProgress* layo utObject, AXObjectCacheImpl* axObjectCache) 38 PassRefPtr<AXProgressIndicator> AXProgressIndicator::create(LayoutProgress* layo utObject, AXObjectCacheImpl* axObjectCache)
39 { 39 {
40 return adoptRef(new AXProgressIndicator(layoutObject, axObjectCache)); 40 return adoptRef(new AXProgressIndicator(layoutObject, axObjectCache));
41 } 41 }
42 42
43 AccessibilityRole AXProgressIndicator::roleValue() const
44 {
45 AccessibilityRole ariaRole = ariaRoleAttribute();
46 if (ariaRole != UnknownRole)
47 return ariaRole;
48 return ProgressIndicatorRole;
49 }
50
43 bool AXProgressIndicator::computeAccessibilityIsIgnored() const 51 bool AXProgressIndicator::computeAccessibilityIsIgnored() const
44 { 52 {
45 return accessibilityIsIgnoredByDefault(); 53 return accessibilityIsIgnoredByDefault();
46 } 54 }
47 55
48 float AXProgressIndicator::valueForRange() const 56 float AXProgressIndicator::valueForRange() const
49 { 57 {
50 if (hasAttribute(aria_valuenowAttr)) 58 if (hasAttribute(aria_valuenowAttr))
51 return getAttribute(aria_valuenowAttr).toFloat(); 59 return getAttribute(aria_valuenowAttr).toFloat();
52 60
(...skipping 19 matching lines...) Expand all
72 return 0.0f; 80 return 0.0f;
73 } 81 }
74 82
75 HTMLProgressElement* AXProgressIndicator::element() const 83 HTMLProgressElement* AXProgressIndicator::element() const
76 { 84 {
77 return toLayoutProgress(m_layoutObject)->progressElement(); 85 return toLayoutProgress(m_layoutObject)->progressElement();
78 } 86 }
79 87
80 88
81 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXProgressIndicator.h ('k') | Source/modules/accessibility/AXSlider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698