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

Side by Side Diff: content/browser/accessibility/browser_accessibility_auralinux.cc

Issue 2833843005: Handling of different types of empty alt (Closed)
Patch Set: Ready to land Created 3 years, 7 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/accessibility/browser_accessibility_auralinux.h" 5 #include "content/browser/accessibility/browser_accessibility_auralinux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 return ToBrowserAccessibilityAuraLinux(BROWSER_ACCESSIBILITY(atk_object)); 465 return ToBrowserAccessibilityAuraLinux(BROWSER_ACCESSIBILITY(atk_object));
466 } 466 }
467 467
468 static const gchar* browser_accessibility_get_name(AtkObject* atk_object) { 468 static const gchar* browser_accessibility_get_name(AtkObject* atk_object) {
469 BrowserAccessibilityAuraLinux* obj = 469 BrowserAccessibilityAuraLinux* obj =
470 ToBrowserAccessibilityAuraLinux(atk_object); 470 ToBrowserAccessibilityAuraLinux(atk_object);
471 if (!obj) 471 if (!obj)
472 return NULL; 472 return NULL;
473 473
474 if (obj->GetStringAttribute(ui::AX_ATTR_NAME).empty() &&
475 !obj->HasExplicitlyEmptyName())
476 return NULL;
477
474 return obj->GetStringAttribute(ui::AX_ATTR_NAME).c_str(); 478 return obj->GetStringAttribute(ui::AX_ATTR_NAME).c_str();
475 } 479 }
476 480
477 static const gchar* browser_accessibility_get_description( 481 static const gchar* browser_accessibility_get_description(
478 AtkObject* atk_object) { 482 AtkObject* atk_object) {
479 BrowserAccessibilityAuraLinux* obj = 483 BrowserAccessibilityAuraLinux* obj =
480 ToBrowserAccessibilityAuraLinux(atk_object); 484 ToBrowserAccessibilityAuraLinux(atk_object);
481 if (!obj) 485 if (!obj)
482 return NULL; 486 return NULL;
483 487
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 atk_role_ = ATK_ROLE_SECTION; 968 atk_role_ = ATK_ROLE_SECTION;
965 #endif 969 #endif
966 break; 970 break;
967 default: 971 default:
968 atk_role_ = ATK_ROLE_UNKNOWN; 972 atk_role_ = ATK_ROLE_UNKNOWN;
969 break; 973 break;
970 } 974 }
971 } 975 }
972 976
973 } // namespace content 977 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698