summaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-09-30 21:09:16 +0200
committerSebastian Geerken <devnull@localhost>2013-09-30 21:09:16 +0200
commit1bc80ace64c68cad386bdcb3efc37fd9a8ccc558 (patch)
tree91bd8cef9a30786296a2ebae1e28fe340af17493 /src/styleengine.cc
parentb2fd371c4311d5d6abe7c724c8025a37c534942b (diff)
Cleaned up Johannes' patch.
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 8d425371..01ba71f8 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -630,21 +630,10 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props,
attrs->wordSpacing = -1000;
break;
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.posVal->posX);
- else
- computeLength (&attrs->backgroundPositionX, p->value.posVal->posX,
- attrs->font);
- if (p->type == CSS_TYPE_ENUM)
- // See comment above.
- attrs->backgroundPositionY =
- createPerLength (0.5 * (double)p->value.posVal->posY);
- else
- computeLength (&attrs->backgroundPositionY, p->value.posVal->posY,
- attrs->font);
+ computeLength (&attrs->backgroundPositionX, p->value.posVal->posX,
+ attrs->font);
+ computeLength (&attrs->backgroundPositionY, p->value.posVal->posY,
+ attrs->font);
break;
case PROPERTY_X_LINK:
attrs->x_link = p->value.intVal;