diff options
author | Sebastian Geerken <devnull@localhost> | 2014-03-01 21:26:25 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-03-01 21:26:25 +0100 |
commit | 975ba73389d2de0cd2bb50183bd988eab6ba0e06 (patch) | |
tree | 67947a7e22dd049685dc034223c212e2ae14c902 /src/styleengine.cc | |
parent | 6369c18d186d52f0f3f5082ff6c9fdcf5c9285d1 (diff) | |
parent | 8818cda9ca4e4c19c4c5fcee68460d5ba0cd5ba2 (diff) |
Merge with main repo.
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 10 |
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); } |