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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_auralinux.cc

Issue 2151713002: Less strict checked state changes and introduce disabled state for content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 years, 4 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
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/accessibility/platform/ax_platform_node_auralinux.h" 5 #include "ui/accessibility/platform/ax_platform_node_auralinux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { 436 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
437 uint32_t state = GetData().state; 437 uint32_t state = GetData().state;
438 438
439 if (state & (1 << ui::AX_STATE_CHECKED)) 439 if (state & (1 << ui::AX_STATE_CHECKED))
440 atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED); 440 atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED);
441 if (state & (1 << ui::AX_STATE_DEFAULT)) 441 if (state & (1 << ui::AX_STATE_DEFAULT))
442 atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT); 442 atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT);
443 if (state & (1 << ui::AX_STATE_EDITABLE)) 443 if (state & (1 << ui::AX_STATE_EDITABLE))
444 atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE); 444 atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE);
445 if (state & (1 << ui::AX_STATE_ENABLED)) 445 if (!(state & (1 << ui::AX_STATE_DISABLED)))
446 atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED); 446 atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED);
447 if (state & (1 << ui::AX_STATE_EXPANDED)) 447 if (state & (1 << ui::AX_STATE_EXPANDED))
448 atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED); 448 atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED);
449 if (state & (1 << ui::AX_STATE_FOCUSABLE)) 449 if (state & (1 << ui::AX_STATE_FOCUSABLE))
450 atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE); 450 atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE);
451 if (state & (1 << ui::AX_STATE_PRESSED)) 451 if (state & (1 << ui::AX_STATE_PRESSED))
452 atk_state_set_add_state(atk_state_set, ATK_STATE_PRESSED); 452 atk_state_set_add_state(atk_state_set, ATK_STATE_PRESSED);
453 if (state & (1 << ui::AX_STATE_SELECTABLE)) 453 if (state & (1 << ui::AX_STATE_SELECTABLE))
454 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE); 454 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE);
455 if (state & (1 << ui::AX_STATE_SELECTED)) 455 if (state & (1 << ui::AX_STATE_SELECTED))
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 529
530 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { 530 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) {
531 gfx::Rect rect_size = GetData().location; 531 gfx::Rect rect_size = GetData().location;
532 if (width) 532 if (width)
533 *width = rect_size.width(); 533 *width = rect_size.width();
534 if (height) 534 if (height)
535 *height = rect_size.height(); 535 *height = rect_size.height();
536 } 536 }
537 537
538 } // namespace ui 538 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698