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

Side by Side Diff: third_party/WebKit/Source/platform/text/TextRun.h

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 years, 1 month 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 if (is8Bit()) { 153 if (is8Bit()) {
154 result.setText(data8(startOffset), length); 154 result.setText(data8(startOffset), length);
155 return result; 155 return result;
156 } 156 }
157 result.setText(data16(startOffset), length); 157 result.setText(data16(startOffset), length);
158 return result; 158 return result;
159 } 159 }
160 160
161 UChar operator[](unsigned i) const { 161 UChar operator[](unsigned i) const {
162 ASSERT_WITH_SECURITY_IMPLICATION(i < m_len); 162 SECURITY_DCHECK(i < m_len);
163 return is8Bit() ? m_data.characters8[i] : m_data.characters16[i]; 163 return is8Bit() ? m_data.characters8[i] : m_data.characters16[i];
164 } 164 }
165 const LChar* data8(unsigned i) const { 165 const LChar* data8(unsigned i) const {
166 ASSERT_WITH_SECURITY_IMPLICATION(i < m_len); 166 SECURITY_DCHECK(i < m_len);
167 ASSERT(is8Bit()); 167 ASSERT(is8Bit());
168 return &m_data.characters8[i]; 168 return &m_data.characters8[i];
169 } 169 }
170 const UChar* data16(unsigned i) const { 170 const UChar* data16(unsigned i) const {
171 ASSERT_WITH_SECURITY_IMPLICATION(i < m_len); 171 SECURITY_DCHECK(i < m_len);
172 ASSERT(!is8Bit()); 172 ASSERT(!is8Bit());
173 return &m_data.characters16[i]; 173 return &m_data.characters16[i];
174 } 174 }
175 175
176 const LChar* characters8() const { 176 const LChar* characters8() const {
177 ASSERT(is8Bit()); 177 ASSERT(is8Bit());
178 return m_data.characters8; 178 return m_data.characters8;
179 } 179 }
180 const UChar* characters16() const { 180 const UChar* characters16() const {
181 ASSERT(!is8Bit()); 181 ASSERT(!is8Bit());
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 const TextRun& run; 303 const TextRun& run;
304 unsigned from; 304 unsigned from;
305 unsigned to; 305 unsigned to;
306 FloatRect bounds; 306 FloatRect bounds;
307 sk_sp<SkTextBlob>* cachedTextBlob; 307 sk_sp<SkTextBlob>* cachedTextBlob;
308 }; 308 };
309 309
310 } // namespace blink 310 } // namespace blink
311 #endif 311 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698