summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-02-07 02:22:17 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-02-07 02:22:17 +0000
commit81a449399607a98b7c87890aea4a2eff03498050 (patch)
treea6cd543a019b1258d8d783726c277f475285d4bc /src
parent3f5ac6a18b13034f14c7f9261f57887a52e454e3 (diff)
downloadlibcss-81a449399607a98b7c87890aea4a2eff03498050.tar.gz
libcss-81a449399607a98b7c87890aea4a2eff03498050.tar.bz2
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. svn path=/trunk/libcss/; revision=6390
Diffstat (limited to 'src')
-rw-r--r--src/select/computed.c7
-rw-r--r--src/select/computed.h16
-rw-r--r--src/select/select.c4
3 files changed, 6 insertions, 21 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 6a6808b..a12e10f 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -7,7 +7,8 @@
#include <string.h>
-#include "select/computed.h"
+#include <libcss/computed.h>
+
#include "utils/utils.h"
/**
@@ -109,7 +110,7 @@ css_error css_computed_style_destroy(css_computed_style *style)
*
* \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_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)
{
UNUSED(parent);
UNUSED(child);
diff --git a/src/select/computed.h b/src/select/computed.h
deleted file mode 100644
index eddc7c0..0000000
--- a/src/select/computed.h
+++ /dev/null
@@ -1,16 +0,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@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
diff --git a/src/select/select.c b/src/select/select.c
index ac13d22..dbf5d01 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -213,7 +213,7 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
* \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_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
*/
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);