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

Side by Side Diff: third_party/WebKit/Source/core/paint/TextPainter.h

Issue 2027653004: Adjust color for printing list-item markers as we do for text. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes Created 4 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TextPainter_h 5 #ifndef TextPainter_h
6 #define TextPainter_h 6 #define TextPainter_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/style/ComputedStyleConstants.h" 9 #include "core/style/ComputedStyleConstants.h"
10 #include "platform/fonts/TextBlob.h" 10 #include "platform/fonts/TextBlob.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 && fillColor == other.fillColor 60 && fillColor == other.fillColor
61 && strokeColor == other.strokeColor 61 && strokeColor == other.strokeColor
62 && emphasisMarkColor == other.emphasisMarkColor 62 && emphasisMarkColor == other.emphasisMarkColor
63 && strokeWidth == other.strokeWidth 63 && strokeWidth == other.strokeWidth
64 && shadow == other.shadow; 64 && shadow == other.shadow;
65 } 65 }
66 bool operator!=(const Style& other) { return !(*this == other); } 66 bool operator!=(const Style& other) { return !(*this == other); }
67 }; 67 };
68 static Style textPaintingStyle(LineLayoutItem, const ComputedStyle&, const P aintInfo&); 68 static Style textPaintingStyle(LineLayoutItem, const ComputedStyle&, const P aintInfo&);
69 static Style selectionPaintingStyle(LineLayoutItem, bool haveSelection, cons t PaintInfo&, const Style& textStyle); 69 static Style selectionPaintingStyle(LineLayoutItem, bool haveSelection, cons t PaintInfo&, const Style& textStyle);
70 static Color textColorForWhiteBackground(Color);
70 71
71 enum RotationDirection { Counterclockwise, Clockwise }; 72 enum RotationDirection { Counterclockwise, Clockwise };
72 static AffineTransform rotation(const LayoutRect& boxRect, RotationDirection ); 73 static AffineTransform rotation(const LayoutRect& boxRect, RotationDirection );
73 74
74 private: 75 private:
75 void updateGraphicsContext(const Style& style, GraphicsContextStateSaver& sa ver) 76 void updateGraphicsContext(const Style& style, GraphicsContextStateSaver& sa ver)
76 { 77 {
77 updateGraphicsContext(m_graphicsContext, style, m_horizontal, saver); 78 updateGraphicsContext(m_graphicsContext, style, m_horizontal, saver);
78 } 79 }
79 80
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // 5. Therefore the translation from (3) to (4) is (x(), y()) - (-maxY(), x( )) = (x() + maxY(), y() - x()) 112 // 5. Therefore the translation from (3) to (4) is (x(), y()) - (-maxY(), x( )) = (x() + maxY(), y() - x())
112 113
113 // A similar argument derives the counter-clockwise case. 114 // A similar argument derives the counter-clockwise case.
114 return rotationDirection == Clockwise ? AffineTransform(0, 1, -1, 0, boxRect .x() + boxRect.maxY(), boxRect.y() - boxRect.x()) 115 return rotationDirection == Clockwise ? AffineTransform(0, 1, -1, 0, boxRect .x() + boxRect.maxY(), boxRect.y() - boxRect.x())
115 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.y(), boxRect.x() + boxRect.maxY()); 116 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.y(), boxRect.x() + boxRect.maxY());
116 } 117 }
117 118
118 } // namespace blink 119 } // namespace blink
119 120
120 #endif // TextPainter_h 121 #endif // TextPainter_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698