diff options
author | Sebastian Geerken <devnull@localhost> | 2013-10-14 19:41:15 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2013-10-14 19:41:15 +0200 |
commit | bd6a97f011cd71bcd679b7fba09fa60f9fb2e0a8 (patch) | |
tree | fa29e1faef5a8af6f566c31fc3dad02b69224655 | |
parent | 5271d9882e06d2fa8ffb2c6c4323a1fd88db81d4 (diff) |
Minor cleanup.
-rw-r--r-- | src/cssparser.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc index ce6225dd..0d0ce5a1 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -1116,18 +1116,16 @@ bool CssParser::parseValue(CssPropertyName prop, // Only valid, when a combination h/v or v/h is possible. if ((h[0] && v[1]) || (v[0] && h[1])) { ret = true; - CssBackgroundPosition *position = - (CssBackgroundPosition *) malloc(sizeof(CssBackgroundPosition)); - val->posVal = position; + val->posVal = dNew(CssBackgroundPosition, 1); // Prefer combination h/v: if (h[0] && v[1]) { - position->posX = pos[0]; - position->posY = pos[1]; + val->posVal->posX = pos[0]; + val->posVal->posY = pos[1]; } else { // This should be v/h: - position->posX = pos[1]; - position->posY = pos[0]; + val->posVal->posX = pos[1]; + val->posVal->posY = pos[0]; } } } |