Changeset 107259 in webkit
- Timestamp:
- Feb 9, 2012 10:27:06 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r107258 r107259 1 2012-02-09 Mike Lawther <mikelawther@chromium.org> 2 3 CSS3 calc() - remove mod 4 https://bugs.webkit.org/show_bug.cgi?id=78226 5 6 Reviewed by Ojan Vafai. 7 8 * css3/calc/simple-calcs-expected.txt: 9 * css3/calc/simple-calcs.html: 10 1 11 2012-02-09 Jochen Eisinger <jochen@chromium.org> 2 12 -
trunk/LayoutTests/css3/calc/simple-calcs-expected.txt
r83415 r107259 19 19 50px*(10 / 5) => 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 20 20 10px* (5 * 2) => 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 21 50px* (12 mod 10) => 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 25622 21 50px + 10px * 5 (operation order) => 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 23 1100px mod 1000 => 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 25624 22 100%/2 (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 25 23 100% + -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 … … 40 38 2 * 50px => 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 41 39 2 * 100px / 2 => 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 42 12 mod 10 * 50px => 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 25643 40 (1em - 1em) + 100px => 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 44 41 50px + +50px => 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 -
trunk/LayoutTests/css3/calc/simple-calcs.html
r83415 r107259 37 37 <div class="width-test" style="width: -webkit-calc(50px*(10 / 5));">50px*(10 / 5)</div> 38 38 <div class="width-test" style="width: -webkit-calc(10px* (5 * 2));">10px* (5 * 2)</div> 39 <div class="width-test" style="width: -webkit-calc(50px* (12 mod 10));">50px* (12 mod 10)</div>40 39 <div class="width-test" style="width: -webkit-calc(50px + 10px * 5);">50px + 10px * 5 (operation order)</div> 41 <div class="width-test" style="width: -webkit-calc(1100px mod 1000);">1100px mod 1000</div>42 40 <div style="width: 200px; background-color: white;" class="wrapper"> 43 41 <div class="width-test" style="width: -webkit-calc(100%/2);">100%/2 (where 100% is 200px)</div> … … 67 65 <div class="width-test" style="width: -webkit-calc(5 * 10%);">5 * 10% (where 100% is 200px)</div> 68 66 </div> 69 <!--70 FIXME: what do we do with mod of percent?71 <div style="width: 200px; background-color: white;" class="wrapper">72 <div class="width-test" style="width: -webkit-calc(75% mod 100);">150% mod 100 (where 100% is 200px)</div>73 </div>74 -->75 67 <div class="width-test" style="width: -webkit-calc((100px));">(100px)</div> 76 68 <div class="width-test" style="width: -webkit-calc((50px + 50px));">(50px + 50px)</div> … … 82 74 <div class="width-test" style="width: -webkit-calc(2 * 50px);">2 * 50px</div> 83 75 <div class="width-test" style="width: -webkit-calc(2 * 100px / 2);">2 * 100px / 2</div> 84 <div class="width-test" style="width: -webkit-calc(12 mod 10 * 50px);">12 mod 10 * 50px</div>85 76 <div class="width-test" style="width: -webkit-calc((1em - 1em) + 100px);">(1em - 1em) + 100px</div> 86 77 <div class="width-test" style="width: -webkit-calc(50px + +50px);">50px + +50px</div> -
trunk/Source/WebCore/ChangeLog
r107257 r107259 1 2012-02-09 Mike Lawther <mikelawther@chromium.org> 2 3 CSS3 calc() - remove mod 4 https://bugs.webkit.org/show_bug.cgi?id=78226 5 6 mod has been removed from the spec for calc(). 7 8 Reviewed by Ojan Vafai. 9 10 * css/CSSCalculationValue.cpp: 11 (WebCore::CSSCalcBinaryOperation::create): 12 (WebCore::CSSCalcBinaryOperation::evaluate): 13 (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression): 14 * css/CSSGrammar.y: 15 * platform/CalculationValue.h: 16 1 17 2012-02-09 Pavel Feldman <pfeldman@google.com> 2 18 -
trunk/Source/WebCore/css/CSSCalculationValue.cpp
r107030 r107259 159 159 160 160 case CalcDivide: 161 case CalcMod:162 161 if (rightCategory != CalcNumber || rightSide->isZero()) 163 162 return 0; … … 199 198 return leftValue / rightValue; 200 199 return std::numeric_limits<double>::quiet_NaN(); 201 case CalcMod:202 // FIXME calc() : mod has been removed from the spec, need to remove203 // this enum value204 return 0;205 200 } 206 201 return 0; … … 297 292 while (*index < tokens->size() - 1) { 298 293 char operatorCharacter = operatorValue(tokens, *index); 299 if (operatorCharacter != CalcMultiply && operatorCharacter != CalcDivide && operatorCharacter != CalcMod)294 if (operatorCharacter != CalcMultiply && operatorCharacter != CalcDivide) 300 295 break; 301 296 ++*index; -
trunk/Source/WebCore/css/CSSGrammar.y
r103692 r107259 1531 1531 $$ = '/'; 1532 1532 } 1533 | IDENT maybe_space {1534 if (equalIgnoringCase("mod", $1.characters, $1.length))1535 $$ = '%';1536 else1537 $$ = 0;1538 }1539 1533 ; 1540 1534 -
trunk/Source/WebCore/platform/CalculationValue.h
r106166 r107259 45 45 CalcMultiply = '*', 46 46 CalcDivide = '/', 47 CalcMod = '%'48 47 }; 49 48
Note: See TracChangeset
for help on using the changeset viewer.