]> Pileus Git - ~andy/gtk/log
~andy/gtk
13 years agoRemove an incomplete, dead copy of testgtk
Matthias Clasen [Thu, 26 May 2011 04:08:43 +0000 (00:08 -0400)]
Remove an incomplete, dead copy of testgtk

13 years agoSimplify GtkLockButton
Matthias Clasen [Thu, 26 May 2011 00:19:08 +0000 (20:19 -0400)]
Simplify GtkLockButton

Now it is actually just a button, which makes things simpler
and is closer to what the designers want.

13 years agomenuitem: Position submenus properly
Benjamin Otte [Wed, 25 May 2011 02:49:12 +0000 (04:49 +0200)]
menuitem: Position submenus properly

Now that we can actually query the menu's size, don't query the
preferred minimum size and hope it's correct, but use its actual size.

13 years agomenu: Realize window before positioning
Benjamin Otte [Wed, 25 May 2011 02:48:20 +0000 (04:48 +0200)]
menu: Realize window before positioning

We want the menu realized so we know the size it's allocating to itself.
And we need that size to position the menu properly.
This is best visible on right-to-left.

13 years agopaned: More fixes to keep windows in sync with widgets
Benjamin Otte [Wed, 25 May 2011 02:24:26 +0000 (04:24 +0200)]
paned: More fixes to keep windows in sync with widgets

Fixes sidebar in evince not showing up. This was caused by the
visiblility of the widget changing and the paned not fixing its child
window's visibility accordingly.

13 years agobgo#642929 - Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
Kjell Ahlstedt [Mon, 23 May 2011 20:02:00 +0000 (15:02 -0500)]
bgo#642929 - Don't infinite-loop in GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER

If the user pressed Enter to confirm the file chooser while the filename entry
was empty, then gtk_file_chooser_default_should_respond() would go back and forth
between the cases for handling the filename entry and the file list.

13 years agotests: Add simple CSS test for widget style properties
Benjamin Otte [Mon, 23 May 2011 05:11:31 +0000 (07:11 +0200)]
tests: Add simple CSS test for widget style properties

13 years agocssprovider: Don't convert widget style properties to CSS
Benjamin Otte [Mon, 23 May 2011 05:10:56 +0000 (07:10 +0200)]
cssprovider: Don't convert widget style properties to CSS

They are still CSS, so converting them is wrong.

13 years agocssprovider: Use right hash table when printing
Benjamin Otte [Mon, 23 May 2011 05:01:14 +0000 (07:01 +0200)]
cssprovider: Use right hash table when printing

If the CSS provider had widget style properties, printing them would
crash since 82b340f6f005a7d2b70d9aa7febb8612a53d0eda

13 years agowindow: Only draw resize grip if its window exists
Benjamin Otte [Mon, 23 May 2011 13:46:59 +0000 (15:46 +0200)]
window: Only draw resize grip if its window exists

Don't rely on priv->resize_grip_visible as the code comment in the
variable declaration indicates.
This fixes warnings with GtkPlug, which can cause resize_grip_visible to
be TRUE but grid_window to be NULL - running tests/teststatusicon
reproduces this.

This broke with 7ef113ce56a75641175af31267e2075f634267e0

13 years agoRemove unused function attributes from symbol files
Matthias Clasen [Mon, 23 May 2011 03:39:48 +0000 (23:39 -0400)]
Remove unused function attributes from symbol files

13 years agoquartz: actually register gdk_quartz_display_dispose
Kristian Rietveld [Sun, 22 May 2011 10:29:37 +0000 (12:29 +0200)]
quartz: actually register gdk_quartz_display_dispose

13 years agoquartz: fix a typo
Kristian Rietveld [Sun, 22 May 2011 10:27:38 +0000 (12:27 +0200)]
quartz: fix a typo

13 years agocssparser: Fix typo where we used "uint" for a type
Benjamin Otte [Sun, 22 May 2011 04:07:18 +0000 (06:07 +0200)]
cssparser: Fix typo where we used "uint" for a type

Interestingly this works for gcc, but breaks on MSVC.

13 years agostyle: Make margin a shorthand
Benjamin Otte [Sun, 22 May 2011 03:55:12 +0000 (05:55 +0200)]
style: Make margin a shorthand

... and add the real properties:
- margin-top
- margin-left
- margin-bottom
- margin-right

13 years agostyle: Make padding a shorthand
Benjamin Otte [Sun, 22 May 2011 03:42:17 +0000 (05:42 +0200)]
style: Make padding a shorthand

... and add the real properties:
- padding-top
- padding-left
- padding-bottom
- padding-right

13 years agoreftests: sort EXTRA_DIST in Makefile
Benjamin Otte [Sun, 22 May 2011 02:48:02 +0000 (04:48 +0200)]
reftests: sort EXTRA_DIST in Makefile

13 years agoreftests: Add a reftest to check shorthands do work
Benjamin Otte [Sun, 22 May 2011 02:46:42 +0000 (04:46 +0200)]
reftests: Add a reftest to check shorthands do work

Checks shorthands are properly unpacked in the CSS and that they indeed
set all relevant properties. Or at least border-width does.

13 years agoreftests: Add label-shadows test
Benjamin Otte [Sun, 22 May 2011 02:27:38 +0000 (04:27 +0200)]
reftests: Add label-shadows test

Tests shadows work properly for rotated labels

13 years agoshadow: Redo shadow implementation for rotations
Benjamin Otte [Sun, 22 May 2011 02:24:23 +0000 (04:24 +0200)]
shadow: Redo shadow implementation for rotations

The shadows went bonkers when the labels were rotated

13 years agothemingeninge: Handle translations properly
Benjamin Otte [Sun, 22 May 2011 01:53:21 +0000 (03:53 +0200)]
themingeninge: Handle translations properly

We want to keep the location of where to render, but transform th
context by the pango transform.

13 years agolabel: Account for y-translation when rotating
Benjamin Otte [Sun, 22 May 2011 01:53:02 +0000 (03:53 +0200)]
label: Account for y-translation when rotating

13 years agotests: Add parser test for shorthands
Benjamin Otte [Sun, 22 May 2011 01:09:23 +0000 (03:09 +0200)]
tests: Add parser test for shorthands

13 years agostyle: Convert border-width to a shorthand
Benjamin Otte [Sat, 21 May 2011 22:10:43 +0000 (00:10 +0200)]
style: Convert border-width to a shorthand

Add the corresponding properties it refers to, too:
- border-top-width
- border-left-width
- border-bottom-width
- border-right-width

13 years agostyle: Add support for shorthand properties
Benjamin Otte [Sat, 21 May 2011 21:47:19 +0000 (23:47 +0200)]
style: Add support for shorthand properties

Shorthand properties are basically the same a in CSS. For storage in
style properties or the CSS provider, they are unpacked into the real
values, so it is possible to partially override them.

No properties are yet converted to the new world yet, this is just the
code for supporting them.

13 years agostylepropertis: Use set_by_property() in set_valist()
Benjamin Otte [Sat, 21 May 2011 19:19:57 +0000 (21:19 +0200)]
stylepropertis: Use set_by_property() in set_valist()

... instead of duplicating code. This causes an extra g_value_copy().
If that turns out to be a performance issue, we can invent something
that handles this (like passing a gboolean take_value).

The reason for this duplication deletion is that we want to complicate
the setting code to handle shorthands by unpacking them and storing the
separate values.

13 years agostyleproperties: Add _gtk_style_properties_set_property_by_property()
Benjamin Otte [Sat, 21 May 2011 19:17:08 +0000 (21:17 +0200)]
styleproperties: Add _gtk_style_properties_set_property_by_property()

... as a replacement for _gtk_style_properties_set_property_by_pspec().
We'll need that to handle shorthands.

13 years agostyleproperties: Use peek_property() in get_valist()
Benjamin Otte [Sat, 21 May 2011 18:03:28 +0000 (20:03 +0200)]
styleproperties: Use peek_property() in get_valist()

13 years agostyleproperties: Validate values when setting them
Benjamin Otte [Sat, 21 May 2011 17:43:11 +0000 (19:43 +0200)]
styleproperties: Validate values when setting them

Note that validation is not necessary when resolving, because all values
are valid for those cases.

13 years agostyleproperties: Remove needless check
Benjamin Otte [Sat, 21 May 2011 17:39:46 +0000 (19:39 +0200)]
styleproperties: Remove needless check

13 years agostyleproperties: Use peek_property in get_property
Benjamin Otte [Sat, 21 May 2011 15:43:38 +0000 (17:43 +0200)]
styleproperties: Use peek_property in get_property

... instead of duplicating the code.

13 years agostyleproperties: Adapt _gtk_style_properties_peek_property()
Benjamin Otte [Sat, 21 May 2011 15:19:50 +0000 (17:19 +0200)]
styleproperties: Adapt _gtk_style_properties_peek_property()

Optionally return the GtkStyleProperty that was looked up. This feature
isn't used yet, but will soon be.

13 years agostyleproperties: Move the style property handling code
Benjamin Otte [Sat, 21 May 2011 02:17:28 +0000 (04:17 +0200)]
styleproperties: Move the style property handling code

... from gtkstyleproperties.c to gtkstyleproperty.c

13 years agocss: Rename gtkcssstrfuncs file to gtkstyleproperty
Benjamin Otte [Sat, 21 May 2011 01:30:36 +0000 (03:30 +0200)]
css: Rename gtkcssstrfuncs file to gtkstyleproperty

The idea is to handle the style property registering etc in this file
instead of the styleproperties file. The next commits will move those
files.

13 years agostringfuncs: Remove _gtk_css_parse_url() from header
Benjamin Otte [Sat, 21 May 2011 01:18:00 +0000 (03:18 +0200)]
stringfuncs: Remove _gtk_css_parse_url() from header

No code changes, just moving the function in the c file so it doesn't
need to be forward-declared.

13 years agocssprovider: Use _gtk_style_property_lookup()
Benjamin Otte [Thu, 19 May 2011 12:04:51 +0000 (14:04 +0200)]
cssprovider: Use _gtk_style_property_lookup()

This way we get the actual data node and can use it.

13 years agostyleproperties: Put gtk_style_property_lookup() in private header
Benjamin Otte [Thu, 19 May 2011 12:00:14 +0000 (14:00 +0200)]
styleproperties: Put gtk_style_property_lookup() in private header

13 years agostyleproperties: Class ref no longer necessary
Benjamin Otte [Sat, 21 May 2011 01:57:32 +0000 (03:57 +0200)]
styleproperties: Class ref no longer necessary

Now that we initialize the pspecs on-demand, we can avoid the class ref.

13 years agostyleproperties: Init the default properties when they're needed
Benjamin Otte [Fri, 20 May 2011 21:39:02 +0000 (23:39 +0200)]
styleproperties: Init the default properties when they're needed

Instead of initing the default style properties in the class_init
func of the style properties, init them when they are first needed -
when they are queried or when new ones are registered.

That way, they will always be available.

13 years agostyleproperties: constify gtk_style_property_lookup()
Benjamin Otte [Thu, 19 May 2011 11:55:25 +0000 (13:55 +0200)]
styleproperties: constify gtk_style_property_lookup()

13 years agostyleproperties: Rename the storage struct for style pspecs
Benjamin Otte [Thu, 19 May 2011 11:48:40 +0000 (13:48 +0200)]
styleproperties: Rename the storage struct for style pspecs

PropertyNode => GtkStyleProperty

13 years agotests: Add forgotten file
Benjamin Otte [Sat, 21 May 2011 20:48:07 +0000 (22:48 +0200)]
tests: Add forgotten file

File was forgotten in 8fd6bd323c055c11c40acc6a09fa1a4cb0ca2b4a

13 years agogtk/gtkstatusbar: gtk_misc_set_alignment replacing
Diego Celix [Thu, 19 May 2011 11:16:18 +0000 (12:16 +0100)]
gtk/gtkstatusbar: gtk_misc_set_alignment replacing

Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkstatusbar.c

https://bugzilla.gnome.org/show_bug.cgi?id=650664

13 years agoAllow NULL permissions
Matthias Clasen [Sat, 21 May 2011 13:12:02 +0000 (09:12 -0400)]
Allow NULL permissions

This is useful in some scenarios.

13 years agodocs: Add missing <row>
Benjamin Otte [Sat, 21 May 2011 01:41:52 +0000 (03:41 +0200)]
docs: Add missing <row>

13 years agothemingengine: use the text-shadow property to render text shadow
Cosimo Cecchi [Tue, 3 May 2011 16:45:08 +0000 (12:45 -0400)]
themingengine: use the text-shadow property to render text shadow

This also avoids hardcoding a shadow for insensitive text in the engine,
as it can now be applied from the theme directly.

https://bugzilla.gnome.org/show_bug.cgi?id=649314

13 years agoshadow: add a method to paint the shadow for a PangoLayout
Cosimo Cecchi [Fri, 20 May 2011 20:05:57 +0000 (16:05 -0400)]
shadow: add a method to paint the shadow for a PangoLayout

https://bugzilla.gnome.org/show_bug.cgi?id=649314

13 years agostyleproperties: resolve properties of type GTK_TYPE_SHADOW
Cosimo Cecchi [Fri, 20 May 2011 20:11:41 +0000 (16:11 -0400)]
styleproperties: resolve properties of type GTK_TYPE_SHADOW

https://bugzilla.gnome.org/show_bug.cgi?id=649314

13 years agostyleproperties: add a "text-shadow" style property
Cosimo Cecchi [Fri, 20 May 2011 20:11:08 +0000 (16:11 -0400)]
styleproperties: add a "text-shadow" style property

And document its use in the CSS parser gtk-doc.

https://bugzilla.gnome.org/show_bug.cgi?id=649314

13 years agocss: add a parser for GTK_TYPE_SHADOW properties
Cosimo Cecchi [Thu, 19 May 2011 18:48:22 +0000 (14:48 -0400)]
css: add a parser for GTK_TYPE_SHADOW properties

https://bugzilla.gnome.org/show_bug.cgi?id=649314

13 years agoshadow: add a GtkShadow private type
Cosimo Cecchi [Thu, 19 May 2011 18:47:17 +0000 (14:47 -0400)]
shadow: add a GtkShadow private type

This will be used as a base both for parsing text-shadow and box-shadow
properties. The type is private, as there's no real use in exporting
this in a public API.

https://bugzilla.gnome.org/show_bug.cgi?id=649314

13 years agoassistant: pack the sidebar in a frame instead of an event box
Cosimo Cecchi [Wed, 18 May 2011 21:22:40 +0000 (17:22 -0400)]
assistant: pack the sidebar in a frame instead of an event box

This has mostly two advantages:
- the most obvious one is the theme can render a border around the
  sidebar if it wants to.
- we also can avoid hardcoding a container border width for the sidebar,
  and just use a padding from the theme. This also allows different
  themes to define a different padding, etc.

The drawback is we must draw the background ourselves, but it's easy
enough.

https://bugzilla.gnome.org/show_bug.cgi?id=650530

13 years agoassistant: remove an useless gtk_widget_reset_style() call
Cosimo Cecchi [Wed, 18 May 2011 21:21:22 +0000 (17:21 -0400)]
assistant: remove an useless gtk_widget_reset_style() call

It's not needed to call _reset_style() here, as we did not add the
widget to the parent container yet.

https://bugzilla.gnome.org/show_bug.cgi?id=650530

13 years agomenu: Only realize menu if it isn't realized yet
Benjamin Otte [Thu, 19 May 2011 10:51:13 +0000 (12:51 +0200)]
menu: Only realize menu if it isn't realized yet

Lots of code calls gtk_menu_popup() and we don't want to resize the
window needlessly.
In this particular case, keyboard navigation to submenus caused those
submenus to shrink.

Note: I'm not sure this fix doesn't have nasty side effects, as I'm not
a specialist on menu popup code, so if it does, we'll need to revert it.
Until then, let's keep it, it fixes a bug.

13 years agotests: Add missing CSS test
Benjamin Otte [Thu, 19 May 2011 00:17:09 +0000 (02:17 +0200)]
tests: Add missing CSS test

13 years agogdk: Document gdk_window_add_filter()+XGenericEvents behavior
Carlos Garnacho [Wed, 18 May 2011 19:50:26 +0000 (21:50 +0200)]
gdk: Document gdk_window_add_filter()+XGenericEvents behavior

13 years agogdk: Get the right filter window for XI2 events
Carlos Garnacho [Wed, 18 May 2011 19:32:22 +0000 (21:32 +0200)]
gdk: Get the right filter window for XI2 events

GdkDeviceManagerXI2 now implements GdkEventTranslator::get_window,
retrieving the right window from the contained XIEvent.

13 years agogdk: Add _gdk_x11_event_translator_get_window()
Carlos Garnacho [Wed, 18 May 2011 19:24:57 +0000 (21:24 +0200)]
gdk: Add _gdk_x11_event_translator_get_window()

This method can be implemented by event translators so they
return the right window from XGenericEventCookie events, as
ev->xany.window isn't meaningful for these.

GdkEventSource now also uses this to find out the right window
filters to apply.

13 years agogdk: Move XGetEventData() call to GdkEventSource
Carlos Garnacho [Wed, 18 May 2011 17:37:34 +0000 (19:37 +0200)]
gdk: Move XGetEventData() call to GdkEventSource

This function should be called just once across every possible
event translator and GdkFilterFunc that wants to deal with
any cookie event.

13 years agomac keys: Add a missing semicolon
Benjamin Otte [Wed, 18 May 2011 19:14:59 +0000 (21:14 +0200)]
mac keys: Add a missing semicolon

13 years agokeys.css: Remove semicolons at end of rules
Benjamin Otte [Wed, 18 May 2011 19:13:30 +0000 (21:13 +0200)]
keys.css: Remove semicolons at end of rules

This is not CSS conform (it will break resync code after errors for
generic CSS parsers), so I deprecated the support for that semicolon.

13 years agoreftests: Check that inherited properties work
Cosimo Cecchi [Wed, 18 May 2011 16:43:10 +0000 (18:43 +0200)]
reftests: Check that inherited properties work

13 years agocssprovider: When loading themes, don't pass in an error
Benjamin Otte [Wed, 18 May 2011 16:37:23 +0000 (18:37 +0200)]
cssprovider: When loading themes, don't pass in an error

We want to parse existing themes as well as possible instead of failing.
And the g_warning() is preserved.

13 years agocssprovider: Don't propagate deprecation messages to passed-in error
Benjamin Otte [Wed, 18 May 2011 16:35:37 +0000 (18:35 +0200)]
cssprovider: Don't propagate deprecation messages to passed-in error

It's an informative message, don't stop parsing the CSS because of it.

13 years agocss: Make property parsing functions take a css parser
Benjamin Otte [Wed, 18 May 2011 16:32:22 +0000 (18:32 +0200)]
css: Make property parsing functions take a css parser

Instead of reading a string and then passing that in, let the parse
functions use the full power of the parser.

13 years agocss: Move binding set parsing to strfuncs
Benjamin Otte [Wed, 18 May 2011 16:03:23 +0000 (18:03 +0200)]
css: Move binding set parsing to strfuncs

13 years agocssstringfuncs: Read colors as symbolic colors always
Benjamin Otte [Wed, 18 May 2011 11:15:05 +0000 (13:15 +0200)]
cssstringfuncs: Read colors as symbolic colors always

... and then try to resolve them, so static colors get resolved in
advance, just like it was before.

13 years agosymboliccolor: Allow props == NULL when resolving
Benjamin Otte [Wed, 18 May 2011 10:58:11 +0000 (12:58 +0200)]
symboliccolor: Allow props == NULL when resolving

If props == NULL in gtk_symbolic_color_resolve(), fail sanely for named
colors. The docs used to say it was not allowed to pass NULL for named
color, but that had problems:
1) You do not know if a color was created that way. This is especially
   hard for generic users (like language bindings).
2) It wasn't even true. Colors using other symbolic colors would also
   fail when trying to resolve their named colors, but the docs didn't
   say so.
And because I want to use the function to resolve static colors early
where possible, I changed things.

13 years agocssprovider: Cache if rulesets have inheritable style properties
Benjamin Otte [Wed, 18 May 2011 03:47:18 +0000 (05:47 +0200)]
cssprovider: Cache if rulesets have inheritable style properties

This provides a huge speedup as we only need to preprocess style
properties when they are indeed inherited. This roughly doubles the
performance of the CSS matcher and brings the time taken by
gtk_css_provider_get_style() from 19% to 7% in my favorite benchmark.

13 years agocssprovider: Keep two hash tables per ruleset
Benjamin Otte [Wed, 18 May 2011 02:36:43 +0000 (04:36 +0200)]
cssprovider: Keep two hash tables per ruleset

One for the style properties, one for the widget style properties.
This way we can make one hash table by pspec which means we don't have
to repeat the pspec lookup.

13 years agocssprovider: Add a new setter for rulesets
Benjamin Otte [Wed, 18 May 2011 02:30:51 +0000 (04:30 +0200)]
cssprovider: Add a new setter for rulesets

We now have set-by-pspec (which is used for normal style properties) and
set-by-name (which is used by widget properties).

13 years agocssprovider: Refactor handling of rulesets
Benjamin Otte [Wed, 18 May 2011 02:20:05 +0000 (04:20 +0200)]
cssprovider: Refactor handling of rulesets

Keep rulesets as an on-stack/heap structure instead of allocating all
instances separately.
Also, pass a ruleset to the ruleset parser, so we can make the ruleset
parser do lots of fancy things that might be useful for performance.

13 years agocssprovider: Refactor code to have a gtk_css_ruleset_matches()
Benjamin Otte [Tue, 17 May 2011 20:11:50 +0000 (22:11 +0200)]
cssprovider: Refactor code to have a gtk_css_ruleset_matches()

13 years agocssprovider: Rename "SelectorStyleInfo" to "Ruleset"
Benjamin Otte [Tue, 17 May 2011 20:04:40 +0000 (22:04 +0200)]
cssprovider: Rename "SelectorStyleInfo" to "Ruleset"

No code changes, just clarification of the name

13 years agocss: Implement inherit properties
Benjamin Otte [Tue, 17 May 2011 13:01:59 +0000 (15:01 +0200)]
css: Implement inherit properties

Huge performance hit (slows down things roughly by a factor of 3), but
necessary for CSS conformance and for implementing "inherit" and
percentages.

13 years agoreftests: Check style property order
Benjamin Otte [Mon, 16 May 2011 21:52:19 +0000 (23:52 +0200)]
reftests: Check style property order

Ensure that style properties are read in the correct order, by having a
property twice with vastly different values.

13 years agocss: Refactor code to do property lookups earlier
Benjamin Otte [Mon, 16 May 2011 21:37:29 +0000 (23:37 +0200)]
css: Refactor code to do property lookups earlier

We want to ook up the property in the CSS parser, so we can do fancy
things with it. We currently don't but we want to later.

13 years agostyleproperties: Speed up by not optimizing
Benjamin Otte [Mon, 16 May 2011 20:46:59 +0000 (22:46 +0200)]
styleproperties: Speed up by not optimizing

g_quark_try_string() takes a lock and then does a hashtable lookup. So
just using a string hash table for properties is faster.

13 years agostyleproperties: Speed up style_property_lookup()
Benjamin Otte [Mon, 16 May 2011 20:35:21 +0000 (22:35 +0200)]
styleproperties: Speed up style_property_lookup()

Use the already existing bsearch version instead of iterating the array
manually.

13 years agostyleproperties: Use the pspec as the hash table key
Benjamin Otte [Mon, 16 May 2011 20:22:42 +0000 (22:22 +0200)]
styleproperties: Use the pspec as the hash table key

The code used the quarked name before, but when we already have the
pspec we want to have a lookup that does not involve quarking. And
lookup is equally fast if we only have the name.

13 years agocss: Make _gtk_css_selector_matches() take a path length
Benjamin Otte [Mon, 16 May 2011 18:20:55 +0000 (20:20 +0200)]
css: Make _gtk_css_selector_matches() take a path length

This will be necessary when handling inherit.

13 years agocssprovider: Simplify code
Benjamin Otte [Mon, 16 May 2011 17:54:57 +0000 (19:54 +0200)]
cssprovider: Simplify code

Don't go through an intermediate array when matching styles.

13 years agostyleproperties: Mark "color" and "font" as inherit
Benjamin Otte [Mon, 16 May 2011 17:42:27 +0000 (19:42 +0200)]
styleproperties: Mark "color" and "font" as inherit

Keeping it identical to CSS 2.1 again

13 years agoAPI: Add API to set style properties to be inherit
Benjamin Otte [Mon, 16 May 2011 17:31:47 +0000 (19:31 +0200)]
API: Add API to set style properties to be inherit

The API is not used anywhere yet.

13 years agocssprovider: Speed up gtk_widget_style_get() property lookups
Benjamin Otte [Mon, 16 May 2011 15:55:50 +0000 (17:55 +0200)]
cssprovider: Speed up gtk_widget_style_get() property lookups

Previously we got the list of all matching rules and then iterated it to
find the first one that had the property. Now we look while matching
rules, so we don't lookup rules that we don't need.

13 years agocss: Don't query type for regions
Benjamin Otte [Mon, 16 May 2011 02:31:07 +0000 (04:31 +0200)]
css: Don't query type for regions

Regions are regions and don't match by type.

13 years agoreftests: Add a test ensuring selectors don't match children
Benjamin Otte [Sun, 15 May 2011 11:27:19 +0000 (13:27 +0200)]
reftests: Add a test ensuring selectors don't match children

Previously, the selector "Foo" would not only match Foo widgets, but
also all widgets that are descendants of Foo.

13 years agoreftests: Add a test for descendant CSS selectors match
Benjamin Otte [Sun, 15 May 2011 11:24:10 +0000 (13:24 +0200)]
reftests: Add a test for descendant CSS selectors match

In widget hierarchy like "Foo Bar Bar Baz", we want the selector "Foo >
Bar Baz" to match, because it matches the elements 1, 2 and 4.
Previously, the selector only matches the Bar at position 3 and then
failed because it wasn't preceded by a Foo.

13 years agoreftests: Add a test that checks that * matches regions
Benjamin Otte [Sun, 15 May 2011 11:20:51 +0000 (13:20 +0200)]
reftests: Add a test that checks that * matches regions

13 years agoreftests: Unset background-image in CSS of test
Benjamin Otte [Sun, 15 May 2011 11:05:55 +0000 (13:05 +0200)]
reftests: Unset background-image in CSS of test

Otherwise the test screws up when it's set

13 years agoreftests: Add a check for matching regions only once
Benjamin Otte [Sun, 15 May 2011 00:55:22 +0000 (02:55 +0200)]
reftests: Add a check for matching regions only once

13 years agotests: Add a test for enum values
Benjamin Otte [Sat, 14 May 2011 23:22:24 +0000 (01:22 +0200)]
tests: Add a test for enum values

13 years agocss: Raised SYNTAX error when enum value can't be parsed
Benjamin Otte [Sun, 15 May 2011 13:55:13 +0000 (15:55 +0200)]
css: Raised SYNTAX error when enum value can't be parsed

13 years agoreftests: Add a test for matching by class
Benjamin Otte [Sat, 14 May 2011 23:28:17 +0000 (01:28 +0200)]
reftests: Add a test for matching by class

13 years agoreftests: Add a test for matching by name
Benjamin Otte [Sat, 14 May 2011 22:34:43 +0000 (00:34 +0200)]
reftests: Add a test for matching by name

13 years agoreftests: Add a test for matching by subtype
Benjamin Otte [Sat, 14 May 2011 11:36:00 +0000 (13:36 +0200)]
reftests: Add a test for matching by subtype

13 years agoreftests: Add test to check that matching by type works
Benjamin Otte [Sat, 14 May 2011 11:35:19 +0000 (13:35 +0200)]
reftests: Add test to check that matching by type works

13 years agotests: Add a test to ensure we handle unknown pseudo-classes correctly
Benjamin Otte [Sat, 14 May 2011 22:17:04 +0000 (00:17 +0200)]
tests: Add a test to ensure we handle unknown pseudo-classes correctly

1) We want to throw an unknown value
2) We want to skip the whole rule

13 years agotests: Add a test for all selector combination
Benjamin Otte [Sat, 14 May 2011 22:15:25 +0000 (00:15 +0200)]
tests: Add a test for all selector combination

The test contains an error where we complain about a duplicate value for
":hover:hover"

13 years agocss: No more special code for regions
Benjamin Otte [Sat, 14 May 2011 21:54:37 +0000 (23:54 +0200)]
css: No more special code for regions

Just treat regions the same as elements.