summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-08-19 18:22:45 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2015-08-19 18:22:45 +0100
commitf69e9c4be1b4f44a7373ada19f45cd1bca56581d (patch)
tree3641a5f978d070100ac013a781a92ae87010d792
parentf6f52757684709f7b09ed68b534226ae31633bce (diff)
downloadlibcss-tlsa/print-inherit-debug.tar.gz
Debug for PulkoMandy.tlsa/print-inherit-debug
-rw-r--r--src/select/select.c43
1 files changed, 40 insertions, 3 deletions
diff --git a/src/select/select.c b/src/select/select.c
index 92696ff..f4c18ea 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -405,7 +405,7 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
return CSS_OK;
}
-
+#include "select/propget.h"
/**
* Select a style for the given node
*
@@ -586,7 +586,18 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
for (i = 0; i < CSS_N_PROPERTIES; i++) {
const prop_state *prop =
&state.props[i][CSS_PSEUDO_ELEMENT_NONE];
-
+if (i == CSS_PROP_FONT_SIZE) {
+ css_fixed temp_length;
+ css_unit temp_unit;
+ uint8_t temp_ret = get_font_size(
+ state.results->styles[CSS_PSEUDO_ELEMENT_NONE],
+ &temp_length, &temp_unit);
+ printf("node %p, parent %p: PRE HINT: inherit: %s, value: %u\n",
+ node,
+ parent,
+ (prop->inherit == true)?"true":"false",
+ temp_ret);
+}
/* Apply presentational hints if the property is unset or
* the existing property value did not come from an author
* stylesheet or a user sheet using !important. */
@@ -597,7 +608,18 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
if (error != CSS_OK)
goto cleanup;
}
-
+if (i == CSS_PROP_FONT_SIZE) {
+ css_fixed temp_length;
+ css_unit temp_unit;
+ uint8_t temp_ret = get_font_size(
+ state.results->styles[CSS_PSEUDO_ELEMENT_NONE],
+ &temp_length, &temp_unit);
+ printf("node %p, parent %p: PRE INIT: inherit: %s, value: %u\n",
+ node,
+ parent,
+ (prop->inherit == true)?"true":"false",
+ temp_ret);
+}
/* If the property is still unset or it's set to inherit
* and we're the root element, then set it to its initial
* value. */
@@ -609,6 +631,18 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
if (error != CSS_OK)
goto cleanup;
}
+if (i == CSS_PROP_FONT_SIZE) {
+ css_fixed temp_length;
+ css_unit temp_unit;
+ uint8_t temp_ret = get_font_size(
+ state.results->styles[CSS_PSEUDO_ELEMENT_NONE],
+ &temp_length, &temp_unit);
+ printf("node %p, parent %p: POST INIT: inherit: %s, value: %u\n",
+ node,
+ parent,
+ (prop->inherit == true)?"true":"false",
+ temp_ret);
+}
}
/* Pseudo elements, if any */
@@ -2290,6 +2324,9 @@ bool css__outranks_existing(uint16_t op, bool important, css_select_state *state
}
if (outranks) {
+if (op == CSS_PROP_FONT_SIZE)
+ printf("Setting font-size: inherit: %s\n",
+ (inherit == true)?"true":"false");
/* The new property is about to replace the old one.
* Update our state to reflect this. */
existing->set = 1;