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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2919443002: Use IMMEDIATE_CRASH() instead of CRASH() directly (Closed)
Patch Set: Use IMMEDIATE_CRASH() instead of CRASH() directly Created 3 years, 6 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 * (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
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 &nbsp with a real space since ICU no longer treats &nbsp as a 119 // Replace &nbsp with a real space since ICU no longer treats &nbsp 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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.h ('k') | third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698