[gtk/css-style-split-2: 34/34] enumvalue: Use direct access for css values



commit 930f8c5ce85d0a5c286071ff93a987eafdfb2e88
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 28 11:04:27 2020 +0100

    enumvalue: Use direct access for css values

 gtk/gtkcssenumvalue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkcssenumvalue.c b/gtk/gtkcssenumvalue.c
index d558964fc9..82d5580773 100644
--- a/gtk/gtkcssenumvalue.c
+++ b/gtk/gtkcssenumvalue.c
@@ -202,7 +202,7 @@ _gtk_css_blend_mode_value_get (const GtkCssValue *value)
 static double
 get_dpi (GtkCssStyle *style)
 {
-  return _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_DPI), 96);
+  return _gtk_css_number_value_get (style->core->dpi, 96);
 }
 
 /* XXX: Kinda bad to have that machinery here, nobody expects vital font
@@ -267,7 +267,7 @@ gtk_css_value_font_size_compute (GtkCssValue      *value,
       break;
     case GTK_CSS_FONT_SIZE_SMALLER:
       if (parent_style)
-        font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, 
GTK_CSS_PROPERTY_FONT_SIZE), 100);
+        font_size = _gtk_css_number_value_get (parent_style->core->font_size, 100);
       else
         font_size = gtk_css_font_size_get_default_px (provider, style);
       /* XXX: This is what WebKit does... */
@@ -275,7 +275,7 @@ gtk_css_value_font_size_compute (GtkCssValue      *value,
       break;
     case GTK_CSS_FONT_SIZE_LARGER:
       if (parent_style)
-        font_size = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, 
GTK_CSS_PROPERTY_FONT_SIZE), 100);
+        font_size = _gtk_css_number_value_get (parent_style->core->font_size, 100);
       else
         font_size = gtk_css_font_size_get_default_px (provider, style);
       /* XXX: This is what WebKit does... */
@@ -411,7 +411,7 @@ gtk_css_value_font_weight_compute (GtkCssValue      *value,
     return _gtk_css_value_ref (value);
 
   if (parent_style)
-    parent_value = _gtk_css_number_value_get (gtk_css_style_get_value (parent_style, property_id), 100);
+    parent_value = _gtk_css_number_value_get (parent_style->font->font_weight, 100);
   else
     parent_value = 400;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]