| OLD | NEW |
| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 const ComputedStyle* style = GetLayoutObject()->Style(); | 957 const ComputedStyle* style = GetLayoutObject()->Style(); |
| 958 if (!style) | 958 if (!style) |
| 959 return String(); | 959 return String(); |
| 960 | 960 |
| 961 unsigned unmasked_text_length = AXNodeObject::GetText().length(); | 961 unsigned unmasked_text_length = AXNodeObject::GetText().length(); |
| 962 if (!unmasked_text_length) | 962 if (!unmasked_text_length) |
| 963 return String(); | 963 return String(); |
| 964 | 964 |
| 965 UChar mask_character = 0; | 965 UChar mask_character = 0; |
| 966 switch (style->TextSecurity()) { | 966 switch (style->TextSecurity()) { |
| 967 case TSNONE: | 967 case ETextSecurity::kNone: |
| 968 break; // Fall through to the non-password branch. | 968 break; // Fall through to the non-password branch. |
| 969 case TSDISC: | 969 case ETextSecurity::kDisc: |
| 970 mask_character = kBulletCharacter; | 970 mask_character = kBulletCharacter; |
| 971 break; | 971 break; |
| 972 case TSCIRCLE: | 972 case ETextSecurity::kCircle: |
| 973 mask_character = kWhiteBulletCharacter; | 973 mask_character = kWhiteBulletCharacter; |
| 974 break; | 974 break; |
| 975 case TSSQUARE: | 975 case ETextSecurity::kSquare: |
| 976 mask_character = kBlackSquareCharacter; | 976 mask_character = kBlackSquareCharacter; |
| 977 break; | 977 break; |
| 978 } | 978 } |
| 979 if (mask_character) { | 979 if (mask_character) { |
| 980 StringBuilder masked_text; | 980 StringBuilder masked_text; |
| 981 masked_text.ReserveCapacity(unmasked_text_length); | 981 masked_text.ReserveCapacity(unmasked_text_length); |
| 982 for (unsigned i = 0; i < unmasked_text_length; ++i) | 982 for (unsigned i = 0; i < unmasked_text_length; ++i) |
| 983 masked_text.Append(mask_character); | 983 masked_text.Append(mask_character); |
| 984 return masked_text.ToString(); | 984 return masked_text.ToString(); |
| 985 } | 985 } |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2512 | 2512 |
| 2513 bool AXLayoutObject::ElementAttributeValue( | 2513 bool AXLayoutObject::ElementAttributeValue( |
| 2514 const QualifiedName& attribute_name) const { | 2514 const QualifiedName& attribute_name) const { |
| 2515 if (!layout_object_) | 2515 if (!layout_object_) |
| 2516 return false; | 2516 return false; |
| 2517 | 2517 |
| 2518 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); | 2518 return EqualIgnoringASCIICase(GetAttribute(attribute_name), "true"); |
| 2519 } | 2519 } |
| 2520 | 2520 |
| 2521 } // namespace blink | 2521 } // namespace blink |
| OLD | NEW |