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

Side by Side Diff: content/renderer/accessibility/blink_ax_tree_source.cc

Issue 833373002: Expose attributes max, min, value for meter html tag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/accessibility/blink_ax_tree_source.h" 5 #include "content/renderer/accessibility/blink_ax_tree_source.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 src.containerLiveRegionAtomic()); 400 src.containerLiveRegionAtomic());
401 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, 401 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY,
402 src.containerLiveRegionBusy()); 402 src.containerLiveRegionBusy());
403 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS, 403 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS,
404 UTF16ToUTF8(src.containerLiveRegionStatus())); 404 UTF16ToUTF8(src.containerLiveRegionStatus()));
405 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, 405 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT,
406 UTF16ToUTF8(src.containerLiveRegionRelevant())); 406 UTF16ToUTF8(src.containerLiveRegionRelevant()));
407 } 407 }
408 408
409 if (dst->role == ui::AX_ROLE_PROGRESS_INDICATOR || 409 if (dst->role == ui::AX_ROLE_PROGRESS_INDICATOR ||
410 dst->role == ui::AX_ROLE_METER ||
410 dst->role == ui::AX_ROLE_SCROLL_BAR || 411 dst->role == ui::AX_ROLE_SCROLL_BAR ||
411 dst->role == ui::AX_ROLE_SLIDER || 412 dst->role == ui::AX_ROLE_SLIDER ||
412 dst->role == ui::AX_ROLE_SPIN_BUTTON) { 413 dst->role == ui::AX_ROLE_SPIN_BUTTON) {
413 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange()); 414 dst->AddFloatAttribute(ui::AX_ATTR_VALUE_FOR_RANGE, src.valueForRange());
414 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE, 415 dst->AddFloatAttribute(ui::AX_ATTR_MAX_VALUE_FOR_RANGE,
415 src.maxValueForRange()); 416 src.maxValueForRange());
416 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE, 417 dst->AddFloatAttribute(ui::AX_ATTR_MIN_VALUE_FOR_RANGE,
417 src.minValueForRange()); 418 src.minValueForRange());
418 } 419 }
419 420
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); 570 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst);
570 } 571 }
571 572
572 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 573 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
573 if (render_frame_ && render_frame_->GetWebFrame()) 574 if (render_frame_ && render_frame_->GetWebFrame())
574 return render_frame_->GetWebFrame()->document(); 575 return render_frame_->GetWebFrame()->document();
575 return WebDocument(); 576 return WebDocument();
576 } 577 }
577 578
578 } // namespace content 579 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_android.cc ('k') | content/test/data/accessibility/html/meter.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698