diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-27 18:26:05 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-07-03 14:39:25 +0200 |
commit | af2c40bd54149237cd4ab998b5515167018fdc47 (patch) | |
tree | 09b605f0a8192ea4215863cdca2082eaf263d3a8 /gtk | |
parent | 38e1748df89ef0a92b050f77529cd42cea9b3caa (diff) | |
download | gtk+-af2c40bd54149237cd4ab998b5515167018fdc47.tar.gz |
css: Add a scale argument to css-value compute vfunc
We need to be able to compute different GtkCssImage values
depending on the scale, and we need this at compute time so that
we don't need to read any images other than the scale in used (to
e.g. calculate the image size). GtkStyleProviderPrivate is shared
for all style contexts, so its not right.
Diffstat (limited to 'gtk')
33 files changed, 70 insertions, 24 deletions
diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c index 45f1fb2c21..a221bf6c57 100644 --- a/gtk/gtkcssarrayvalue.c +++ b/gtk/gtkcssarrayvalue.c @@ -46,6 +46,7 @@ static GtkCssValue * gtk_css_value_array_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -58,7 +59,7 @@ gtk_css_value_array_compute (GtkCssValue *value, result = NULL; for (i = 0; i < value->n_values; i++) { - i_value = _gtk_css_value_compute (value->values[i], property_id, provider, values, parent_values, &child_deps); + i_value = _gtk_css_value_compute (value->values[i], property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); diff --git a/gtk/gtkcssbgsizevalue.c b/gtk/gtkcssbgsizevalue.c index 662ceb7d1e..df29d9733c 100644 --- a/gtk/gtkcssbgsizevalue.c +++ b/gtk/gtkcssbgsizevalue.c @@ -44,6 +44,7 @@ static GtkCssValue * gtk_css_value_bg_size_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -58,10 +59,10 @@ gtk_css_value_bg_size_compute (GtkCssValue *value, x = y = NULL; if (value->x) - x = _gtk_css_value_compute (value->x, property_id, provider, values, parent_values, &x_deps); + x = _gtk_css_value_compute (value->x, property_id, provider, scale, values, parent_values, &x_deps); if (value->y) - y = _gtk_css_value_compute (value->y, property_id, provider, values, parent_values, &y_deps); + y = _gtk_css_value_compute (value->y, property_id, provider, scale, values, parent_values, &y_deps); *dependencies = _gtk_css_dependencies_union (x_deps, y_deps); diff --git a/gtk/gtkcssbordervalue.c b/gtk/gtkcssbordervalue.c index 62487f8f8a..998e432004 100644 --- a/gtk/gtkcssbordervalue.c +++ b/gtk/gtkcssbordervalue.c @@ -45,6 +45,7 @@ static GtkCssValue * gtk_css_value_border_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -61,7 +62,7 @@ gtk_css_value_border_compute (GtkCssValue *value, { if (value->values[i]) { - computed->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, values, parent_values, &child_deps); + computed->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); changed |= (computed->values[i] != value->values[i]); } diff --git a/gtk/gtkcsscolorvalue.c b/gtk/gtkcsscolorvalue.c index d523fe82d4..9972d96a99 100644 --- a/gtk/gtkcsscolorvalue.c +++ b/gtk/gtkcsscolorvalue.c @@ -101,6 +101,7 @@ gtk_css_value_color_free (GtkCssValue *color) static GtkCssValue * gtk_css_value_color_get_fallback (guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values) { @@ -124,6 +125,7 @@ gtk_css_value_color_get_fallback (guint property_id, return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)), property_id, provider, + scale, values, parent_values, NULL); @@ -297,6 +299,7 @@ static GtkCssValue * gtk_css_value_color_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -335,7 +338,7 @@ gtk_css_value_color_compute (GtkCssValue *value, NULL); if (resolved == NULL) - return gtk_css_value_color_get_fallback (property_id, provider, values, parent_values); + return gtk_css_value_color_get_fallback (property_id, provider, scale, values, parent_values); return resolved; } diff --git a/gtk/gtkcsscomputedvalues.c b/gtk/gtkcsscomputedvalues.c index dea23bdf5e..6f7d368b6b 100644 --- a/gtk/gtkcsscomputedvalues.c +++ b/gtk/gtkcsscomputedvalues.c @@ -113,6 +113,7 @@ maybe_unref_section (gpointer section) void _gtk_css_computed_values_compute_value (GtkCssComputedValues *values, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *parent_values, guint id, GtkCssValue *specified, @@ -142,7 +143,7 @@ _gtk_css_computed_values_compute_value (GtkCssComputedValues *values, else _gtk_css_value_ref (specified); - value = _gtk_css_value_compute (specified, id, provider, values, parent_values, &dependencies); + value = _gtk_css_value_compute (specified, id, provider, scale, values, parent_values, &dependencies); _gtk_css_computed_values_set_value (values, id, value, dependencies, section); @@ -445,6 +446,7 @@ gtk_css_computed_values_create_css_animations (GtkCssComputedValues *values, GtkCssComputedValues *parent_values, gint64 timestamp, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *source) { GtkCssValue *durations, *delays, *timing_functions, *animations; @@ -489,7 +491,7 @@ gtk_css_computed_values_create_css_animations (GtkCssComputedValues *values, if (keyframes == NULL) continue; - keyframes = _gtk_css_keyframes_compute (keyframes, provider, values, parent_values); + keyframes = _gtk_css_keyframes_compute (keyframes, provider, scale, values, parent_values); animation = _gtk_css_animation_new (name, keyframes, @@ -514,11 +516,12 @@ _gtk_css_computed_values_create_animations (GtkCssComputedValues *values, GtkCssComputedValues *parent_values, gint64 timestamp, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *source) { if (source != NULL) gtk_css_computed_values_create_css_transitions (values, timestamp, source); - gtk_css_computed_values_create_css_animations (values, parent_values, timestamp, provider, source); + gtk_css_computed_values_create_css_animations (values, parent_values, timestamp, provider, scale, source); } GtkBitmask * diff --git a/gtk/gtkcsscomputedvaluesprivate.h b/gtk/gtkcsscomputedvaluesprivate.h index 5c88c72a33..f70d39736a 100644 --- a/gtk/gtkcsscomputedvaluesprivate.h +++ b/gtk/gtkcsscomputedvaluesprivate.h @@ -66,6 +66,7 @@ GtkCssComputedValues * _gtk_css_computed_values_new (void); void _gtk_css_computed_values_compute_value (GtkCssComputedValues *values, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *parent_values, guint id, GtkCssValue *specified, @@ -94,6 +95,7 @@ void _gtk_css_computed_values_create_animations (GtkCssCom GtkCssComputedValues *parent_values, gint64 timestamp, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *source); GtkBitmask * _gtk_css_computed_values_advance (GtkCssComputedValues *values, gint64 timestamp); diff --git a/gtk/gtkcsscornervalue.c b/gtk/gtkcsscornervalue.c index 394675c71a..625e8022bd 100644 --- a/gtk/gtkcsscornervalue.c +++ b/gtk/gtkcsscornervalue.c @@ -40,6 +40,7 @@ static GtkCssValue * gtk_css_value_corner_compute (GtkCssValue *corner, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -47,8 +48,8 @@ gtk_css_value_corner_compute (GtkCssValue *corner, GtkCssValue *x, *y; GtkCssDependencies x_deps, y_deps; - x = _gtk_css_value_compute (corner->x, property_id, provider, values, parent_values, &x_deps); - y = _gtk_css_value_compute (corner->y, property_id, provider, values, parent_values, &y_deps); + x = _gtk_css_value_compute (corner->x, property_id, provider, scale, values, parent_values, &x_deps); + y = _gtk_css_value_compute (corner->y, property_id, provider, scale, values, parent_values, &y_deps); *dependencies = _gtk_css_dependencies_union (x_deps, y_deps); if (x == corner->x && y == corner->y) { diff --git a/gtk/gtkcsseasevalue.c b/gtk/gtkcsseasevalue.c index 81cdea8e37..f4d56fd8d7 100644 --- a/gtk/gtkcsseasevalue.c +++ b/gtk/gtkcsseasevalue.c @@ -53,6 +53,7 @@ static GtkCssValue * gtk_css_value_ease_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssenginevalue.c b/gtk/gtkcssenginevalue.c index f382df9d94..08575b23b9 100644 --- a/gtk/gtkcssenginevalue.c +++ b/gtk/gtkcssenginevalue.c @@ -38,6 +38,7 @@ static GtkCssValue * gtk_css_value_engine_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssenumvalue.c b/gtk/gtkcssenumvalue.c index e1f1d1c478..547edb8ea0 100644 --- a/gtk/gtkcssenumvalue.c +++ b/gtk/gtkcssenumvalue.c @@ -41,6 +41,7 @@ static GtkCssValue * gtk_css_value_enum_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -164,6 +165,7 @@ static GtkCssValue * gtk_css_value_font_size_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c index 167af64a91..d1c1df72bb 100644 --- a/gtk/gtkcssimage.c +++ b/gtk/gtkcssimage.c @@ -62,6 +62,7 @@ static GtkCssImage * gtk_css_image_real_compute (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -146,6 +147,7 @@ GtkCssImage * _gtk_css_image_compute (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -163,7 +165,7 @@ _gtk_css_image_compute (GtkCssImage *image, klass = GTK_CSS_IMAGE_GET_CLASS (image); - return klass->compute (image, property_id, provider, values, parent_values, dependencies); + return klass->compute (image, property_id, provider, scale, values, parent_values, dependencies); } GtkCssImage * diff --git a/gtk/gtkcssimagegradient.c b/gtk/gtkcssimagegradient.c index cc06c904c9..93ae750072 100644 --- a/gtk/gtkcssimagegradient.c +++ b/gtk/gtkcssimagegradient.c @@ -34,6 +34,7 @@ static GtkCssImage * gtk_css_image_gradient_compute (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssimagelinear.c b/gtk/gtkcssimagelinear.c index 0d9f8660c2..9268d2bad0 100644 --- a/gtk/gtkcssimagelinear.c +++ b/gtk/gtkcssimagelinear.c @@ -420,6 +420,7 @@ static GtkCssImage * gtk_css_image_linear_compute (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -431,7 +432,7 @@ gtk_css_image_linear_compute (GtkCssImage *image, copy = g_object_new (GTK_TYPE_CSS_IMAGE_LINEAR, NULL); copy->repeating = linear->repeating; - copy->angle = _gtk_css_value_compute (linear->angle, property_id, provider, values, parent_values, dependencies); + copy->angle = _gtk_css_value_compute (linear->angle, property_id, provider, scale, values, parent_values, dependencies); g_array_set_size (copy->stops, linear->stops->len); for (i = 0; i < linear->stops->len; i++) @@ -442,12 +443,12 @@ gtk_css_image_linear_compute (GtkCssImage *image, stop = &g_array_index (linear->stops, GtkCssImageLinearColorStop, i); scopy = &g_array_index (copy->stops, GtkCssImageLinearColorStop, i); - scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, values, parent_values, &child_deps); + scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); if (stop->offset) { - scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, values, parent_values, &child_deps); + scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); } else diff --git a/gtk/gtkcssimageprivate.h b/gtk/gtkcssimageprivate.h index f9e4e41b75..e9a39bfb9f 100644 --- a/gtk/gtkcssimageprivate.h +++ b/gtk/gtkcssimageprivate.h @@ -58,6 +58,7 @@ struct _GtkCssImageClass GtkCssImage *(* compute) (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies); @@ -95,6 +96,7 @@ double _gtk_css_image_get_aspect_ratio (GtkCssImage * GtkCssImage * _gtk_css_image_compute (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies); diff --git a/gtk/gtkcssimageurl.c b/gtk/gtkcssimageurl.c index 0a7c4f3eef..663b6dc04c 100644 --- a/gtk/gtkcssimageurl.c +++ b/gtk/gtkcssimageurl.c @@ -120,6 +120,7 @@ static GtkCssImage * gtk_css_image_url_compute (GtkCssImage *image, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssimagevalue.c b/gtk/gtkcssimagevalue.c index dac0c2fac8..4dcba24e48 100644 --- a/gtk/gtkcssimagevalue.c +++ b/gtk/gtkcssimagevalue.c @@ -37,6 +37,7 @@ static GtkCssValue * gtk_css_value_image_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -48,7 +49,7 @@ gtk_css_value_image_compute (GtkCssValue *value, if (image == NULL) return _gtk_css_value_ref (value); - computed = _gtk_css_image_compute (image, property_id, provider, values, parent_values, dependencies); + computed = _gtk_css_image_compute (image, property_id, provider, scale, values, parent_values, dependencies); if (computed == image) { diff --git a/gtk/gtkcssinheritvalue.c b/gtk/gtkcssinheritvalue.c index e2c3f16330..053245cf73 100644 --- a/gtk/gtkcssinheritvalue.c +++ b/gtk/gtkcssinheritvalue.c @@ -37,6 +37,7 @@ static GtkCssValue * gtk_css_value_inherit_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -51,6 +52,7 @@ gtk_css_value_inherit_compute (GtkCssValue *value, return _gtk_css_value_compute (_gtk_css_initial_value_get (), property_id, provider, + scale, values, parent_values, dependencies); diff --git a/gtk/gtkcssinitialvalue.c b/gtk/gtkcssinitialvalue.c index 427044d574..c53a5cf4ff 100644 --- a/gtk/gtkcssinitialvalue.c +++ b/gtk/gtkcssinitialvalue.c @@ -40,6 +40,7 @@ static GtkCssValue * gtk_css_value_initial_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -80,6 +81,7 @@ gtk_css_value_initial_compute (GtkCssValue *value, return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)), property_id, provider, + scale, values, parent_values, dependencies); diff --git a/gtk/gtkcsskeyframes.c b/gtk/gtkcsskeyframes.c index dc214b2809..f25b0c4100 100644 --- a/gtk/gtkcsskeyframes.c +++ b/gtk/gtkcsskeyframes.c @@ -427,6 +427,7 @@ _gtk_css_keyframes_print (GtkCssKeyframes *keyframes, GtkCssKeyframes * _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values) { @@ -455,6 +456,7 @@ _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes, KEYFRAMES_VALUE (resolved, k, p) = _gtk_css_value_compute (KEYFRAMES_VALUE (keyframes, k, p), resolved->property_ids[p], provider, + scale, values, parent_values, NULL); diff --git a/gtk/gtkcsskeyframesprivate.h b/gtk/gtkcsskeyframesprivate.h index 9ec76fe6aa..160d4c5f3f 100644 --- a/gtk/gtkcsskeyframesprivate.h +++ b/gtk/gtkcsskeyframesprivate.h @@ -38,6 +38,7 @@ void _gtk_css_keyframes_print (GtkCssKeyframes GtkCssKeyframes * _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values); diff --git a/gtk/gtkcsslookup.c b/gtk/gtkcsslookup.c index acd35b6049..a32b959ebe 100644 --- a/gtk/gtkcsslookup.c +++ b/gtk/gtkcsslookup.c @@ -140,6 +140,7 @@ _gtk_css_lookup_set_computed (GtkCssLookup *lookup, void _gtk_css_lookup_resolve (GtkCssLookup *lookup, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values) { @@ -164,6 +165,7 @@ _gtk_css_lookup_resolve (GtkCssLookup *lookup, _gtk_bitmask_get (lookup->missing, i)) _gtk_css_computed_values_compute_value (values, provider, + scale, parent_values, i, lookup->values[i].value, diff --git a/gtk/gtkcsslookupprivate.h b/gtk/gtkcsslookupprivate.h index 8e8009758c..9287ccb902 100644 --- a/gtk/gtkcsslookupprivate.h +++ b/gtk/gtkcsslookupprivate.h @@ -55,6 +55,7 @@ void _gtk_css_lookup_set_computed (GtkCssLookup GtkCssValue *value); void _gtk_css_lookup_resolve (GtkCssLookup *lookup, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values); diff --git a/gtk/gtkcssnumbervalue.c b/gtk/gtkcssnumbervalue.c index ed2bfe506f..a66dc09279 100644 --- a/gtk/gtkcssnumbervalue.c +++ b/gtk/gtkcssnumbervalue.c @@ -59,6 +59,7 @@ static GtkCssValue * gtk_css_value_number_compute (GtkCssValue *number, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcsspositionvalue.c b/gtk/gtkcsspositionvalue.c index 8f09db72f2..dd9e0adb58 100644 --- a/gtk/gtkcsspositionvalue.c +++ b/gtk/gtkcsspositionvalue.c @@ -40,6 +40,7 @@ static GtkCssValue * gtk_css_value_position_compute (GtkCssValue *position, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -47,8 +48,8 @@ gtk_css_value_position_compute (GtkCssValue *position, GtkCssValue *x, *y; GtkCssDependencies x_deps, y_deps; - x = _gtk_css_value_compute (position->x, property_id, provider, values, parent_values, &x_deps); - y = _gtk_css_value_compute (position->y, property_id, provider, values, parent_values, &y_deps); + x = _gtk_css_value_compute (position->x, property_id, provider, scale, values, parent_values, &x_deps); + y = _gtk_css_value_compute (position->y, property_id, provider, scale, values, parent_values, &y_deps); *dependencies = _gtk_css_dependencies_union (x_deps, y_deps); if (x == position->x && y == position->y) { diff --git a/gtk/gtkcssrepeatvalue.c b/gtk/gtkcssrepeatvalue.c index eda6fef423..5ecaaca5ed 100644 --- a/gtk/gtkcssrepeatvalue.c +++ b/gtk/gtkcssrepeatvalue.c @@ -37,6 +37,7 @@ static GtkCssValue * gtk_css_value_repeat_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssrgbavalue.c b/gtk/gtkcssrgbavalue.c index fb52acefa5..c58534af50 100644 --- a/gtk/gtkcssrgbavalue.c +++ b/gtk/gtkcssrgbavalue.c @@ -37,6 +37,7 @@ static GtkCssValue * gtk_css_value_rgba_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssshadowsvalue.c b/gtk/gtkcssshadowsvalue.c index 324949176a..b688594cc1 100644 --- a/gtk/gtkcssshadowsvalue.c +++ b/gtk/gtkcssshadowsvalue.c @@ -51,6 +51,7 @@ static GtkCssValue * gtk_css_value_shadows_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -65,7 +66,7 @@ gtk_css_value_shadows_compute (GtkCssValue *value, result = gtk_css_shadows_value_new (value->values, value->len); for (i = 0; i < value->len; i++) { - result->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, values, parent_values, &child_deps); + result->values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); } diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c index 413d0003ab..de34599331 100644 --- a/gtk/gtkcssshadowvalue.c +++ b/gtk/gtkcssshadowvalue.c @@ -70,6 +70,7 @@ static GtkCssValue * gtk_css_value_shadow_compute (GtkCssValue *shadow, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -78,23 +79,23 @@ gtk_css_value_shadow_compute (GtkCssValue *shadow, GtkCssDependencies child_deps; child_deps = 0; - hoffset = _gtk_css_value_compute (shadow->hoffset, property_id, provider, values, parent_values, &child_deps); + hoffset = _gtk_css_value_compute (shadow->hoffset, property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); child_deps = 0; - voffset = _gtk_css_value_compute (shadow->voffset, property_id, provider, values, parent_values, &child_deps); + voffset = _gtk_css_value_compute (shadow->voffset, property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); child_deps = 0; - radius = _gtk_css_value_compute (shadow->radius, property_id, provider, values, parent_values, &child_deps); + radius = _gtk_css_value_compute (shadow->radius, property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); child_deps = 0; - spread = _gtk_css_value_compute (shadow->spread, property_id, provider, values, parent_values, &child_deps), + spread = _gtk_css_value_compute (shadow->spread, property_id, provider, scale, values, parent_values, &child_deps), *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); child_deps = 0; - color = _gtk_css_value_compute (shadow->color, property_id, provider, values, parent_values, &child_deps); + color = _gtk_css_value_compute (shadow->color, property_id, provider, scale, values, parent_values, &child_deps); *dependencies = _gtk_css_dependencies_union (*dependencies, child_deps); return gtk_css_shadow_value_new (hoffset, voffset, radius, spread, shadow->inset, color); diff --git a/gtk/gtkcssstringvalue.c b/gtk/gtkcssstringvalue.c index 82e7c37b6e..f97b512a09 100644 --- a/gtk/gtkcssstringvalue.c +++ b/gtk/gtkcssstringvalue.c @@ -37,6 +37,7 @@ static GtkCssValue * gtk_css_value_string_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcsstypedvalue.c b/gtk/gtkcsstypedvalue.c index aecee31d73..54716182a6 100644 --- a/gtk/gtkcsstypedvalue.c +++ b/gtk/gtkcsstypedvalue.c @@ -38,6 +38,7 @@ static GtkCssValue * gtk_css_value_typed_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c index 6d77cf80c9..8ee780d6cc 100644 --- a/gtk/gtkcssvalue.c +++ b/gtk/gtkcssvalue.c @@ -88,6 +88,7 @@ GtkCssValue * _gtk_css_value_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies) @@ -103,7 +104,7 @@ _gtk_css_value_compute (GtkCssValue *value, dependencies = &fallback; *dependencies = 0; - return value->class->compute (value, property_id, provider, values, parent_values, dependencies); + return value->class->compute (value, property_id, provider, scale, values, parent_values, dependencies); } gboolean diff --git a/gtk/gtkcssvalueprivate.h b/gtk/gtkcssvalueprivate.h index 1d2424e5f7..9871ab3c42 100644 --- a/gtk/gtkcssvalueprivate.h +++ b/gtk/gtkcssvalueprivate.h @@ -43,6 +43,7 @@ struct _GtkCssValueClass { GtkCssValue * (* compute) (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies); @@ -68,6 +69,7 @@ void _gtk_css_value_unref (GtkCssValue GtkCssValue *_gtk_css_value_compute (GtkCssValue *value, guint property_id, GtkStyleProviderPrivate *provider, + int scale, GtkCssComputedValues *values, GtkCssComputedValues *parent_values, GtkCssDependencies *dependencies); diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index f7f44ec5c6..1c533bca14 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -3295,6 +3295,7 @@ _gtk_style_context_validate (GtkStyleContext *context, priv->parent ? style_data_lookup (priv->parent)->store : NULL, timestamp, GTK_STYLE_PROVIDER_PRIVATE (priv->cascade), + priv->scale, current && gtk_style_context_should_create_transitions (context) ? current->store : NULL); if (_gtk_css_computed_values_is_static (data->store)) change &= ~GTK_CSS_CHANGE_ANIMATE; |