1. 18 Mar, 2015 1 commit
  2. 06 Feb, 2015 1 commit
  3. 07 Jan, 2015 1 commit
  4. 11 May, 2014 1 commit
    • Benjamin Otte's avatar
      css: Implement "unset" · 3a72e2fb
      Benjamin Otte authored
      Quoting the spec:
        If the cascaded value of a property is the unset keyword,
        then if it is an inherited property, this is treated as
        inherit, and if it is not, this is treated as initial.
      Spec in question:
      Also use unset in the reset-to-defaults.css we use to reset css in
  5. 03 Jul, 2013 1 commit
    • Alexander Larsson's avatar
      css: Add a scale argument to css-value compute vfunc · af2c40bd
      Alexander Larsson authored
      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.
  6. 25 Nov, 2012 1 commit
  7. 28 Sep, 2012 1 commit
    • Benjamin Otte's avatar
      css: Huge refactoring to avoid computing wrong values · 1454ba15
      Benjamin Otte authored
      Here's the shortest description of the bug I can come up with:
      When computing values, we have 3 kinds of dependencies:
      (1) other properties ("currentColor" or em values)
      (2) inherited properties ("inherit")
      (3) generic things from the theme (@keyframes or @define-color)
      Previously, we passed the GtkStyleContext as an argument, because it
      provided these 3 things using:
      (1) _gtk_style_context_peek_property()
      (2) _gtk_style_context_peek_property(gtk_style_context_get_parent())
      (3) context->priv->cascade
      However, this makes it impossible to lookup values other than the ones
      accessible via _gtk_style_context_peek_property(). And this is exactly
      what we are doing in gtk_style_context_update_cache(). So when the cache
      updates encountered case (1), they were looking up the values from the
      wrong style data.
      So this large patch essentially does nothing but replace the
      context argument in all compute functions with new arguments for the 3
      cases above:
      (1) values
      (2) parent_values
      (3) provider
      We apparently have a lot of computing code.
  8. 03 Sep, 2012 1 commit
    • Benjamin Otte's avatar
      cssvalue: Pass property ID to transition function · e3fc081c
      Benjamin Otte authored
      This is to allow animating arrays properly. I'm not really thrilled
      about this solution (we leak propertys into the values again...), but
      it's the best I can come up with - I prefer it to having N different
      array types...
  9. 28 Aug, 2012 5 commits
    • Benjamin Otte's avatar
      cssvalue: First step of proper dependency tracking · 01252624
      Benjamin Otte authored
      Instead of using the EVERYTHING aka FIXME value for tdependencies,
      actually compute the dependencies in a bunch of simple cases.
    • Benjamin Otte's avatar
      css: Introduce dependencies for value computations · 0e2f35ed
      Benjamin Otte authored
      When values are computed, they might depend on various other values and
      we need to track this so we can update the values when those other
      values change. This is the first step in making that happen.
      This patch does not do any dependency tracking at all, instead it uses
    • Benjamin Otte's avatar
      css: Move computing of initial and inherit values · 9e7e65ca
      Benjamin Otte authored
      ... to the compute vfunc. Simplifies code quite a bit. But makes the
      code no longer a simple step-by-step implementation of the spec.
    • Benjamin Otte's avatar
      css: Pass property_id to compute function · 9b4ed662
      Benjamin Otte authored
      This is a reorganization of how value computing should be done.
      Previously the GtkCssStyleProperty.compute vfunc was supposed to take
      care of special cases when it needed those for computation. However,
      this proved to be very complicated in cases where values were nested and
      only the last value (of a common type) needed to be special cased.
      A common example for this was the fallback handling for unresolvable
      Now, we pass the property's ID along with all compute functions so we
      can do the special casing where it's necessary.
      Note that no actual changes happen in this commit. This will happen in
    • Benjamin Otte's avatar
      css: Introduce _gtk_css_value_compute() · 9b953829
      Benjamin Otte authored
      This commit is essentially a large reorganization. Instead of all value
      subtypes having their own compute function, there is the general
      _gtk_css_value_compute() function that then calls a vfunc on the
  10. 17 Apr, 2012 3 commits
    • Benjamin Otte's avatar
      cssvalue: Add _gtk_css_value_transition() · 1a9dfab8
      Benjamin Otte authored
      Returns a value that transitions between start and end or %NULL if the
      values cannot be transitioned.
      So far, all implementations but numbers and rgba return NULL.
    • Benjamin Otte's avatar
      cssvalue: Add _gtk_css_value_equal() · ffe50c3b
      Benjamin Otte authored
      For now, we return FALSE for all default css values, so this is not very
      I also think of this as an optimization equal, not a guaranteed equal,
      because we don't even have a notion of what "equal" means.
      For example, for background-repeat, "repeat, repeat" and "repeat"
      are functionally equivalent. But the cssvalue has no idea that it's used
      for background-repeat.
      As a more complicated example, "repeat, no-repeat" and "repeat" are
      equal to what one sees as long as there's only one image listed
      background-image-source. But once you start transition'ing to an image
      with 2 sources, it's different...
    • Benjamin Otte's avatar
      styleproperty: Make _gtk_style_property_parse_value() return a CssValue · 9b7640b8
      Benjamin Otte authored
      Also split out initial/inherit handling into a custom GtkCssValue class.