aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <devnull@localhost>2013-09-30 20:34:03 +0200
committerJohannes Hofmann <devnull@localhost>2013-09-30 20:34:03 +0200
commitb2fd371c4311d5d6abe7c724c8025a37c534942b (patch)
tree03c650c1e3b34e32012f5a7d208dff5a526240bb /src/styleengine.cc
parent50c1c525fcb7ffa6384e9f5d6afae96370556ca1 (diff)
New type for <background-position> (incomplete).
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 4c1a315c..8d425371 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -629,23 +629,21 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props,
else if (attrs->wordSpacing < -1000)
attrs->wordSpacing = -1000;
break;
- case CSS_PROPERTY_X_BACKGROUND_POSITION_X:
+ case CSS_PROPERTY_BACKGROUND_POSITION:
if (p->type == CSS_TYPE_ENUM)
// Enums are sorted: 0 = left = 0%; 1 = center = 50%;
// 2 = right = 100%.
attrs->backgroundPositionX =
- createPerLength (0.5 * (double)p->value.intVal);
+ createPerLength (0.5 * (double)p->value.posVal->posX);
else
- computeLength (&attrs->backgroundPositionX, p->value.intVal,
+ computeLength (&attrs->backgroundPositionX, p->value.posVal->posX,
attrs->font);
- break;
- case CSS_PROPERTY_X_BACKGROUND_POSITION_Y:
if (p->type == CSS_TYPE_ENUM)
// See comment above.
attrs->backgroundPositionY =
- createPerLength (0.5 * (double)p->value.intVal);
+ createPerLength (0.5 * (double)p->value.posVal->posY);
else
- computeLength (&attrs->backgroundPositionY, p->value.intVal,
+ computeLength (&attrs->backgroundPositionY, p->value.posVal->posY,
attrs->font);
break;
case PROPERTY_X_LINK: