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

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

Issue 2599483002: Extract helper function. (Closed)
Patch Set: Created 3 years, 12 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, 2005, 2006, 2009, 2010, 2011 Apple Inc. 4 * Copyright (C) 2004, 2005, 2006, 2009, 2010, 2011 Apple Inc.
5 * All rights reserved. 5 * 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 public: 128 public:
129 TextRun constructTextRunForInspector(const ComputedStyle&) const; 129 TextRun constructTextRunForInspector(const ComputedStyle&) const;
130 LayoutRect frameRect() const { 130 LayoutRect frameRect() const {
131 return LayoutRect(x(), y(), width(), height()); 131 return LayoutRect(x(), y(), width(), height());
132 } 132 }
133 133
134 virtual LayoutRect localSelectionRect(int startPos, int endPos) const; 134 virtual LayoutRect localSelectionRect(int startPos, int endPos) const;
135 bool isSelected(int startPos, int endPos) const; 135 bool isSelected(int startPos, int endPos) const;
136 void selectionStartEnd(int& sPos, int& ePos) const; 136 void selectionStartEnd(int& sPos, int& ePos) const;
137 137
138 // These functions both paint markers and update the DocumentMarker's
Andrey Kraynov 2016/12/21 17:43:18 This comment seems outdated at the moment. paintDo
139 // renderedRect.
140 virtual void paintDocumentMarker(GraphicsContext&, 138 virtual void paintDocumentMarker(GraphicsContext&,
141 const LayoutPoint& boxOrigin, 139 const LayoutPoint& boxOrigin,
142 DocumentMarker*, 140 const DocumentMarker&,
143 const ComputedStyle&, 141 const ComputedStyle&,
144 const Font&, 142 const Font&,
145 bool grammar) const; 143 bool grammar) const;
146 virtual void paintTextMatchMarkerForeground(const PaintInfo&, 144 virtual void paintTextMatchMarkerForeground(const PaintInfo&,
147 const LayoutPoint& boxOrigin, 145 const LayoutPoint& boxOrigin,
148 DocumentMarker*, 146 const DocumentMarker&,
149 const ComputedStyle&, 147 const ComputedStyle&,
150 const Font&) const; 148 const Font&) const;
151 virtual void paintTextMatchMarkerBackground(const PaintInfo&, 149 virtual void paintTextMatchMarkerBackground(const PaintInfo&,
152 const LayoutPoint& boxOrigin, 150 const LayoutPoint& boxOrigin,
153 DocumentMarker*, 151 const DocumentMarker&,
154 const ComputedStyle&, 152 const ComputedStyle&,
155 const Font&) const; 153 const Font&) const;
156 154
157 void move(const LayoutSize&) final; 155 void move(const LayoutSize&) final;
158 156
159 protected: 157 protected:
160 void paint(const PaintInfo&, 158 void paint(const PaintInfo&,
161 const LayoutPoint&, 159 const LayoutPoint&,
162 LayoutUnit lineTop, 160 LayoutUnit lineTop,
163 LayoutUnit lineBottom) const override; 161 LayoutUnit lineBottom) const override;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion 237 (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion
240 : TextRun::ForbidTrailingExpansion); 238 : TextRun::ForbidTrailingExpansion);
241 } 239 }
242 }; 240 };
243 241
244 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox); 242 DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox);
245 243
246 } // namespace blink 244 } // namespace blink
247 245
248 #endif // InlineTextBox_h 246 #endif // InlineTextBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698