Changeset 157518 in webkit
- Timestamp:
- Oct 16, 2013 9:57:44 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r157513 r157518 1 2013-10-16 peavo@outlook.com <peavo@outlook.com> 2 3 Emphasis marks has wrong color. 4 https://bugs.webkit.org/show_bug.cgi?id=122829 5 6 Reviewed by Antti Koivisto. 7 8 * fast/text/text-emphasis-expected.html: Added. 9 * fast/text/text-emphasis.html: Added. 10 1 11 2013-10-16 Jinwoo Song <jinwoo7.song@samsung.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r157517 r157518 1 2013-10-16 peavo@outlook.com <peavo@outlook.com> 2 3 Emphasis marks has wrong color. 4 https://bugs.webkit.org/show_bug.cgi?id=122829 5 6 Reviewed by Antti Koivisto. 7 8 Tests: fast/text/text-emphasis.html. 9 fast/text/text-emphasis-expected.html. 10 11 Emphasis color should be set as fill color, not stroke color. 12 13 * rendering/TextPaintStyle.cpp: 14 (WebCore::updateGraphicsContext): 15 * rendering/TextPaintStyle.h: 16 1 17 2013-10-16 Antti Koivisto <antti@apple.com> 2 18 -
trunk/Source/WebCore/rendering/TextPaintStyle.cpp
r157015 r157518 155 155 } 156 156 157 void updateGraphicsContext(GraphicsContext& context, const TextPaintStyle& paintStyle, StrokeColorType strokeColorType)157 void updateGraphicsContext(GraphicsContext& context, const TextPaintStyle& paintStyle, FillColorType fillColorType) 158 158 { 159 159 TextDrawingModeFlags mode = context.textDrawingMode(); … … 166 166 } 167 167 168 if (mode & TextModeFill && (paintStyle.fillColor != context.fillColor() || paintStyle.colorSpace != context.fillColorSpace())) 169 context.setFillColor(paintStyle.fillColor, paintStyle.colorSpace); 168 Color fillColor = fillColorType == UseEmphasisMarkColor ? paintStyle.emphasisMarkColor : paintStyle.fillColor; 169 if (mode & TextModeFill && (fillColor != context.fillColor() || paintStyle.colorSpace != context.fillColorSpace())) 170 context.setFillColor(fillColor, paintStyle.colorSpace); 170 171 171 172 if (mode & TextModeStroke) { 172 Color strokeColor = strokeColorType == UseEmphasisMarkColor ? paintStyle.emphasisMarkColor : paintStyle.strokeColor; 173 if (strokeColor != context.strokeColor()) 174 context.setStrokeColor(strokeColor, paintStyle.colorSpace); 173 if (paintStyle.strokeColor != context.strokeColor()) 174 context.setStrokeColor(paintStyle.strokeColor, paintStyle.colorSpace); 175 175 if (paintStyle.strokeWidth != context.strokeThickness()) 176 176 context.setStrokeThickness(paintStyle.strokeWidth); -
trunk/Source/WebCore/rendering/TextPaintStyle.h
r157015 r157518 52 52 TextPaintStyle computeTextSelectionPaintStyle(const TextPaintStyle&, const RenderText&, const RenderStyle&, const PaintInfo&, bool& paintSelectedTextOnly, bool& paintSelectedTextSeparately, const ShadowData*& selectionShadow); 53 53 54 enum StrokeColorType { UseNormalStrokeColor, UseEmphasisMarkColor };55 void updateGraphicsContext(GraphicsContext&, const TextPaintStyle&, StrokeColorType = UseNormalStrokeColor);54 enum FillColorType { UseNormalFillColor, UseEmphasisMarkColor }; 55 void updateGraphicsContext(GraphicsContext&, const TextPaintStyle&, FillColorType = UseNormalFillColor); 56 56 57 57 }
Note: See TracChangeset
for help on using the changeset viewer.