1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @fileoverview A JavaScript class for walking the leaf nodes of the dom.
10 goog
.provide('cvox.ObjectWalker');
12 goog
.require('cvox.AbstractNodeWalker');
13 goog
.require('cvox.BrailleUtil');
14 goog
.require('cvox.DescriptionUtil');
18 * @extends {cvox.AbstractNodeWalker}
20 cvox
.ObjectWalker = function() {
23 goog
.inherits(cvox
.ObjectWalker
, cvox
.AbstractNodeWalker
);
28 cvox
.ObjectWalker
.prototype.stopNodeDescent = function(node
) {
29 return cvox
.DomUtil
.isLeafNode(node
);
32 // TODO(dtseng): Causes a circular dependency if put into AbstractNodeWalker.
36 cvox
.AbstractNodeWalker
.prototype.getDescription = function(prevSel
, sel
) {
37 return cvox
.DescriptionUtil
.getDescriptionFromNavigation(
41 cvox
.ChromeVox
.verbosity
);
47 cvox
.ObjectWalker
.prototype.getBraille = function(prevSel
, sel
) {
48 throw 'getBraille is unsupported';
54 cvox
.ObjectWalker
.prototype.getGranularityMsg = function() {
55 return cvox
.ChromeVox
.msgs
.getMsg('object_strategy');