aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 2da9d8f7..ffc0b0f6 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -65,7 +65,6 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) {
doctree = new Doctree ();
stack = new lout::misc::SimpleVector <Node> (1);
cssContext = new CssContext ();
- buildUserAgentStyle ();
buildUserStyle ();
this->layout = layout;
importDepth = 0;
@@ -548,8 +547,10 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props,
attrs->backgroundImage->connectDeletion
(new StyleImageDeletionReceiver (clientKey));
}
+
+ a_Url_free (imgUrl);
}
- break;
+ break;
case CSS_PROPERTY_BACKGROUND_POSITION:
computeLength (&attrs->backgroundPositionX, p->value.posVal->posX,
attrs->font);
@@ -958,7 +959,7 @@ void StyleEngine::parse (DilloHtml *html, DilloUrl *url, const char *buf,
* The user agent style defines how dillo renders HTML in the absence of
* author or user styles.
*/
-void StyleEngine::buildUserAgentStyle () {
+void StyleEngine::init () {
const char *cssBuf =
"body {margin: 5px}"
"big {font-size: 1.17em}"
@@ -1015,7 +1016,8 @@ void StyleEngine::buildUserAgentStyle () {
*/
"table, caption {font-size: medium; font-weight: normal}";
- CssParser::parse (NULL, NULL, cssContext, cssBuf, strlen (cssBuf),
+ CssContext context;
+ CssParser::parse (NULL, NULL, &context, cssBuf, strlen (cssBuf),
CSS_ORIGIN_USER_AGENT);
}