| 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, 2008, 2009 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 } | 217 } |
| 218 | 218 |
| 219 inline UChar RenderText::characterAt(unsigned i) const | 219 inline UChar RenderText::characterAt(unsigned i) const |
| 220 { | 220 { |
| 221 if (i >= textLength()) | 221 if (i >= textLength()) |
| 222 return 0; | 222 return 0; |
| 223 | 223 |
| 224 return uncheckedCharacterAt(i); | 224 return uncheckedCharacterAt(i); |
| 225 } | 225 } |
| 226 | 226 |
| 227 inline RenderText* toRenderText(RenderObject* object) | 227 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderText, isText()); |
| 228 { | |
| 229 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isText()); | |
| 230 return static_cast<RenderText*>(object); | |
| 231 } | |
| 232 | |
| 233 inline const RenderText* toRenderText(const RenderObject* object) | |
| 234 { | |
| 235 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isText()); | |
| 236 return static_cast<const RenderText*>(object); | |
| 237 } | |
| 238 | |
| 239 // This will catch anyone doing an unnecessary cast. | |
| 240 void toRenderText(const RenderText*); | |
| 241 | 228 |
| 242 #ifdef NDEBUG | 229 #ifdef NDEBUG |
| 243 inline void RenderText::checkConsistency() const | 230 inline void RenderText::checkConsistency() const |
| 244 { | 231 { |
| 245 } | 232 } |
| 246 #endif | 233 #endif |
| 247 | 234 |
| 248 void applyTextTransform(const RenderStyle*, String&, UChar); | 235 void applyTextTransform(const RenderStyle*, String&, UChar); |
| 249 | 236 |
| 250 } // namespace WebCore | 237 } // namespace WebCore |
| 251 | 238 |
| 252 #endif // RenderText_h | 239 #endif // RenderText_h |
| OLD | NEW |