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

Side by Side Diff: Source/modules/accessibility/AXLayoutObject.cpp

Issue 1047253003: Revert of Expose multiline attribute from blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 // static text beneath MenuItems and MenuButtons are just reported along with the menu item, so it's ignored on an individual level 595 // static text beneath MenuItems and MenuButtons are just reported along with the menu item, so it's ignored on an individual level
596 AXObject* parent = parentObjectUnignored(); 596 AXObject* parent = parentObjectUnignored();
597 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar iaRoleAttribute() == MenuButtonRole)) 597 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || parent->ar iaRoleAttribute() == MenuButtonRole))
598 return true; 598 return true;
599 LayoutText* layoutText = toLayoutText(m_layoutObject); 599 LayoutText* layoutText = toLayoutText(m_layoutObject);
600 if (m_layoutObject->isBR() || !layoutText->firstTextBox()) 600 if (m_layoutObject->isBR() || !layoutText->firstTextBox())
601 return true; 601 return true;
602 602
603 // Don't ignore static text in editable text controls. 603 // Don't ignore static text in editable text controls.
604 for (AXObject* parent = parentObject(); parent; parent = parent->parentO bject()) { 604 for (AXObject* parent = parentObject(); parent; parent = parent->parentO bject()) {
605 if (parent->roleValue() == TextFieldRole) 605 if (parent->roleValue() == TextFieldRole || parent->roleValue() == T extAreaRole)
606 return false; 606 return false;
607 } 607 }
608 608
609 // text elements that are just empty whitespace should not be returned 609 // text elements that are just empty whitespace should not be returned
610 // FIXME(dmazzoni): we probably shouldn't ignore this if the style is 'p re', or similar... 610 // FIXME(dmazzoni): we probably shouldn't ignore this if the style is 'p re', or similar...
611 return layoutText->text().impl()->containsOnlyWhitespace(); 611 return layoutText->text().impl()->containsOnlyWhitespace();
612 } 612 }
613 613
614 if (isHeading()) 614 if (isHeading())
615 return false; 615 return false;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 return Locale::defaultLocale().queryString(name); 897 return Locale::defaultLocale().queryString(name);
898 } 898 }
899 899
900 String AXLayoutObject::actionVerb() const 900 String AXLayoutObject::actionVerb() const
901 { 901 {
902 switch (roleValue()) { 902 switch (roleValue()) {
903 case ButtonRole: 903 case ButtonRole:
904 case ToggleButtonRole: 904 case ToggleButtonRole:
905 return queryString(WebLocalizedString::AXButtonActionVerb); 905 return queryString(WebLocalizedString::AXButtonActionVerb);
906 case TextFieldRole: 906 case TextFieldRole:
907 case TextAreaRole:
907 return queryString(WebLocalizedString::AXTextFieldActionVerb); 908 return queryString(WebLocalizedString::AXTextFieldActionVerb);
908 case RadioButtonRole: 909 case RadioButtonRole:
909 return queryString(WebLocalizedString::AXRadioButtonActionVerb); 910 return queryString(WebLocalizedString::AXRadioButtonActionVerb);
910 case CheckBoxRole: 911 case CheckBoxRole:
911 case SwitchRole: 912 case SwitchRole:
912 return queryString(isChecked() ? WebLocalizedString::AXCheckedCheckBoxAc tionVerb : WebLocalizedString::AXUncheckedCheckBoxActionVerb); 913 return queryString(isChecked() ? WebLocalizedString::AXCheckedCheckBoxAc tionVerb : WebLocalizedString::AXUncheckedCheckBoxActionVerb);
913 case LinkRole: 914 case LinkRole:
914 return queryString(WebLocalizedString::AXLinkActionVerb); 915 return queryString(WebLocalizedString::AXLinkActionVerb);
915 default: 916 default:
916 return emptyString(); 917 return emptyString();
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 if (label && label->layoutObject()) { 2367 if (label && label->layoutObject()) {
2367 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2368 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2368 result.unite(labelRect); 2369 result.unite(labelRect);
2369 } 2370 }
2370 } 2371 }
2371 2372
2372 return result; 2373 return result;
2373 } 2374 }
2374 2375
2375 } // namespace blink 2376 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698