summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSStyleApplyProperty.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebCore/css/CSSStyleApplyProperty.cpp
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebCore/css/CSSStyleApplyProperty.cpp')
-rw-r--r--Source/WebCore/css/CSSStyleApplyProperty.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/WebCore/css/CSSStyleApplyProperty.cpp b/Source/WebCore/css/CSSStyleApplyProperty.cpp
index 629470b89..524ed773c 100644
--- a/Source/WebCore/css/CSSStyleApplyProperty.cpp
+++ b/Source/WebCore/css/CSSStyleApplyProperty.cpp
@@ -349,6 +349,8 @@ public:
static void setValue(RenderStyle* style, Length value) { (style->*setterFunction)(value); }
static void applyValue(CSSStyleSelector* selector, CSSValue* value)
{
+ float positiveFlex = 0;
+ float negativeFlex = 0;
if (!value->isPrimitiveValue()) {
if (!flexDirection || !value->isFlexValue())
return;
@@ -356,13 +358,16 @@ public:
CSSFlexValue* flexValue = static_cast<CSSFlexValue*>(value);
value = flexValue->preferredSize();
- if (flexDirection == FlexWidth) {
- selector->style()->setFlexboxWidthPositiveFlex(flexValue->positiveFlex());
- selector->style()->setFlexboxWidthNegativeFlex(flexValue->negativeFlex());
- } else if (flexDirection == FlexHeight) {
- selector->style()->setFlexboxHeightPositiveFlex(flexValue->positiveFlex());
- selector->style()->setFlexboxHeightNegativeFlex(flexValue->negativeFlex());
- }
+ positiveFlex = flexValue->positiveFlex();
+ negativeFlex = flexValue->negativeFlex();
+ }
+
+ if (flexDirection == FlexWidth) {
+ selector->style()->setFlexboxWidthPositiveFlex(positiveFlex);
+ selector->style()->setFlexboxWidthNegativeFlex(negativeFlex);
+ } else if (flexDirection == FlexHeight) {
+ selector->style()->setFlexboxHeightPositiveFlex(positiveFlex);
+ selector->style()->setFlexboxHeightNegativeFlex(negativeFlex);
}
CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value);