Diff
Modified: trunk/LayoutTests/ChangeLog (157517 => 157518)
--- trunk/LayoutTests/ChangeLog 2013-10-16 14:33:31 UTC (rev 157517)
+++ trunk/LayoutTests/ChangeLog 2013-10-16 16:57:44 UTC (rev 157518)
@@ -1,3 +1,13 @@
+2013-10-16 [email protected] <[email protected]>
+
+ Emphasis marks has wrong color.
+ https://bugs.webkit.org/show_bug.cgi?id=122829
+
+ Reviewed by Antti Koivisto.
+
+ * fast/text/text-emphasis-expected.html: Added.
+ * fast/text/text-emphasis.html: Added.
+
2013-10-16 Jinwoo Song <[email protected]>
Unreviewed EFL gardening. Rebaselining after r155998.
Added: trunk/LayoutTests/fast/text/text-emphasis-expected.html (0 => 157518)
--- trunk/LayoutTests/fast/text/text-emphasis-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-emphasis-expected.html 2013-10-16 16:57:44 UTC (rev 157518)
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <style type="text/css">
+ p
+ {
+ font-size : 40px;
+ }
+ </style>
+ </head>
+
+ <body>
+ <p>Test of text emphasis</p>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/text/text-emphasis.html (0 => 157518)
--- trunk/LayoutTests/fast/text/text-emphasis.html (rev 0)
+++ trunk/LayoutTests/fast/text/text-emphasis.html 2013-10-16 16:57:44 UTC (rev 157518)
@@ -0,0 +1,17 @@
+<html>
+ <head>
+ <style type="text/css">
+ p
+ {
+ -webkit-text-emphasis-style : open circle;
+ -webkit-text-emphasis-position : under;
+ -webkit-text-emphasis-color : white;
+ font-size : 40px;
+ }
+ </style>
+ </head>
+
+ <body>
+ <p>Test of text emphasis</p>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (157517 => 157518)
--- trunk/Source/WebCore/ChangeLog 2013-10-16 14:33:31 UTC (rev 157517)
+++ trunk/Source/WebCore/ChangeLog 2013-10-16 16:57:44 UTC (rev 157518)
@@ -1,3 +1,19 @@
+2013-10-16 [email protected] <[email protected]>
+
+ Emphasis marks has wrong color.
+ https://bugs.webkit.org/show_bug.cgi?id=122829
+
+ Reviewed by Antti Koivisto.
+
+ Tests: fast/text/text-emphasis.html.
+ fast/text/text-emphasis-expected.html.
+
+ Emphasis color should be set as fill color, not stroke color.
+
+ * rendering/TextPaintStyle.cpp:
+ (WebCore::updateGraphicsContext):
+ * rendering/TextPaintStyle.h:
+
2013-10-16 Antti Koivisto <[email protected]>
Move code for finding rendered character offset to RenderTextLineBoxes
Modified: trunk/Source/WebCore/rendering/TextPaintStyle.cpp (157517 => 157518)
--- trunk/Source/WebCore/rendering/TextPaintStyle.cpp 2013-10-16 14:33:31 UTC (rev 157517)
+++ trunk/Source/WebCore/rendering/TextPaintStyle.cpp 2013-10-16 16:57:44 UTC (rev 157518)
@@ -154,7 +154,7 @@
return selectionPaintStyle;
}
-void updateGraphicsContext(GraphicsContext& context, const TextPaintStyle& paintStyle, StrokeColorType strokeColorType)
+void updateGraphicsContext(GraphicsContext& context, const TextPaintStyle& paintStyle, FillColorType fillColorType)
{
TextDrawingModeFlags mode = context.textDrawingMode();
if (paintStyle.strokeWidth > 0) {
@@ -165,13 +165,13 @@
}
}
- if (mode & TextModeFill && (paintStyle.fillColor != context.fillColor() || paintStyle.colorSpace != context.fillColorSpace()))
- context.setFillColor(paintStyle.fillColor, paintStyle.colorSpace);
+ Color fillColor = fillColorType == UseEmphasisMarkColor ? paintStyle.emphasisMarkColor : paintStyle.fillColor;
+ if (mode & TextModeFill && (fillColor != context.fillColor() || paintStyle.colorSpace != context.fillColorSpace()))
+ context.setFillColor(fillColor, paintStyle.colorSpace);
if (mode & TextModeStroke) {
- Color strokeColor = strokeColorType == UseEmphasisMarkColor ? paintStyle.emphasisMarkColor : paintStyle.strokeColor;
- if (strokeColor != context.strokeColor())
- context.setStrokeColor(strokeColor, paintStyle.colorSpace);
+ if (paintStyle.strokeColor != context.strokeColor())
+ context.setStrokeColor(paintStyle.strokeColor, paintStyle.colorSpace);
if (paintStyle.strokeWidth != context.strokeThickness())
context.setStrokeThickness(paintStyle.strokeWidth);
}
Modified: trunk/Source/WebCore/rendering/TextPaintStyle.h (157517 => 157518)
--- trunk/Source/WebCore/rendering/TextPaintStyle.h 2013-10-16 14:33:31 UTC (rev 157517)
+++ trunk/Source/WebCore/rendering/TextPaintStyle.h 2013-10-16 16:57:44 UTC (rev 157518)
@@ -51,8 +51,8 @@
TextPaintStyle computeTextPaintStyle(const RenderText&, const RenderStyle&, const PaintInfo&);
TextPaintStyle computeTextSelectionPaintStyle(const TextPaintStyle&, const RenderText&, const RenderStyle&, const PaintInfo&, bool& paintSelectedTextOnly, bool& paintSelectedTextSeparately, const ShadowData*& selectionShadow);
-enum StrokeColorType { UseNormalStrokeColor, UseEmphasisMarkColor };
-void updateGraphicsContext(GraphicsContext&, const TextPaintStyle&, StrokeColorType = UseNormalStrokeColor);
+enum FillColorType { UseNormalFillColor, UseEmphasisMarkColor };
+void updateGraphicsContext(GraphicsContext&, const TextPaintStyle&, FillColorType = UseNormalFillColor);
}