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

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

Issue 1119663002: Making Unicode character names consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment fixes Created 5 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 /* 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 820
821 unsigned unmaskedTextLength = AXNodeObject::text().length(); 821 unsigned unmaskedTextLength = AXNodeObject::text().length();
822 if (!unmaskedTextLength) 822 if (!unmaskedTextLength)
823 return String(); 823 return String();
824 824
825 UChar maskCharacter = 0; 825 UChar maskCharacter = 0;
826 switch (style->textSecurity()) { 826 switch (style->textSecurity()) {
827 case TSNONE: 827 case TSNONE:
828 break; // Fall through to the non-password branch. 828 break; // Fall through to the non-password branch.
829 case TSDISC: 829 case TSDISC:
830 maskCharacter = bullet; 830 maskCharacter = bulletCharacter;
831 break; 831 break;
832 case TSCIRCLE: 832 case TSCIRCLE:
833 maskCharacter = whiteBullet; 833 maskCharacter = whiteBulletCharacter;
834 break; 834 break;
835 case TSSQUARE: 835 case TSSQUARE:
836 maskCharacter = blackSquare; 836 maskCharacter = blackSquareCharacter;
837 break; 837 break;
838 } 838 }
839 if (maskCharacter) { 839 if (maskCharacter) {
840 StringBuilder maskedText; 840 StringBuilder maskedText;
841 maskedText.reserveCapacity(unmaskedTextLength); 841 maskedText.reserveCapacity(unmaskedTextLength);
842 for (unsigned i = 0; i < unmaskedTextLength; ++i) 842 for (unsigned i = 0; i < unmaskedTextLength; ++i)
843 maskedText.append(maskCharacter); 843 maskedText.append(maskCharacter);
844 return maskedText.toString(); 844 return maskedText.toString();
845 } 845 }
846 } 846 }
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 if (label && label->layoutObject()) { 2395 if (label && label->layoutObject()) {
2396 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect(); 2396 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR ect();
2397 result.unite(labelRect); 2397 result.unite(labelRect);
2398 } 2398 }
2399 } 2399 }
2400 2400
2401 return result; 2401 return result;
2402 } 2402 }
2403 2403
2404 } // namespace blink 2404 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698