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

Side by Side Diff: Source/core/layout/line/InlineTextBox.h

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 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
« no previous file with comments | « Source/core/layout/line/InlineIterator.h ('k') | Source/core/layout/line/LayoutTextInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 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 22 matching lines...) Expand all
33 class DocumentMarker; 33 class DocumentMarker;
34 class GraphicsContext; 34 class GraphicsContext;
35 35
36 const unsigned short cNoTruncation = USHRT_MAX; 36 const unsigned short cNoTruncation = USHRT_MAX;
37 const unsigned short cFullTruncation = USHRT_MAX - 1; 37 const unsigned short cFullTruncation = USHRT_MAX - 1;
38 38
39 class InlineTextBox : public InlineBox { 39 class InlineTextBox : public InlineBox {
40 public: 40 public:
41 InlineTextBox(LayoutObject& obj, int start, unsigned short length) 41 InlineTextBox(LayoutObject& obj, int start, unsigned short length)
42 : InlineBox(obj) 42 : InlineBox(obj)
43 , m_prevTextBox(0) 43 , m_prevTextBox(nullptr)
44 , m_nextTextBox(0) 44 , m_nextTextBox(nullptr)
45 , m_start(start) 45 , m_start(start)
46 , m_len(length) 46 , m_len(length)
47 , m_truncation(cNoTruncation) 47 , m_truncation(cNoTruncation)
48 { 48 {
49 setIsText(true); 49 setIsText(true);
50 } 50 }
51 51
52 LayoutText& layoutObject() const { return toLayoutText(InlineBox::layoutObje ct()); } 52 LayoutText& layoutObject() const { return toLayoutText(InlineBox::layoutObje ct()); }
53 53
54 virtual void destroy() override final; 54 virtual void destroy() override final;
(...skipping 25 matching lines...) Expand all
80 virtual LayoutUnit lineHeight() const override final; 80 virtual LayoutUnit lineHeight() const override final;
81 81
82 bool getEmphasisMarkPosition(const ComputedStyle&, TextEmphasisPosition&) co nst; 82 bool getEmphasisMarkPosition(const ComputedStyle&, TextEmphasisPosition&) co nst;
83 83
84 LayoutRect logicalOverflowRect() const; 84 LayoutRect logicalOverflowRect() const;
85 void setLogicalOverflowRect(const LayoutRect&); 85 void setLogicalOverflowRect(const LayoutRect&);
86 LayoutUnit logicalTopVisualOverflow() const { return logicalOverflowRect().y (); } 86 LayoutUnit logicalTopVisualOverflow() const { return logicalOverflowRect().y (); }
87 LayoutUnit logicalBottomVisualOverflow() const { return logicalOverflowRect( ).maxY(); } 87 LayoutUnit logicalBottomVisualOverflow() const { return logicalOverflowRect( ).maxY(); }
88 88
89 // charactersWithHyphen, if provided, must not be destroyed before the TextR un. 89 // charactersWithHyphen, if provided, must not be destroyed before the TextR un.
90 TextRun constructTextRun(const ComputedStyle&, const Font&, StringBuilder* c haractersWithHyphen = 0) const; 90 TextRun constructTextRun(const ComputedStyle&, const Font&, StringBuilder* c haractersWithHyphen = nullptr) const;
91 TextRun constructTextRun(const ComputedStyle&, const Font&, StringView, int maximumLength, StringBuilder* charactersWithHyphen = 0) const; 91 TextRun constructTextRun(const ComputedStyle&, const Font&, StringView, int maximumLength, StringBuilder* charactersWithHyphen = nullptr) const;
92 92
93 #ifndef NDEBUG 93 #ifndef NDEBUG
94 virtual void showBox(int = 0) const override; 94 virtual void showBox(int = 0) const override;
95 #endif 95 #endif
96 virtual const char* boxName() const override; 96 virtual const char* boxName() const override;
97 virtual String debugName() const override; 97 virtual String debugName() const override;
98 98
99 String text() const; 99 String text() const;
100 100
101 public: 101 public:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 }; 174 };
175 175
176 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); 176 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox);
177 177
178 void alignSelectionRectToDevicePixels(LayoutRect&); 178 void alignSelectionRectToDevicePixels(LayoutRect&);
179 179
180 } // namespace blink 180 } // namespace blink
181 181
182 #endif // InlineTextBox_h 182 #endif // InlineTextBox_h
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineIterator.h ('k') | Source/core/layout/line/LayoutTextInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698