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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 years, 11 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-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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // m_preferredLogicalWidthsDirty. 65 // m_preferredLogicalWidthsDirty.
66 // 66 //
67 // The previous comment applies also for painting. See e.g. 67 // The previous comment applies also for painting. See e.g.
68 // BlockFlowPainter::paintContents in particular the use of LineBoxListPainter. 68 // BlockFlowPainter::paintContents in particular the use of LineBoxListPainter.
69 class CORE_EXPORT LayoutText : public LayoutObject { 69 class CORE_EXPORT LayoutText : public LayoutObject {
70 public: 70 public:
71 // FIXME: If the node argument is not a Text node or the string argument is 71 // FIXME: If the node argument is not a Text node or the string argument is
72 // not the content of the Text node, updating text-transform property 72 // not the content of the Text node, updating text-transform property
73 // doesn't re-transform the string. 73 // doesn't re-transform the string.
74 LayoutText(Node*, PassRefPtr<StringImpl>); 74 LayoutText(Node*, PassRefPtr<StringImpl>);
75 #if ENABLE(ASSERT) 75 #if DCHECK_IS_ON()
76 ~LayoutText() override; 76 ~LayoutText() override;
77 #endif 77 #endif
78 78
79 const char* name() const override { return "LayoutText"; } 79 const char* name() const override { return "LayoutText"; }
80 80
81 virtual bool isTextFragment() const; 81 virtual bool isTextFragment() const;
82 virtual bool isWordBreak() const; 82 virtual bool isWordBreak() const;
83 83
84 virtual PassRefPtr<StringImpl> originalText() const; 84 virtual PassRefPtr<StringImpl> originalText() const;
85 85
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 336
337 inline float LayoutText::hyphenWidth(const Font& font, 337 inline float LayoutText::hyphenWidth(const Font& font,
338 TextDirection direction) { 338 TextDirection direction) {
339 const ComputedStyle& style = styleRef(); 339 const ComputedStyle& style = styleRef();
340 return font.width(constructTextRun(font, style.hyphenString().getString(), 340 return font.width(constructTextRun(font, style.hyphenString().getString(),
341 style, direction)); 341 style, direction));
342 } 342 }
343 343
344 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutText, isText()); 344 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutText, isText());
345 345
346 #if !ENABLE(ASSERT) 346 #if !DCHECK_IS_ON()
347 inline void LayoutText::checkConsistency() const {} 347 inline void LayoutText::checkConsistency() const {}
348 #endif 348 #endif
349 349
350 inline LayoutText* Text::layoutObject() const { 350 inline LayoutText* Text::layoutObject() const {
351 return toLayoutText(CharacterData::layoutObject()); 351 return toLayoutText(CharacterData::layoutObject());
352 } 352 }
353 353
354 void applyTextTransform(const ComputedStyle*, String&, UChar); 354 void applyTextTransform(const ComputedStyle*, String&, UChar);
355 355
356 } // namespace blink 356 } // namespace blink
357 357
358 #endif // LayoutText_h 358 #endif // LayoutText_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698