r6390 jmb - in /trunk/libcss: include/libcss/computed.h
include/libcss/select.h src/select/computed.c src/select/computed.h
src/select/select.c
netsurf at semichrome.net
netsurf at semichrome.net
Sat Feb 7 02:22:17 GMT 2009
Author: jmb
Date: Fri Feb 6 20:22:17 2009
New Revision: 6390
URL: http://source.netsurf-browser.org?rev=6390&view=rev
Log:
Oh look, I've changed my mind again.
It's far better that the client creates computed style objects which we then populate. This will allow more efficient composition of styles as, in the most common case, it won't require any memory allocation.
Removed:
trunk/libcss/src/select/computed.h
Modified:
trunk/libcss/include/libcss/computed.h
trunk/libcss/include/libcss/select.h
trunk/libcss/src/select/computed.c
trunk/libcss/src/select/select.c
Modified: trunk/libcss/include/libcss/computed.h
URL: http://source.netsurf-browser.org/trunk/libcss/include/libcss/computed.h?rev=6390&r1=6389&r2=6390&view=diff
==============================================================================
--- trunk/libcss/include/libcss/computed.h (original)
+++ trunk/libcss/include/libcss/computed.h Fri Feb 6 20:22:17 2009
@@ -294,11 +294,13 @@
void *pw;
};
+css_error css_computed_style_create(css_alloc alloc, void *pw,
+ css_computed_style **result);
css_error css_computed_style_destroy(css_computed_style *style);
css_error css_computed_style_compose(const css_computed_style *parent,
const css_computed_style *child,
- css_computed_style **result);
+ css_computed_style *result);
/******************************************************************************
* Property accessors below here *
Modified: trunk/libcss/include/libcss/select.h
URL: http://source.netsurf-browser.org/trunk/libcss/include/libcss/select.h?rev=6390&r1=6389&r2=6390&view=diff
==============================================================================
--- trunk/libcss/include/libcss/select.h (original)
+++ trunk/libcss/include/libcss/select.h Fri Feb 6 20:22:17 2009
@@ -29,6 +29,6 @@
css_error css_select_style(css_select_ctx *ctx, void *node,
uint64_t pseudo_element, uint64_t pseudo_classes,
- uint64_t media, css_computed_style **result);
+ uint64_t media, css_computed_style *result);
#endif
Modified: trunk/libcss/src/select/computed.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/select/computed.c?rev=6390&r1=6389&r2=6390&view=diff
==============================================================================
--- trunk/libcss/src/select/computed.c (original)
+++ trunk/libcss/src/select/computed.c Fri Feb 6 20:22:17 2009
@@ -7,7 +7,8 @@
#include <string.h>
-#include "select/computed.h"
+#include <libcss/computed.h>
+
#include "utils/utils.h"
/**
@@ -109,7 +110,7 @@
*
* \param parent Parent style
* \param child Child style
- * \param result Pointer to location to receive composed style
+ * \param result Pointer to style to compose into
* \return CSS_OK on success, appropriate error otherwise.
*
* Precondition: Parent is a fully composed style (thus has no properties
@@ -117,7 +118,7 @@
*/
css_error css_computed_style_compose(const css_computed_style *parent,
const css_computed_style *child,
- css_computed_style **result)
+ css_computed_style *result)
{
UNUSED(parent);
UNUSED(child);
Removed: trunk/libcss/src/select/computed.h
URL: http://source.netsurf-browser.org/trunk/libcss/src/select/computed.h?rev=6389&view=auto
==============================================================================
--- trunk/libcss/src/select/computed.h (original)
+++ trunk/libcss/src/select/computed.h (removed)
@@ -1,16 +1,0 @@
-/*
- * This file is part of LibCSS
- * Licensed under the MIT License,
- * http://www.opensource.org/licenses/mit-license.php
- * Copyright 2009 John-Mark Bell <jmb at netsurf-browser.org>
- */
-
-#ifndef css_select_computed_h_
-#define css_select_computed_h_
-
-#include <libcss/computed.h>
-
-css_error css_computed_style_create(css_alloc alloc, void *pw,
- css_computed_style **result);
-
-#endif
Modified: trunk/libcss/src/select/select.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/select/select.c?rev=6390&r1=6389&r2=6390&view=diff
==============================================================================
--- trunk/libcss/src/select/select.c (original)
+++ trunk/libcss/src/select/select.c Fri Feb 6 20:22:17 2009
@@ -213,7 +213,7 @@
* \param pseudo_element Pseudo element to select for, instead
* \param pseudo_classes Currently active pseudo classes
* \param media Currently active media types
- * \param result Pointer to location to receive resulting style
+ * \param result Pointer to style to populate
* \return CSS_OK on success, appropriate error otherwise.
*
* In computing the style, no reference is made to the parent node's
@@ -227,7 +227,7 @@
*/
css_error css_select_style(css_select_ctx *ctx, void *node,
uint64_t pseudo_element, uint64_t pseudo_classes,
- uint64_t media, css_computed_style **result)
+ uint64_t media, css_computed_style *result)
{
UNUSED(ctx);
UNUSED(node);
More information about the netsurf-commits
mailing list