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

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

Issue 1016293002: Revert of Return the accessible selection bounds in password fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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 /* 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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 1653
1654 // 1654 //
1655 // Selected text. 1655 // Selected text.
1656 // 1656 //
1657 1657
1658 AXObject::PlainTextRange AXLayoutObject::selectedTextRange() const 1658 AXObject::PlainTextRange AXLayoutObject::selectedTextRange() const
1659 { 1659 {
1660 if (!isTextControl()) 1660 if (!isTextControl())
1661 return PlainTextRange(); 1661 return PlainTextRange();
1662 1662
1663 if (isPasswordFieldAndShouldHideValue())
1664 return PlainTextRange();
1665
1663 AccessibilityRole ariaRole = ariaRoleAttribute(); 1666 AccessibilityRole ariaRole = ariaRoleAttribute();
1664 if (isNativeTextControl() && ariaRole == UnknownRole && m_layoutObject->isTe xtControl()) { 1667 if (isNativeTextControl() && ariaRole == UnknownRole && m_layoutObject->isTe xtControl()) {
1665 HTMLTextFormControlElement* textControl = toLayoutTextControl(m_layoutOb ject)->textFormControlElement(); 1668 HTMLTextFormControlElement* textControl = toLayoutTextControl(m_layoutOb ject)->textFormControlElement();
1666 return PlainTextRange(textControl->selectionStart(), textControl->select ionEnd() - textControl->selectionStart()); 1669 return PlainTextRange(textControl->selectionStart(), textControl->select ionEnd() - textControl->selectionStart());
1667 } 1670 }
1668 1671
1669 if (ariaRole == UnknownRole) 1672 if (ariaRole == UnknownRole)
1670 return PlainTextRange(); 1673 return PlainTextRange();
1671 1674
1672 return ariaSelectedTextRange(); 1675 return ariaSelectedTextRange();
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 if (label && label->layoutObject()) { 2408 if (label && label->layoutObject()) {
2406 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2409 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2407 result.unite(labelRect); 2410 result.unite(labelRect);
2408 } 2411 }
2409 } 2412 }
2410 2413
2411 return result; 2414 return result;
2412 } 2415 }
2413 2416
2414 } // namespace blink 2417 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/input-type-password-selection-expected.txt ('k') | Source/modules/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698