mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Back out fd367ec484cf (bug 885585) for Windows reftest orange
This commit is contained in:
parent
0594963b9f
commit
19ee230192
@ -206,8 +206,6 @@ fix-win32-font-assertion.patch: Bug 838617, fix assertion from bug 717178 that w
|
||||
|
||||
xlib-flush-glyphs.patch: bug 839745, flush glyphs when necessary
|
||||
|
||||
dasharray-zero-gap.patch: bug 885585, ensure strokes get painted when the gaps in a dash array are all zero length
|
||||
|
||||
==== pixman patches ====
|
||||
|
||||
pixman-android-cpu-detect.patch: Add CPU detection support for Android, where we can't reliably access /proc/self/auxv.
|
||||
|
@ -2578,33 +2578,19 @@ _cairo_quartz_surface_stroke_cg (void *abstract_surface,
|
||||
unsigned int max_dashes = style->num_dashes;
|
||||
unsigned int k;
|
||||
|
||||
bool set_line_dash = false;
|
||||
if (style->num_dashes % 2 == 0) {
|
||||
for (k = 1; k < max_dashes; k++) {
|
||||
if (style->dash[k]) {
|
||||
set_line_dash = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else
|
||||
set_line_dash = true;
|
||||
if (style->num_dashes%2)
|
||||
max_dashes *= 2;
|
||||
if (max_dashes > STATIC_DASH)
|
||||
fdash = _cairo_malloc_ab (max_dashes, sizeof (cairo_quartz_float_t));
|
||||
if (fdash == NULL)
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
||||
if (set_line_dash) {
|
||||
if (style->num_dashes%2)
|
||||
max_dashes *= 2;
|
||||
if (max_dashes > STATIC_DASH)
|
||||
fdash = _cairo_malloc_ab (max_dashes, sizeof (cairo_quartz_float_t));
|
||||
if (fdash == NULL)
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
for (k = 0; k < max_dashes; k++)
|
||||
fdash[k] = (cairo_quartz_float_t) style->dash[k % style->num_dashes];
|
||||
|
||||
for (k = 0; k < max_dashes; k++)
|
||||
fdash[k] = (cairo_quartz_float_t) style->dash[k % style->num_dashes];
|
||||
|
||||
CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
|
||||
if (fdash != sdash)
|
||||
free (fdash);
|
||||
} else
|
||||
CGContextSetLineDash (state.context, 0, NULL, 0);
|
||||
CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
|
||||
if (fdash != sdash)
|
||||
free (fdash);
|
||||
} else
|
||||
CGContextSetLineDash (state.context, 0, NULL, 0);
|
||||
|
||||
|
@ -1,60 +0,0 @@
|
||||
diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
|
||||
--- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
|
||||
+++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
|
||||
@@ -2573,29 +2573,43 @@ static cairo_int_status_t
|
||||
|
||||
if (style->dash && style->num_dashes) {
|
||||
#define STATIC_DASH 32
|
||||
cairo_quartz_float_t sdash[STATIC_DASH];
|
||||
cairo_quartz_float_t *fdash = sdash;
|
||||
unsigned int max_dashes = style->num_dashes;
|
||||
unsigned int k;
|
||||
|
||||
- if (style->num_dashes%2)
|
||||
- max_dashes *= 2;
|
||||
- if (max_dashes > STATIC_DASH)
|
||||
- fdash = _cairo_malloc_ab (max_dashes, sizeof (cairo_quartz_float_t));
|
||||
- if (fdash == NULL)
|
||||
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
-
|
||||
- for (k = 0; k < max_dashes; k++)
|
||||
- fdash[k] = (cairo_quartz_float_t) style->dash[k % style->num_dashes];
|
||||
-
|
||||
- CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
|
||||
- if (fdash != sdash)
|
||||
- free (fdash);
|
||||
+ bool set_line_dash = false;
|
||||
+ if (style->num_dashes % 2 == 0) {
|
||||
+ for (k = 1; k < max_dashes; k++) {
|
||||
+ if (style->dash[k]) {
|
||||
+ set_line_dash = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ } else
|
||||
+ set_line_dash = true;
|
||||
+
|
||||
+ if (set_line_dash) {
|
||||
+ if (style->num_dashes%2)
|
||||
+ max_dashes *= 2;
|
||||
+ if (max_dashes > STATIC_DASH)
|
||||
+ fdash = _cairo_malloc_ab (max_dashes, sizeof (cairo_quartz_float_t));
|
||||
+ if (fdash == NULL)
|
||||
+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
+
|
||||
+ for (k = 0; k < max_dashes; k++)
|
||||
+ fdash[k] = (cairo_quartz_float_t) style->dash[k % style->num_dashes];
|
||||
+
|
||||
+ CGContextSetLineDash (surface->cgContext, style->dash_offset, fdash, max_dashes);
|
||||
+ if (fdash != sdash)
|
||||
+ free (fdash);
|
||||
+ } else
|
||||
+ CGContextSetLineDash (state.context, 0, NULL, 0);
|
||||
} else
|
||||
CGContextSetLineDash (state.context, 0, NULL, 0);
|
||||
|
||||
|
||||
_cairo_quartz_cairo_path_to_quartz_context (path, state.context);
|
||||
|
||||
_cairo_quartz_cairo_matrix_to_quartz (ctm, &strokeTransform);
|
||||
CGContextConcatCTM (state.context, strokeTransform);
|
@ -309,7 +309,6 @@ pref(svg.text.css-frames.enabled,true) == text-layout-08.svg text-layout-08-ref.
|
||||
HTTP(..) == text-scale-02.svg text-scale-02-ref.svg
|
||||
HTTP(..) == text-scale-03.svg text-scale-03-ref.svg
|
||||
== text-stroke-scaling-01.svg text-stroke-scaling-01-ref.svg
|
||||
== stroke-dasharray-01.svg stroke-dasharray-01-ref.svg
|
||||
== stroke-dasharray-and-pathLength-01.svg pass.svg
|
||||
== stroke-dasharray-and-text-01.svg stroke-dasharray-and-text-01-ref.svg
|
||||
== stroke-linecap-square-w-zero-length-segs-01.svg pass.svg
|
||||
|
@ -1,14 +0,0 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Reference for a stroke with a dasharray whose gaps add up to 0 still painting</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=885585 -->
|
||||
|
||||
<g fill="none" stroke="black" stroke-width="2">
|
||||
<path d="M 100,100 v 100"/>
|
||||
<path d="M 110,100 h 100"/>
|
||||
<path d="M 120,120 l 100,100"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 482 B |
@ -1,14 +0,0 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Test for a stroke with a dasharray whose gaps add up to 0 still painting</title>
|
||||
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=885585 -->
|
||||
|
||||
<g fill="none" stroke="black" stroke-width="2" stroke-dasharray="10 0">
|
||||
<path d="M 100,100 v 100"/>
|
||||
<path d="M 110,100 h 100"/>
|
||||
<path d="M 120,120 l 100,100"/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 501 B |
Loading…
Reference in New Issue
Block a user