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

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

Issue 795363002: Fix live regions on Mac OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 6 years 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 dst->AddBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST, true); 378 dst->AddBoolAttribute(ui::AX_ATTR_IS_AX_TREE_HOST, true);
379 } 379 }
380 } 380 }
381 } 381 }
382 382
383 if (src.isInLiveRegion()) { 383 if (src.isInLiveRegion()) {
384 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_ATOMIC, src.liveRegionAtomic()); 384 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_ATOMIC, src.liveRegionAtomic());
385 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.liveRegionBusy()); 385 dst->AddBoolAttribute(ui::AX_ATTR_LIVE_BUSY, src.liveRegionBusy());
386 if (src.liveRegionBusy()) 386 if (src.liveRegionBusy())
387 dst->state |= (1 << ui::AX_STATE_BUSY); 387 dst->state |= (1 << ui::AX_STATE_BUSY);
388 dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS, 388 if (!src.liveRegionStatus().isEmpty()) {
389 UTF16ToUTF8(src.liveRegionStatus())); 389 dst->AddStringAttribute(ui::AX_ATTR_LIVE_STATUS,
390 UTF16ToUTF8(src.liveRegionStatus()));
391 }
390 dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT, 392 dst->AddStringAttribute(ui::AX_ATTR_LIVE_RELEVANT,
391 UTF16ToUTF8(src.liveRegionRelevant())); 393 UTF16ToUTF8(src.liveRegionRelevant()));
392 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC, 394 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_ATOMIC,
393 src.containerLiveRegionAtomic()); 395 src.containerLiveRegionAtomic());
394 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY, 396 dst->AddBoolAttribute(ui::AX_ATTR_CONTAINER_LIVE_BUSY,
395 src.containerLiveRegionBusy()); 397 src.containerLiveRegionBusy());
396 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS, 398 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_STATUS,
397 UTF16ToUTF8(src.containerLiveRegionStatus())); 399 UTF16ToUTF8(src.containerLiveRegionStatus()));
398 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT, 400 dst->AddStringAttribute(ui::AX_ATTR_CONTAINER_LIVE_RELEVANT,
399 UTF16ToUTF8(src.containerLiveRegionRelevant())); 401 UTF16ToUTF8(src.containerLiveRegionRelevant()));
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst); 564 AddIntListAttributeFromWebObjects(ui::AX_ATTR_OWNS_IDS, owns, dst);
563 } 565 }
564 566
565 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const { 567 blink::WebDocument BlinkAXTreeSource::GetMainDocument() const {
566 if (render_frame_ && render_frame_->GetWebFrame()) 568 if (render_frame_ && render_frame_->GetWebFrame())
567 return render_frame_->GetWebFrame()->document(); 569 return render_frame_->GetWebFrame()->document();
568 return WebDocument(); 570 return WebDocument();
569 } 571 }
570 572
571 } // namespace content 573 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698