mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 13:06:49 +03:00
Split out presentational hints handling.
This commit is contained in:
parent
f06ec6390a
commit
8e580ccd19
@ -1,5 +1,5 @@
|
|||||||
# CSS sources
|
# CSS sources
|
||||||
|
|
||||||
S_CSS := css.c dump.c internal.c select.c utils.c
|
S_CSS := css.c dump.c internal.c hints.c select.c utils.c
|
||||||
|
|
||||||
S_CSS := $(addprefix css/,$(S_CSS))
|
S_CSS := $(addprefix css/,$(S_CSS))
|
||||||
|
1794
css/hints.c
Normal file
1794
css/hints.c
Normal file
File diff suppressed because it is too large
Load Diff
48
css/hints.h
Normal file
48
css/hints.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
|
||||||
|
*
|
||||||
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
||||||
|
*
|
||||||
|
* NetSurf is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; version 2 of the License.
|
||||||
|
*
|
||||||
|
* NetSurf is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NETSURF_CSS_HINTS_H_
|
||||||
|
#define NETSURF_CSS_HINTS_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "css/css.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback to retrieve presentational hints for a node
|
||||||
|
*
|
||||||
|
* \param pw HTML document
|
||||||
|
* \param node DOM node
|
||||||
|
* \param property CSS property to retrieve
|
||||||
|
* \param hint Pointer to hint object to populate
|
||||||
|
* \return CSS_OK on success,
|
||||||
|
* CSS_PROPERTY_NOT_SET if there is no hint for the requested property,
|
||||||
|
* CSS_NOMEM on memory exhaustion.
|
||||||
|
*/
|
||||||
|
css_error node_presentational_hint(
|
||||||
|
void *pw,
|
||||||
|
void *node,
|
||||||
|
uint32_t property,
|
||||||
|
css_hint *hint);
|
||||||
|
|
||||||
|
bool nscss_parse_colour(const char *data, css_color *result);
|
||||||
|
|
||||||
|
#endif
|
1789
css/select.c
1789
css/select.c
File diff suppressed because it is too large
Load Diff
@ -49,9 +49,9 @@ css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
|
|||||||
css_computed_style *nscss_get_blank_style(nscss_select_ctx *ctx,
|
css_computed_style *nscss_get_blank_style(nscss_select_ctx *ctx,
|
||||||
const css_computed_style *parent);
|
const css_computed_style *parent);
|
||||||
|
|
||||||
css_error nscss_compute_font_size(void *pw, const css_hint *parent,
|
|
||||||
css_hint *size);
|
|
||||||
|
|
||||||
bool nscss_parse_colour(const char *data, css_color *result);
|
css_error named_ancestor_node(void *pw, void *node,
|
||||||
|
const css_qname *qname, void **ancestor);
|
||||||
|
css_error node_is_visited(void *pw, void *node, bool *match);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,8 +36,9 @@
|
|||||||
#include "utils/config.h"
|
#include "utils/config.h"
|
||||||
#include "content/content_protected.h"
|
#include "content/content_protected.h"
|
||||||
#include "css/css.h"
|
#include "css/css.h"
|
||||||
#include "css/utils.h"
|
#include "css/hints.h"
|
||||||
#include "css/select.h"
|
#include "css/select.h"
|
||||||
|
#include "css/utils.h"
|
||||||
#include "utils/nsoption.h"
|
#include "utils/nsoption.h"
|
||||||
#include "utils/corestrings.h"
|
#include "utils/corestrings.h"
|
||||||
#include "utils/locale.h"
|
#include "utils/locale.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user