summaryrefslogtreecommitdiff
path: root/include/libcss/hint.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-07-08 22:05:34 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2016-02-02 10:55:16 +0000
commit761a9a99b72cfd2aa9e4d159c1bbd859cf70bd3f (patch)
treee34db76f0bbb2e4f975c91eb2ed114ff856acc84 /include/libcss/hint.h
parent842120bede2ef48f04f8bb3a1c8967d0d7457cac (diff)
downloadlibcss-761a9a99b72cfd2aa9e4d159c1bbd859cf70bd3f.tar.gz
libcss-761a9a99b72cfd2aa9e4d159c1bbd859cf70bd3f.tar.bz2
Change how presentational hints are handled.
Previously, we performed normal selection from CSS sources, and then iterated over all the properties in the populated computed style. If the properties were unset or their values were not from either a UA stylesheet or user stylesheet with !important set, then we asked the client program (e.g. NetSurf) if there were any presentational hints for that node, for each such property. In the worst case this triggered N_PROPERTIES * N_NODES calls back to the client program, even for properties that can't be set via HTML attributes. The new API asks the client to supply a list of all the presentational hints that apply to the given node. For most nodes on modern documents, this is 0. Any presentational hints are applied before selection from CSS sources.
Diffstat (limited to 'include/libcss/hint.h')
-rw-r--r--include/libcss/hint.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libcss/hint.h b/include/libcss/hint.h
index c3e928d..629d2f6 100644
--- a/include/libcss/hint.h
+++ b/include/libcss/hint.h
@@ -49,7 +49,8 @@ typedef struct css_hint {
lwc_string **strings;
} data;
- uint8_t status;
+ uint32_t prop; /**< Property index */
+ uint8_t status; /**< Property value */
} css_hint;
#ifdef __cplusplus