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-2009, 2013 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004-2009, 2013 Apple Inc. All rights reserved. |
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 HashSet<const SimpleFontData*>* fallback_fonts, | 278 HashSet<const SimpleFontData*>* fallback_fonts, |
279 FloatRect* glyph_bounds_accumulation) const; | 279 FloatRect* glyph_bounds_accumulation) const; |
280 | 280 |
281 void SecureText(UChar mask); | 281 void SecureText(UChar mask); |
282 | 282 |
283 bool IsText() const = | 283 bool IsText() const = |
284 delete; // This will catch anyone doing an unnecessary check. | 284 delete; // This will catch anyone doing an unnecessary check. |
285 | 285 |
286 LayoutRect LocalVisualRect() const override; | 286 LayoutRect LocalVisualRect() const override; |
287 | 287 |
288 void CheckConsistency() const; | |
289 | |
290 // We put the bitfield first to minimize padding on 64-bit. | 288 // We put the bitfield first to minimize padding on 64-bit. |
291 | 289 |
292 // Whether or not we can be broken into multiple lines. | 290 // Whether or not we can be broken into multiple lines. |
293 bool has_breakable_char_ : 1; | 291 bool has_breakable_char_ : 1; |
294 // Whether or not we have a hard break (e.g., <pre> with '\n'). | 292 // Whether or not we have a hard break (e.g., <pre> with '\n'). |
295 bool has_break_ : 1; | 293 bool has_break_ : 1; |
296 // Whether or not we have a variable width tab character (e.g., <pre> with | 294 // Whether or not we have a variable width tab character (e.g., <pre> with |
297 // '\t'). | 295 // '\t'). |
298 bool has_tab_ : 1; | 296 bool has_tab_ : 1; |
299 bool has_breakable_start_ : 1; | 297 bool has_breakable_start_ : 1; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 342 |
345 inline float LayoutText::HyphenWidth(const Font& font, | 343 inline float LayoutText::HyphenWidth(const Font& font, |
346 TextDirection direction) { | 344 TextDirection direction) { |
347 const ComputedStyle& style = StyleRef(); | 345 const ComputedStyle& style = StyleRef(); |
348 return font.Width(ConstructTextRun(font, style.HyphenString().GetString(), | 346 return font.Width(ConstructTextRun(font, style.HyphenString().GetString(), |
349 style, direction)); | 347 style, direction)); |
350 } | 348 } |
351 | 349 |
352 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutText, IsText()); | 350 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutText, IsText()); |
353 | 351 |
354 #if !DCHECK_IS_ON() | |
355 inline void LayoutText::CheckConsistency() const {} | |
356 #endif | |
357 | |
358 inline LayoutText* Text::GetLayoutObject() const { | 352 inline LayoutText* Text::GetLayoutObject() const { |
359 return ToLayoutText(CharacterData::GetLayoutObject()); | 353 return ToLayoutText(CharacterData::GetLayoutObject()); |
360 } | 354 } |
361 | 355 |
362 void ApplyTextTransform(const ComputedStyle*, String&, UChar); | 356 void ApplyTextTransform(const ComputedStyle*, String&, UChar); |
363 | 357 |
364 } // namespace blink | 358 } // namespace blink |
365 | 359 |
366 #endif // LayoutText_h | 360 #endif // LayoutText_h |
OLD | NEW |