| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (C) 1999 Lars Knoll (knoll@kde.org) | 2 * (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 static void MakeCapitalized(String* string, UChar previous) { | 105 static void MakeCapitalized(String* string, UChar previous) { |
| 106 if (string->IsNull()) | 106 if (string->IsNull()) |
| 107 return; | 107 return; |
| 108 | 108 |
| 109 unsigned length = string->length(); | 109 unsigned length = string->length(); |
| 110 const StringImpl& input = *string->Impl(); | 110 const StringImpl& input = *string->Impl(); |
| 111 | 111 |
| 112 if (length >= std::numeric_limits<unsigned>::max()) | 112 if (length >= std::numeric_limits<unsigned>::max()) |
| 113 CRASH(); | 113 IMMEDIATE_CRASH(); |
| 114 | 114 |
| 115 StringBuffer<UChar> string_with_previous(length + 1); | 115 StringBuffer<UChar> string_with_previous(length + 1); |
| 116 string_with_previous[0] = | 116 string_with_previous[0] = |
| 117 previous == kNoBreakSpaceCharacter ? kSpaceCharacter : previous; | 117 previous == kNoBreakSpaceCharacter ? kSpaceCharacter : previous; |
| 118 for (unsigned i = 1; i < length + 1; i++) { | 118 for (unsigned i = 1; i < length + 1; i++) { |
| 119 // Replace   with a real space since ICU no longer treats   as a | 119 // Replace   with a real space since ICU no longer treats   as a |
| 120 // word separator. | 120 // word separator. |
| 121 if (input[i - 1] == kNoBreakSpaceCharacter) | 121 if (input[i - 1] == kNoBreakSpaceCharacter) |
| 122 string_with_previous[i] = kSpaceCharacter; | 122 string_with_previous[i] = kSpaceCharacter; |
| 123 else | 123 else |
| (...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 LayoutRect rect = LayoutRect( | 2001 LayoutRect rect = LayoutRect( |
| 2002 IntRect(FirstRunX(), FirstRunY(), lines_box.Width(), lines_box.Height())); | 2002 IntRect(FirstRunX(), FirstRunY(), lines_box.Width(), lines_box.Height())); |
| 2003 LayoutBlock* block = ContainingBlock(); | 2003 LayoutBlock* block = ContainingBlock(); |
| 2004 if (block && HasTextBoxes()) | 2004 if (block && HasTextBoxes()) |
| 2005 block->AdjustChildDebugRect(rect); | 2005 block->AdjustChildDebugRect(rect); |
| 2006 | 2006 |
| 2007 return rect; | 2007 return rect; |
| 2008 } | 2008 } |
| 2009 | 2009 |
| 2010 } // namespace blink | 2010 } // namespace blink |
| OLD | NEW |