| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 StringBuilder result; | 131 StringBuilder result; |
| 132 result.append('"'); | 132 result.append('"'); |
| 133 for (unsigned i = 0; i != s.length(); ++i) { | 133 for (unsigned i = 0; i != s.length(); ++i) { |
| 134 UChar c = s[i]; | 134 UChar c = s[i]; |
| 135 if (c == '\\') { | 135 if (c == '\\') { |
| 136 result.append('\\'); | 136 result.append('\\'); |
| 137 result.append('\\'); | 137 result.append('\\'); |
| 138 } else if (c == '"') { | 138 } else if (c == '"') { |
| 139 result.append('\\'); | 139 result.append('\\'); |
| 140 result.append('"'); | 140 result.append('"'); |
| 141 } else if (c == '\n' || c == noBreakSpace) { | 141 } else if (c == '\n' || c == noBreakSpaceCharacter) { |
| 142 result.append(' '); | 142 result.append(' '); |
| 143 } else { | 143 } else { |
| 144 if (c >= 0x20 && c < 0x7F) { | 144 if (c >= 0x20 && c < 0x7F) { |
| 145 result.append(c); | 145 result.append(c); |
| 146 } else { | 146 } else { |
| 147 result.append('\\'); | 147 result.append('\\'); |
| 148 result.append('x'); | 148 result.append('x'); |
| 149 result.append('{'); | 149 result.append('{'); |
| 150 appendUnsignedAsHex(c, result); | 150 appendUnsignedAsHex(c, result); |
| 151 result.append('}'); | 151 result.append('}'); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| 328 if (o.isListMarker()) { | 328 if (o.isListMarker()) { |
| 329 String text = toLayoutListMarker(o).text(); | 329 String text = toLayoutListMarker(o).text(); |
| 330 if (!text.isEmpty()) { | 330 if (!text.isEmpty()) { |
| 331 if (text.length() != 1) { | 331 if (text.length() != 1) { |
| 332 text = quoteAndEscapeNonPrintables(text); | 332 text = quoteAndEscapeNonPrintables(text); |
| 333 } else { | 333 } else { |
| 334 switch (text[0]) { | 334 switch (text[0]) { |
| 335 case bullet: | 335 case bulletCharacter: |
| 336 text = "bullet"; | 336 text = "bullet"; |
| 337 break; | 337 break; |
| 338 case blackSquare: | 338 case blackSquareCharacter: |
| 339 text = "black square"; | 339 text = "black square"; |
| 340 break; | 340 break; |
| 341 case whiteBullet: | 341 case whiteBulletCharacter: |
| 342 text = "white bullet"; | 342 text = "white bullet"; |
| 343 break; | 343 break; |
| 344 default: | 344 default: |
| 345 text = quoteAndEscapeNonPrintables(text); | 345 text = quoteAndEscapeNonPrintables(text); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 ts << ": " << text; | 348 ts << ": " << text; |
| 349 } | 349 } |
| 350 } | 350 } |
| 351 | 351 |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 element->document().updateLayout(); | 780 element->document().updateLayout(); |
| 781 | 781 |
| 782 LayoutObject* layoutObject = element->layoutObject(); | 782 LayoutObject* layoutObject = element->layoutObject(); |
| 783 if (!layoutObject || !layoutObject->isListItem()) | 783 if (!layoutObject || !layoutObject->isListItem()) |
| 784 return String(); | 784 return String(); |
| 785 | 785 |
| 786 return toLayoutListItem(layoutObject)->markerText(); | 786 return toLayoutListItem(layoutObject)->markerText(); |
| 787 } | 787 } |
| 788 | 788 |
| 789 } // namespace blink | 789 } // namespace blink |
| OLD | NEW |