Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Move functions to "unstable" headers that can be used at own
risk by those wanting to implement custom properties.
|
|
Unload stale CSS part using the new descriptor infrastructure.
|
|
Every selector now stores a descriptor of the CSS file or buffer
it originates from. For unloading a file or buffer the internal
stylesheet representation is iterated and all selectors and blocks
with matching descriptors are destroyed.
This also requires an update to ccss_node_get_style(), the descriptor
for the inline style is passed to the callback, which the consumer must
store in order to unload the inline style later on.
The above change in turn obsoletes ccss_stylesheet_invalidate_node()
since all unloading now uses a consistent API.
Also fix a related memory leak, selectors and -groups would be left
over when destroying a stylesheet.
|
|
Also add ability to load stylesheets with 'user-agent', 'user' or
'author' precedence.
This requires a new function ccss_grammar_create_stylesheet() for
creating an empty stylesheet.
|
|
|
|
|
|
Add "example-6" as showcase and test.
|
|
The 'background', 'border', 'border-image' and 'color'
properties can now be queried in interpreted format
without depending on cairo.
Also implement a cache for loaded images (cairo
surfaces). Cache key is the image file's uri.
|
|
|
|
default property handler is overwritten.
|
|
* ccss-doc/tmpl/grammar.sgml:
* ccss-gtk/Makefile.am:
* ccss-gtk/ccss-gtk-properties.c:
* ccss-gtk/ccss-gtk-properties.h:
* ccss/ccss-grammar.c (ccss_grammar_lookup_property),
(ccss_grammar_lookup_function):
* ccss/ccss-grammar.h:
* ccss/ccss.sym:
API to query property- and function-handlers.
|
|
* ccss-cairo/ccss-image.c (load_image):
* ccss-doc/ccss-sections.txt:
* ccss-doc/tmpl/stylesheet.sgml:
* ccss/ccss-grammar.c (ccss_grammar_create_stylesheet_from_buffer),
(ccss_grammar_create_stylesheet_from_file):
* ccss/ccss-style-priv.h:
* ccss/ccss-style.c (ccss_style_destroy):
* ccss/ccss-stylesheet-priv.h:
* ccss/ccss-stylesheet.c (ccss_stylesheet_create),
(ccss_stylesheet_add_from_file), (ccss_stylesheet_destroy),
(ccss_stylesheet_reference), (ccss_stylesheet_get_reference_count),
(ccss_stylesheet_query_type), (ccss_stylesheet_query):
* ccss/ccss-stylesheet.h:
* ccss/ccss.sym:
Reference counting for `ccss_stylesheet_t'.
|
|
(background_factory), (background_attachment_create),
(background_image_create), (background_position_create),
(background_repeat_create), (background_size_create):
* ccss-cairo/ccss-border-image-parser.c (border_image_create):
* ccss-cairo/ccss-border-parser.c (border_color_factory),
(border_style_factory), (border_width_factory),
(border_factory_impl), (border_factory), (border_left_factory),
(border_top_factory), (border_right_factory),
(border_bottom_factory), (border_radius_create),
(border_radius_factory), (border_style_create),
(border_width_create):
* ccss-cairo/ccss-color.c (ccss_color_parse), (ccss_color_create):
* ccss-cairo/ccss-color.h:
* ccss-cairo/ccss-image.c (ccss_image_parse):
* ccss-cairo/ccss-image.h:
* ccss-doc/tmpl/grammar.sgml:
* ccss-doc/tmpl/node.sgml:
* ccss-doc/tmpl/property.sgml:
* ccss-doc/tmpl/stylesheet.sgml:
* ccss/ccss-grammar-function.c (ccss_grammar_invoke_function):
* ccss/ccss-grammar-parse.c (property_cb),
(ccss_grammar_parse_file), (ccss_grammar_parse_buffer),
(ccss_grammar_parse_inline):
* ccss/ccss-grammar-priv.h:
* ccss/ccss-grammar.c (ccss_grammar_create_stylesheet_from_buffer),
(ccss_grammar_create_stylesheet_from_file):
* ccss/ccss-grammar.h:
* ccss/ccss-property-generic.c (property_create):
* ccss/ccss-property.h:
* ccss/ccss-stylesheet.c (ccss_stylesheet_add_from_file),
(query_node):
* ccss/ccss-stylesheet.h:
* examples/example-1.c (main):
* examples/example-2.c (main):
* examples/example-3.c (main):
* examples/example-4.c (main):
* examples/example-5.c (main):
Pass user-data to property- and function-handlers.
|
|
* ccss/ccss-block.c:
* ccss/ccss-block.h:
* ccss/ccss-function.h:
* ccss/ccss-grammar-function.c:
* ccss/ccss-grammar-parse.c:
* ccss/ccss-grammar-priv.h:
* ccss/ccss-grammar.c:
* ccss/ccss-grammar.h:
* ccss/ccss-macros.h:
* ccss/ccss-node-priv.h:
* ccss/ccss-node.c:
* ccss/ccss-node.h:
* ccss/ccss-priv.h:
* ccss/ccss-property-generic.c:
* ccss/ccss-property-generic.h:
* ccss/ccss-property.c:
* ccss/ccss-property.h:
* ccss/ccss-selector-group.c:
* ccss/ccss-selector-group.h:
* ccss/ccss-selector.c:
* ccss/ccss-selector.h:
* ccss/ccss-style-priv.h:
* ccss/ccss-style.c:
* ccss/ccss-style.h:
* ccss/ccss-stylesheet-priv.h:
* ccss/ccss-stylesheet.c:
* ccss/ccss-stylesheet.h:
* ccss/ccss.c:
* ccss/ccss.h:
Tweak license header.
|
|
(ccss_grammar_parse_buffer), (ccss_grammar_parse_inline):
* ccss/ccss-grammar-priv.h:
* ccss/ccss-grammar.c (ccss_grammar_create_stylesheet_from_buffer),
(ccss_grammar_create_stylesheet_from_file):
* ccss/ccss-stylesheet.c (ccss_stylesheet_add_from_file),
(query_node):
Improve internal naming consistency.
|
|
* ccss-cairo-doc/ccss-cairo-sections.txt:
* ccss-cairo-doc/tmpl/grammar.sgml:
* ccss-doc/ccss-docs.sgml:
* ccss-doc/ccss-sections.txt:
* ccss-doc/tmpl/ccss-unused.sgml:
* ccss-doc/tmpl/ccss.sgml:
* ccss-doc/tmpl/grammar.sgml:
* ccss-doc/tmpl/node.sgml:
* ccss-doc/tmpl/property.sgml:
* ccss-doc/tmpl/stylesheet.sgml:
* ccss/ccss-grammar-priv.h:
* ccss/ccss-grammar.c:
Update docs.
|
|
* ccss/ccss-function-priv.h:
* ccss/ccss-function.c:
* ccss/ccss-function.h:
* ccss/ccss-grammar-function.c (parse_args_r),
(ccss_grammar_invoke_function):
* ccss/ccss-grammar-parse.c (map_attribute_selector_match),
(calculate_importance), (walk_additional_selector),
(walk_simple_selector_r), (walk_selector), (start_selector_cb),
(property_cb), (end_selector_cb), (ccss_parser_parse_file),
(ccss_parser_parse_buffer), (ccss_parser_parse_inline):
* ccss/ccss-grammar-priv.h:
* ccss/ccss-grammar.c (ccss_grammar_create),
(ccss_grammar_destroy), (ccss_grammar_reference),
(ccss_grammar_get_reference_count), (ccss_grammar_add_properties),
(ccss_grammar_add_functions),
(ccss_grammar_create_stylesheet_from_buffer),
(ccss_grammar_create_stylesheet_from_file):
* ccss/ccss-grammar.h:
* ccss/ccss-parser.c:
* ccss/ccss-parser.h:
* ccss/ccss-stylesheet-priv.h:
* ccss/ccss-stylesheet.c (ccss_stylesheet_fix_dangling_selectors),
(ccss_stylesheet_add_from_file), (ccss_stylesheet_destroy),
(query_node):
* ccss/ccss-stylesheet.h:
* ccss/ccss.c (ccss_init), (ccss_shutdown):
* ccss/ccss.h:
* ccss/ccss.sym:
Introduce `ccss_grammar_t' to move away from global properties and functions.
|