Source/WebCore/ChangeLog

 12012-03-07 Sheriff Bot <webkit.review.bot@gmail.com>
 2
 3 Unreviewed, rolling out r110126.
 4 http://trac.webkit.org/changeset/110126
 5 https://bugs.webkit.org/show_bug.cgi?id=80558
 6
 7 compile failed on AppleMac (Requested by ukai on #webkit).
 8
 9 * WebCore.exp.in:
 10 * css/CSSCalculationValue.cpp:
 11 * css/CSSCalculationValue.h:
 12 (WebCore):
 13 (CSSCalcExpressionNode):
 14 (CSSCalcValue):
 15 * css/CSSPrimitiveValue.cpp:
 16 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
 17 * css/CSSStyleApplyProperty.cpp:
 18 (WebCore::ApplyPropertyLength::applyValue):
 19 * css/CSSStyleSelector.cpp:
 20 (WebCore::CSSStyleSelector::collectMatchingRulesForList):
 21 * css/CSSStyleSelector.h:
 22 * platform/CalculationValue.cpp:
 23 * platform/CalculationValue.h:
 24 * platform/Length.cpp:
 25 (WebCore::newLengthArray):
 26 * platform/Length.h:
 27 (WebCore::Length::operator*=):
 28 (WebCore::Length::value):
 29 (WebCore::Length::setValue):
 30 (Length):
 31 (WebCore::Length::calcValue):
 32 (WebCore::Length::calcMinValue):
 33 (WebCore::Length::calcFloatValue):
 34 (WebCore::Length::isZero):
 35 (WebCore::Length::isPositive):
 36 (WebCore::Length::isNegative):
 37 (WebCore::Length::isPercent):
 38 (WebCore::Length::isSpecified):
 39
1402012-03-05 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
241
342 Make Node::dumpStatistics() work again

Source/WebCore/WebCore.exp.in

@@__ZNK7WebCore6Editor7canEditEv
14221422__ZNK7WebCore6Editor8canPasteEv
14231423__ZNK7WebCore6Editor9canDeleteEv
14241424__ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNodeE
1425 __ZNK7WebCore6Length22decrementCalculatedRefEv
14261425__ZNK7WebCore6Region5rectsEv
14271426__ZNK7WebCore6Widget14platformWidgetEv
14281427__ZNK7WebCore6Widget23convertToContainingViewERKNS_7IntRectE

Source/WebCore/css/CSSCalculationValue.cpp

@@public:
114114 return m_value->cssText();
115115 }
116116
117  virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom) const
118  {
119  switch (m_category) {
120  case CalcNumber:
121  return adoptPtr(new CalcExpressionNumber(m_value->getFloatValue()));
122  case CalcLength:
123  return adoptPtr(new CalcExpressionNumber(m_value->computeLength<float>(style, rootStyle, zoom)));
124  case CalcPercent:
125  case CalcPercentLength:
126  return adoptPtr(new CalcExpressionLength(CSSStyleSelector::convertToFloatLength(m_value.get(), style, rootStyle, zoom)));
127  // Only types that could be part of a Length expression can be converted
128  // to a CalcExpressionNode. CalcPercentNumber makes no sense as a Length.
129  case CalcPercentNumber:
130  case CalcOther:
131  ASSERT_NOT_REACHED();
132  }
133  return nullptr;
134  }
135 
136117 virtual double doubleValue() const
137118 {
138119 switch (m_category) {

@@public:
227208 return !doubleValue();
228209 }
229210
230  virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom) const
231  {
232  OwnPtr<CalcExpressionNode> left(m_leftSide->toCalcValue(style, rootStyle, zoom));
233  if (!left)
234  return nullptr;
235  OwnPtr<CalcExpressionNode> right(m_rightSide->toCalcValue(style, rootStyle, zoom));
236  if (!right)
237  return nullptr;
238  return adoptPtr(new CalcExpressionBinaryOperation(left.release(), right.release(), m_operator));
239  }
240 
241211 virtual double doubleValue() const
242212 {
243213 return evaluate(m_leftSide->doubleValue(), m_rightSide->doubleValue());

Source/WebCore/css/CSSCalculationValue.h

@@namespace WebCore {
4343class CSSParserValueList;
4444class CSSValueList;
4545class RenderStyle;
46 class CalculationValue;
 46class CalcValue;
4747class CalcExpressionNode;
4848
4949enum CalculationCategory {

@@enum CalculationCategory {
5858class CSSCalcExpressionNode : public RefCounted<CSSCalcExpressionNode> {
5959public:
6060
61  virtual ~CSSCalcExpressionNode() = 0;
 61 virtual ~CSSCalcExpressionNode() = 0;
6262 virtual bool isZero() const = 0;
63  virtual PassOwnPtr<CalcExpressionNode> toCalcValue(RenderStyle*, RenderStyle* rootStyle, double zoom = 1.0) const = 0;
6463 virtual double doubleValue() const = 0;
6564 virtual double computeLengthPx(RenderStyle* currentStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false) const = 0;
6665

@@protected:
8180class CSSCalcValue : public CSSValue {
8281public:
8382 static PassRefPtr<CSSCalcValue> create(CSSParserString name, CSSParserValueList*, CalculationPermittedValueRange);
84  static PassRefPtr<CSSCalcValue> create(CalculationValue*);
8583
86  PassRefPtr<CalculationValue> toCalcValue(RenderStyle* style, RenderStyle* rootStyle, double zoom = 1.0) const
87  {
88  return CalculationValue::create(m_expression->toCalcValue(style, rootStyle, zoom), m_nonNegative ? CalculationRangeNonNegative : CalculationRangeAll);
89  }
9084 CalculationCategory category() const { return m_expression->category(); }
9185 bool isInt() const { return m_expression->isInteger(); }
9286 double doubleValue() const;

Source/WebCore/css/CSSPrimitiveValue.cpp

@@CSSPrimitiveValue::CSSPrimitiveValue(const Length& length)
266266 ASSERT(isfinite(length.percent()));
267267 m_value.num = length.percent();
268268 break;
269  case Calculated:
270269 case Relative:
271270 case Undefined:
272271 ASSERT_NOT_REACHED();

Source/WebCore/css/CSSStyleApplyProperty.cpp

2626#include "CSSStyleApplyProperty.h"
2727
2828#include "CSSAspectRatioValue.h"
29 #include "CSSCalculationValue.h"
3029#include "CSSCursorImageValue.h"
3130#include "CSSFlexValue.h"
3231#include "CSSPrimitiveValueMappings.h"

@@public:
390389 setValue(selector->style(), length);
391390 } else if (primitiveValue->isPercentage())
392391 setValue(selector->style(), Length(primitiveValue->getDoubleValue(), Percent));
393  else if (primitiveValue->isCalculatedPercentageWithLength())
394  setValue(selector->style(), Length(primitiveValue->cssCalcValue()->toCalcValue(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom())));
395392 }
396393 }
397394

Source/WebCore/css/CSSStyleSelector.cpp

3030
3131#include "Attribute.h"
3232#include "CachedImage.h"
33 #include "CalculationValue.h"
3433#include "ContentData.h"
3534#include "Counter.h"
3635#include "CounterContent.h"
3736#include "CSSBorderImage.h"
38 #include "CSSCalculationValue.h"
3937#include "CSSCursorImageValue.h"
4038#include "CSSFontFaceRule.h"
4139#include "CSSFontSelector.h"

@@static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* st
25492547 return l;
25502548}
25512549
2552 Length CSSStyleSelector::convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier)
 2550static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1)
25532551{
25542552 return convertToLength(primitiveValue, style, rootStyle, false, multiplier);
25552553}
25562554
2557 Length CSSStyleSelector::convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier)
 2555static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1)
25582556{
25592557 return convertToLength(primitiveValue, style, rootStyle, true, multiplier);
25602558}

Source/WebCore/css/CSSStyleSelector.h

@@public:
362362 bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularStyle; }
363363 bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisitedLinkStyle; }
364364
365  static Length convertToIntLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, double multiplier = 1);
366  static Length convertToFloatLength(CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, double multiplier = 1);
367 
368365private:
369366 static RenderStyle* s_styleNotYetAvailable;
370367

Source/WebCore/platform/CalculationValue.cpp

3131#include "config.h"
3232#include "CalculationValue.h"
3333
34 #include <limits>
35 
3634namespace WebCore {
3735
38 float CalcExpressionBinaryOperation::evaluate(float maxValue) const
39 {
40  float left = m_leftSide->evaluate(maxValue);
41  float right = m_rightSide->evaluate(maxValue);
42  switch (m_operator) {
43  case CalcAdd:
44  return left + right;
45  case CalcSubtract:
46  return left - right;
47  case CalcMultiply:
48  return left * right;
49  case CalcDivide:
50  if (!right)
51  return std::numeric_limits<float>::quiet_NaN();
52  return left / right;
53  }
54  ASSERT_NOT_REACHED();
55  return std::numeric_limits<float>::quiet_NaN();
56 }
57 
58 PassRefPtr<CalculationValue> CalculationValue::create(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange range)
59 {
60  return adoptRef(new CalculationValue(value, range));
61 }
62 
63 float CalculationValue::evaluate(float maxValue) const
64 {
65  float result = m_value->evaluate(maxValue);
66  // FIXME calc https://webkit.org/b/80411 : result is NaN when there is a division
67  // by zero which isn't found at parse time.
68  if (isnan(result))
69  return 0;
70  return m_isNonNegative && result < 0 ? 0 : result;
71 }
72 
7336} // namespace WebCore

Source/WebCore/platform/CalculationValue.h

@@enum CalculationPermittedValueRange {
5050 CalculationRangeAll,
5151 CalculationRangeNonNegative
5252};
53 
54 class CalcExpressionNode {
55 public:
56  virtual ~CalcExpressionNode()
57  {
58  }
59 
60  virtual float evaluate(float maxValue) const = 0;
61 };
62 
63 class CalculationValue : public RefCounted<CalculationValue> {
64 public:
65  static PassRefPtr<CalculationValue> create(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange);
66  float evaluate(float maxValue) const;
67 
68 private:
69  CalculationValue(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange range)
70  : m_value(value)
71  , m_isNonNegative(range == CalculationRangeNonNegative)
72  {
73  }
74 
75  OwnPtr<CalcExpressionNode> m_value;
76  bool m_isNonNegative;
77 };
78 
79 class CalcExpressionNumber : public CalcExpressionNode {
80 public:
81  explicit CalcExpressionNumber(float value)
82  : m_value(value)
83  {
84  }
85 
86  virtual float evaluate(float) const
87  {
88  return m_value;
89  }
90 
91 private:
92  float m_value;
93 };
94 
95 class CalcExpressionLength : public CalcExpressionNode {
96 public:
97  explicit CalcExpressionLength(Length length)
98  : m_length(length)
99  {
100  }
101 
102  virtual float evaluate(float maxValue) const
103  {
104  return m_length.calcFloatValue(maxValue);
105  }
106 
107 private:
108  Length m_length;
109 };
110 
111 class CalcExpressionBinaryOperation : public CalcExpressionNode {
112 public:
113  CalcExpressionBinaryOperation(PassOwnPtr<CalcExpressionNode> leftSide, PassOwnPtr<CalcExpressionNode> rightSide, CalcOperator op)
114  : m_leftSide(leftSide)
115  , m_rightSide(rightSide)
116  , m_operator(op)
117  {
118  }
119 
120  virtual float evaluate(float) const;
121 
122 private:
123  OwnPtr<CalcExpressionNode> m_leftSide;
124  OwnPtr<CalcExpressionNode> m_rightSide;
125  CalcOperator m_operator;
126 };
12753
12854} // namespace WebCore
12955

Source/WebCore/platform/Length.cpp

2525#include "config.h"
2626#include "Length.h"
2727
28 #include "CalculationValue.h"
2928#include "PlatformString.h"
3029#include <wtf/ASCIICType.h>
3130#include <wtf/Assertions.h>

@@PassOwnArrayPtr<Length> newLengthArray(const String& string, int& len)
149148
150149 return r.release();
151150}
152 
153 class CalculationValueHandleMap {
154 public:
155  CalculationValueHandleMap()
156  : m_index(1)
157  {
158  }
159 
160  int insert(PassRefPtr<CalculationValue> calcValue)
161  {
162  ASSERT(m_index);
163  // FIXME calc(): https://bugs.webkit.org/show_bug.cgi?id=80489
164  // This monotonically increasing handle generation scheme is potentially wasteful
165  // of the handle space. Consider reusing empty handles.
166  while (m_map.contains(m_index))
167  m_index++;
168 
169  m_map.set(m_index, calcValue);
170 
171  return m_index;
172  }
173 
174  void remove(int index)
175  {
176  ASSERT(m_map.contains(index));
177  m_map.remove(index);
178  }
179 
180  PassRefPtr<CalculationValue> get(int index)
181  {
182  ASSERT(m_map.contains(index));
183  return m_map.get(index);
184  }
185 
186 private:
187  int m_index;
188  HashMap<int, RefPtr<CalculationValue> > m_map;
189 };
190 
191 static CalculationValueHandleMap& calcHandles()
192 {
193  DEFINE_STATIC_LOCAL(CalculationValueHandleMap, handleMap, ());
194  return handleMap;
195 }
196 
197 Length::Length(PassRefPtr<CalculationValue> calc)
198  : m_quirk(false)
199  , m_type(Calculated)
200  , m_isFloat(false)
201 {
202  m_intValue = calcHandles().insert(calc);
203 }
204 
205 PassRefPtr<CalculationValue> Length::calculationValue() const
206 {
207  ASSERT(isCalculated());
208  return calcHandles().get(calculationHandle());
209 }
210 
211 void Length::incrementCalculatedRef() const
212 {
213  ASSERT(isCalculated());
214  calculationValue()->ref();
215 }
216 
217 void Length::decrementCalculatedRef() const
218 {
219  ASSERT(isCalculated());
220  RefPtr<CalculationValue> calcLength = calculationValue();
221  if (calcLength->hasOneRef())
222  calcHandles().remove(calculationHandle());
223  calcLength->deref();
224 }
225 
226 float Length::nonNanCalculatedValue(int maxValue) const
227 {
228  ASSERT(isCalculated());
229  float result = calculationValue()->evaluate(maxValue);
230  if (isnan(result))
231  return 0;
232  return result;
233 }
234151
235152class SameSizeAsLength {
236153 int32_t value;

Source/WebCore/platform/Length.h

2626#include <wtf/Assertions.h>
2727#include <wtf/FastAllocBase.h>
2828#include <wtf/Forward.h>
29 #include <wtf/HashMap.h>
3029#include <wtf/MathExtras.h>
3130#include <wtf/PassOwnArrayPtr.h>
3231

@@namespace WebCore {
3534const int intMaxForLength = 0x7ffffff; // max value for a 28-bit int
3635const int intMinForLength = (-0x7ffffff - 1); // min value for a 28-bit int
3736
38 enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, Calculated, Undefined };
39 
40 class CalculationValue;
41 
 37enum LengthType { Auto, Relative, Percent, Fixed, Intrinsic, MinIntrinsic, Undefined };
 38
4239struct Length {
4340 WTF_MAKE_FAST_ALLOCATED;
4441public:

@@public:
6865 m_floatValue = static_cast<float>(v);
6966 }
7067
71  explicit Length(PassRefPtr<CalculationValue>);
72 
73  Length(const Length& length)
74  {
75  initFromLength(length);
76  }
77 
78  Length& operator=(const Length& length)
79  {
80  initFromLength(length);
81  return *this;
82  }
83 
84  ~Length()
85  {
86  if (isCalculated())
87  decrementCalculatedRef();
88  }
89 
9068 bool operator==(const Length& o) const { return (m_type == o.m_type) && (m_quirk == o.m_quirk) && (isUndefined() || (getFloatValue() == o.getFloatValue())); }
9169 bool operator!=(const Length& o) const { return !(*this == o); }
9270
9371 const Length& operator*=(float v)
94  {
95  if (isCalculated()) {
96  ASSERT_NOT_REACHED();
97  return *this;
98  }
99 
 72 {
10073 if (m_isFloat)
10174 m_floatValue = static_cast<float>(m_floatValue * v);
10275 else

@@public:
10780
10881 int value() const
10982 {
110  if (isCalculated()) {
111  ASSERT_NOT_REACHED();
112  return 0;
113  }
11483 return getIntValue();
11584 }
11685

@@public:
12089 return getFloatValue();
12190 }
12291
123  PassRefPtr<CalculationValue> calculationValue() const;
124 
12592 LengthType type() const { return static_cast<LengthType>(m_type); }
12693 bool quirk() const { return m_quirk; }
12794

@@public:
139106
140107 void setValue(int value)
141108 {
142  if (isCalculated()) {
143  ASSERT_NOT_REACHED();
144  return;
145  }
146109 setValue(Fixed, value);
147110 }
148111

@@public:
158121 *this = Length(value, Fixed);
159122 }
160123
 124 // Note: May only be called for Fixed, Percent and Auto lengths.
 125 // Other types will ASSERT in order to catch invalid length calculations.
161126 int calcValue(int maxValue, bool roundPercentages = false) const
162127 {
163128 switch (type()) {
164129 case Fixed:
165130 case Percent:
166  case Calculated:
167131 return calcMinValue(maxValue, roundPercentages);
168132 case Auto:
169133 return maxValue;

@@public:
188152 return static_cast<int>(round(maxValue * percent() / 100.0f));
189153 // Don't remove the extra cast to float. It is needed for rounding on 32-bit Intel machines that use the FPU stack.
190154 return static_cast<int>(static_cast<float>(maxValue * percent() / 100.0f));
191  case Calculated:
192  return nonNanCalculatedValue(maxValue);
193155 case Auto:
194156 return 0;
195157 case Relative:

@@public:
212174 return static_cast<float>(maxValue * percent() / 100.0f);
213175 case Auto:
214176 return static_cast<float>(maxValue);
215  case Calculated:
216  return nonNanCalculatedValue(maxValue);
217177 case Relative:
218178 case Intrinsic:
219179 case MinIntrinsic:

@@public:
226186 }
227187
228188 bool isUndefined() const { return type() == Undefined; }
229 
230  // FIXME calc: https://bugs.webkit.org/show_bug.cgi?id=80357. A calculated Length
231  // always contains a percentage, and without a maxValue passed to these functions
232  // it's impossible to determine the sign or zero-ness. We assume all calc values
233  // are positive and non-zero for now.
234189 bool isZero() const
235190 {
236191 ASSERT(!isUndefined());
237  if (isCalculated())
238  return false;
239 
240192 return m_isFloat ? !m_floatValue : !m_intValue;
241193 }
242  bool isPositive() const
243  {
244  if (isUndefined())
245  return false;
246  if (isCalculated())
247  return true;
248 
249  return getFloatValue() > 0;
250  }
251  bool isNegative() const
252  {
253  if (isUndefined() || isCalculated())
254  return false;
255 
256  return getFloatValue() < 0;
257  }
258194
 195 bool isPositive() const { return isUndefined() ? false : getFloatValue() > 0; }
 196 bool isNegative() const { return isUndefined() ? false : getFloatValue() < 0; }
 197
259198 bool isAuto() const { return type() == Auto; }
260199 bool isRelative() const { return type() == Relative; }
261  bool isPercent() const { return type() == Percent || type() == Calculated; }
 200 bool isPercent() const { return type() == Percent; }
262201 bool isFixed() const { return type() == Fixed; }
263202 bool isIntrinsicOrAuto() const { return type() == Auto || type() == MinIntrinsic || type() == Intrinsic; }
264  bool isSpecified() const { return type() == Fixed || type() == Percent || type() == Calculated; }
265  bool isCalculated() const { return type() == Calculated; }
 203 bool isSpecified() const { return type() == Fixed || type() == Percent; }
266204
267205 Length blend(const Length& from, double progress) const
268206 {

@@private:
301239 return m_isFloat ? m_floatValue : m_intValue;
302240 }
303241
304  void initFromLength(const Length &length)
305  {
306  m_quirk = length.m_quirk;
307  m_type = length.m_type;
308  m_isFloat = length.m_isFloat;
309 
310  if (m_isFloat)
311  m_floatValue = length.m_floatValue;
312  else
313  m_intValue = length.m_intValue;
314 
315  if (isCalculated())
316  incrementCalculatedRef();
317  }
318 
319  float nonNanCalculatedValue(int maxValue) const;
320  int calculationHandle() const
321  {
322  ASSERT(isCalculated());
323  return getIntValue();
324  }
325  void incrementCalculatedRef() const;
326  void decrementCalculatedRef() const;
327 
328242 union {
329243 int m_intValue;
330244 float m_floatValue;

LayoutTests/ChangeLog

 12012-03-07 Sheriff Bot <webkit.review.bot@gmail.com>
 2
 3 Unreviewed, rolling out r110126.
 4 http://trac.webkit.org/changeset/110126
 5 https://bugs.webkit.org/show_bug.cgi?id=80558
 6
 7 compile failed on AppleMac (Requested by ukai on #webkit).
 8
 9 * css3/calc/margin-expected.txt:
 10 * css3/calc/padding-expected.txt:
 11 * css3/calc/simple-calcs-expected.txt:
 12
1132012-03-07 Mike Lawther <mikelawther@chromium.org>
214
315 CSS3 calc: mixed absolute/percentages work for width, height, margin and padding

LayoutTests/css3/calc/margin-expected.txt

@@PASS computedMarginLeft("simple-bottom") is "0px"
1818PASS computedMarginTop("simple-bottom") is "0px"
1919PASS computedMarginRight("simple-bottom") is "0px"
2020PASS computedMarginBottom("simple-bottom") is "25px"
21 PASS computedMarginLeft("percent-all") is "25px"
22 PASS computedMarginTop("percent-all") is "25px"
23 PASS computedMarginRight("percent-all") is "25px"
24 PASS computedMarginBottom("percent-all") is "25px"
25 PASS computedMarginLeft("percent-left") is "25px"
 21FAIL computedMarginLeft("percent-all") should be 25px. Was 0px.
 22FAIL computedMarginTop("percent-all") should be 25px. Was 0px.
 23FAIL computedMarginRight("percent-all") should be 25px. Was 0px.
 24FAIL computedMarginBottom("percent-all") should be 25px. Was 0px.
 25FAIL computedMarginLeft("percent-left") should be 25px. Was 0px.
2626PASS computedMarginTop("percent-left") is "0px"
2727PASS computedMarginRight("percent-left") is "0px"
2828PASS computedMarginBottom("percent-left") is "0px"
2929PASS computedMarginLeft("percent-right") is "0px"
3030PASS computedMarginTop("percent-right") is "0px"
31 PASS computedMarginRight("percent-right") is "25px"
 31FAIL computedMarginRight("percent-right") should be 25px. Was 0px.
3232PASS computedMarginBottom("percent-right") is "0px"
3333PASS computedMarginLeft("percent-top") is "0px"
34 PASS computedMarginTop("percent-top") is "25px"
 34FAIL computedMarginTop("percent-top") should be 25px. Was 0px.
3535PASS computedMarginRight("percent-top") is "0px"
3636PASS computedMarginBottom("percent-top") is "0px"
3737PASS computedMarginLeft("percent-bottom") is "0px"
3838PASS computedMarginTop("percent-bottom") is "0px"
3939PASS computedMarginRight("percent-bottom") is "0px"
40 PASS computedMarginBottom("percent-bottom") is "25px"
 40FAIL computedMarginBottom("percent-bottom") should be 25px. Was 0px.
4141PASS successfullyParsed is true
4242
4343TEST COMPLETE

LayoutTests/css3/calc/padding-expected.txt

@@This element should have a top padding of 25 pixels. => PASS
88
99This element should have a bottom padding of 25 pixels. => PASS
1010
11 This element should have an overall padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS
 11This element should have an overall padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong width, wrong height
1212
13 This element should have a left padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS
 13This element should have a left padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong width
1414
15 This element should have a right padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS
 15This element should have a right padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong width
1616
17 This element should have a top padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS
 17This element should have a top padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong height
1818
19 This element should have a bottom padding of 25 pixels (10% of parent width of 300px minus 5px). => PASS
 19This element should have a bottom padding of 25 pixels (10% of parent width of 300px minus 5px). => FAIL: wrong height

LayoutTests/css3/calc/simple-calcs-expected.txt

@@control => PASS
202010px* (5 * 2) => PASS
212150px + 10px * 5 (operation order) => PASS
2222100%/2 (where 100% is 200px) => PASS
23 100% + -100px (where 100% is 200px) => PASS
24 80% - 60px (where 100% is 200px) => PASS
25 300px - 100% (where 100% is 200px) => PASS
26 -100px + 100% (where 100% is 200px) => PASS
 23100% + -100px (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256
 2480% - 60px (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256
 25300px - 100% (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256
 26-100px + 100% (where 100% is 200px) => FAIL: @zoom=1 expected width of 100, but was 256; @zoom=1.2 expected width of 100, but was 256; @zoom=2 expected width of 100, but was 256
272720% + 30% (where 100% is 200px) => PASS
282880% - 30% (where 100% is 200px) => PASS
292910% * 5 (where 100% is 200px) => PASS