diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2014-07-02 21:47:41 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2014-07-02 21:47:41 +0200 |
commit | b56a58caf9ef4d5087a9741bfa6a6cfb1977b631 (patch) | |
tree | 630515d430e06318a40bde72ba90d87dc17764b7 /src/styleengine.cc | |
parent | d4b1ef469fa0362035e55365923916a40998dc84 (diff) |
make dpmm a proper member of StyleEngine
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r-- | src/styleengine.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 024ef56d..f92cccf8 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -71,6 +71,7 @@ StyleEngine::StyleEngine (dw::core::Layout *layout, this->pageUrl = pageUrl ? a_Url_dup(pageUrl) : NULL; this->baseUrl = baseUrl ? a_Url_dup(baseUrl) : NULL; importDepth = 0; + dpmm = layout->dpiX () / 25.4; /* assume dpiX == dpiY */ stackPush (); Node *n = stack->getLastRef (); @@ -760,11 +761,6 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props, * \brief Resolve relative lengths to absolute values. */ bool StyleEngine::computeValue (int *dest, CssLength value, Font *font) { - static float dpmm; - - if (dpmm == 0.0) - dpmm = layout->dpiX () / 25.4; /* assume dpiX == dpiY */ - switch (CSS_LENGTH_TYPE (value)) { case CSS_LENGTH_TYPE_PX: *dest = (int) CSS_LENGTH_VALUE (value); |