Title: [195109] releases/WebKitGTK/webkit-2.10
Revision
195109
Author
[email protected]
Date
2016-01-15 02:32:59 -0800 (Fri, 15 Jan 2016)

Log Message

Merge r193743 - [cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
https://bugs.webkit.org/show_bug.cgi?id=151947

Reviewed by Martin Robinson.

Source/WebCore:

Test: mathml/presentation/radical-bar-visibility.html

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px

LayoutTests:

Add a test to check that the radical overbar appears on the screen when it has thickness less than 1px.

* mathml/presentation/radical-bar-visibility-expected-mismatch.html: Added.
* mathml/presentation/radical-bar-visibility.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (195108 => 195109)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2016-01-15 10:30:42 UTC (rev 195108)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog	2016-01-15 10:32:59 UTC (rev 195109)
@@ -1,3 +1,15 @@
+2015-12-08  Frederic Wang  <[email protected]>
+
+        [cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
+        https://bugs.webkit.org/show_bug.cgi?id=151947
+
+        Reviewed by Martin Robinson.
+
+        Add a test to check that the radical overbar appears on the screen when it has thickness less than 1px.
+
+        * mathml/presentation/radical-bar-visibility-expected-mismatch.html: Added.
+        * mathml/presentation/radical-bar-visibility.html: Added.
+
 2015-12-06  Simon Fraser  <[email protected]>
 
         Clipping along compositing borders in svg-edit

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/mathml/presentation/radical-bar-visibility-expected-mismatch.html (0 => 195109)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/mathml/presentation/radical-bar-visibility-expected-mismatch.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/mathml/presentation/radical-bar-visibility-expected-mismatch.html	2016-01-15 10:32:59 UTC (rev 195109)
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Radical bar visibility</title>
+    <meta charset="utf-8"/>
+  </head>
+  <body>
+
+    <p>This test passes if you see the radical bar.</p>
+
+    <div>
+      <!-- blue square to hide the radical symbol -->
+      <div style="position: absolute; background: blue; width: 100px; height: 100px;"></div>
+    </div>
+
+  </body>
+</html>

Added: releases/WebKitGTK/webkit-2.10/LayoutTests/mathml/presentation/radical-bar-visibility.html (0 => 195109)


--- releases/WebKitGTK/webkit-2.10/LayoutTests/mathml/presentation/radical-bar-visibility.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/mathml/presentation/radical-bar-visibility.html	2016-01-15 10:32:59 UTC (rev 195109)
@@ -0,0 +1,34 @@
+<!doctype html>
+<html>
+  <head>
+    <title>Radical bar visibility</title>
+    <meta charset="utf-8"/>
+    <style>
+      math, msqrt {
+        /* Latin Modern Math has
+           RadicalRuleThickess = 40
+           em = 1000
+           So the actual rule thickness is 24 * 40 / 1000 = 0.96 < 1 pixel */
+        font-family: Latin Modern Math;
+        font-size: 24px;
+      }
+    </style>
+  </head>
+  <body>
+
+    <p>This test passes if you see the radical bar.</p>
+
+    <div>
+      <div style="position: absolute">
+        <math>
+          <msqrt>
+            <mspace width="500px"/>
+          </msqrt>
+        </math>
+      </div>
+      <!-- blue square to hide the radical symbol -->
+      <div style="position: absolute; background: blue; width: 100px; height: 100px;"></div>
+    </div>
+
+  </body>
+</html>

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (195108 => 195109)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-01-15 10:30:42 UTC (rev 195108)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-01-15 10:32:59 UTC (rev 195109)
@@ -1,3 +1,15 @@
+2015-12-08  Frederic Wang  <[email protected]>
+
+        [cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
+        https://bugs.webkit.org/show_bug.cgi?id=151947
+
+        Reviewed by Martin Robinson.
+
+        Test: mathml/presentation/radical-bar-visibility.html
+
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px
+
 2015-12-07  Chris Dumez  <[email protected]>
 
         Crash in MemoryCache::pruneDeadResourcesToSize()

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp (195108 => 195109)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2016-01-15 10:30:42 UTC (rev 195108)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp	2016-01-15 10:32:59 UTC (rev 195109)
@@ -312,9 +312,13 @@
         }
         const double dashedLine[2] = { static_cast<double>(patternWidth), static_cast<double>(patternWidth) };
         cairo_set_dash(cairoContext, dashedLine, 2, patternOffset);
-    } else
+    } else {
         setSourceRGBAFromColor(cairoContext, strokeColor);
+        if (thickness < 1)
+            cairo_set_line_width(cairoContext, 1);
+    }
 
+
     FloatPoint p1 = point1;
     FloatPoint p2 = point2;
     // Center line and cut off corners for pattern patining.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to