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

Unified Diff: Source/modules/accessibility/AXObject.cpp

Issue 730113003: Introduce new API orientation() to expose aria-orientation correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updating condition for TreeGridRole Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/accessibility/AXObject.cpp
diff --git a/Source/modules/accessibility/AXObject.cpp b/Source/modules/accessibility/AXObject.cpp
index b2c04ff7e7d06bc2d06ffbaad22bbcef8be633d5..492d9a3610c92d9f3c1eea72ea6efa187b2dc7a9 100644
--- a/Source/modules/accessibility/AXObject.cpp
+++ b/Source/modules/accessibility/AXObject.cpp
@@ -337,17 +337,10 @@ void AXObject::setLastKnownIsIgnoredValue(bool isIgnored)
m_lastKnownIsIgnoredValue = isIgnored ? IgnoreObject : IncludeObject;
}
-// Lacking concrete evidence of orientation, horizontal means width > height. vertical is height > width;
+// In ARIA 1.1, the default value for aria-orientation changed from horizontal to undefined.
AccessibilityOrientation AXObject::orientation() const
{
- LayoutRect bounds = elementRect();
- if (bounds.size().width() > bounds.size().height())
- return AccessibilityOrientationHorizontal;
- if (bounds.size().height() > bounds.size().width())
- return AccessibilityOrientationVertical;
-
- // A tie goes to horizontal.
- return AccessibilityOrientationHorizontal;
+ return AccessibilityOrientationUndefined;
}
static String queryString(WebLocalizedString::Name name)

Powered by Google App Engine
This is Rietveld 408576698