diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2014-02-15 23:58:41 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2014-02-15 23:58:41 +0100 |
commit | 891ba8ec637c42a173dd5b044de4e56f86a33fec (patch) | |
tree | 5230b92f5c38966a52e61a58cedbd6f413a96c19 /src/styleengine.cc | |
parent | ff62eabe7e4045721c8a22fb0d0ab75dc85cdb06 (diff) |
share user agent style between CssContext's
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 64861973..25e2e600 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; @@ -939,7 +938,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}" @@ -996,7 +995,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); } |