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

Side by Side Diff: Source/core/rendering/InlineTextBox.h

Issue 313233002: Adding backgroundColor to WebCompositionUnderline and using it for InlineTextBox drawing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing over-eager cleanups; adding CompositionUnderlineRangeFilter::operator->(). Created 6 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 private: 168 private:
169 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderO bject 169 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderO bject
170 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObjec t 170 InlineTextBox* m_nextTextBox; // The next box that also uses our RenderObjec t
171 171
172 int m_start; 172 int m_start;
173 unsigned short m_len; 173 unsigned short m_len;
174 174
175 unsigned short m_truncation; // Where to truncate when text overflow is appl ied. We use special constants to 175 unsigned short m_truncation; // Where to truncate when text overflow is appl ied. We use special constants to
176 // denote no truncation (the whole run paints) and full tr uncation (nothing paints at all). 176 // denote no truncation (the whole run paints) and full tr uncation (nothing paints at all).
177 private:
tkent 2014/06/13 04:31:43 |private:| is unnecessary.
huangs 2014/06/13 17:22:25 Done.
178 size_t underlinePaintStart(const CompositionUnderline&);
179 size_t underlinePaintEnd(const CompositionUnderline&);
177 180
178 protected: 181 protected:
179 void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigi n, RenderStyle*, const Font&, int startPos, int endPos); 182 void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigi n, RenderStyle*, const Font&, Color backgroundColor, int startPos, int endPos);
180 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, Ren derStyle*, const Font&, bool background); 183 void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, Ren derStyle*, const Font&, bool background);
181 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin , const CompositionUnderline&); 184 void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin , const CompositionUnderline&);
182 185
183 // These functions both paint markers and update the DocumentMarker's render edRect. 186 // These functions both paint markers and update the DocumentMarker's render edRect.
184 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrig in, DocumentMarker*, RenderStyle*, const Font&, bool grammar); 187 virtual void paintDocumentMarker(GraphicsContext*, const FloatPoint& boxOrig in, DocumentMarker*, RenderStyle*, const Font&, bool grammar);
185 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOri gin, DocumentMarker*, RenderStyle*, const Font&); 188 virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOri gin, DocumentMarker*, RenderStyle*, const Font&);
186 189
187 private: 190 private:
188 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco ration, const ShadowList*); 191 void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDeco ration, const ShadowList*);
189 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderSty le*, const Font&, Color textColor); 192 void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderSty le*, const Font&, Color textColor);
(...skipping 16 matching lines...) Expand all
206 209
207 inline AffineTransform InlineTextBox::rotation(const FloatRect& boxRect, Rotatio nDirection rotationDirection) 210 inline AffineTransform InlineTextBox::rotation(const FloatRect& boxRect, Rotatio nDirection rotationDirection)
208 { 211 {
209 return rotationDirection == Clockwise ? AffineTransform(0, 1, -1, 0, boxRect .x() + boxRect.maxY(), boxRect.maxY() - boxRect.x()) 212 return rotationDirection == Clockwise ? AffineTransform(0, 1, -1, 0, boxRect .x() + boxRect.maxY(), boxRect.maxY() - boxRect.x())
210 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x() + boxRect.maxY()); 213 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x() + boxRect.maxY());
211 } 214 }
212 215
213 } // namespace WebCore 216 } // namespace WebCore
214 217
215 #endif // InlineTextBox_h 218 #endif // InlineTextBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698