OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/css/parser/CSSPropertyParser.h" | 6 #include "core/css/parser/CSSPropertyParser.h" |
7 | 7 |
8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
9 #include "core/css/CSSCalculationValue.h" | 9 #include "core/css/CSSCalculationValue.h" |
10 #include "core/css/CSSCrossfadeValue.h" | 10 #include "core/css/CSSCrossfadeValue.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 case CSSPrimitiveValue::UnitType::Rems: | 462 case CSSPrimitiveValue::UnitType::Rems: |
463 case CSSPrimitiveValue::UnitType::Chs: | 463 case CSSPrimitiveValue::UnitType::Chs: |
464 case CSSPrimitiveValue::UnitType::Exs: | 464 case CSSPrimitiveValue::UnitType::Exs: |
465 case CSSPrimitiveValue::UnitType::Pixels: | 465 case CSSPrimitiveValue::UnitType::Pixels: |
466 case CSSPrimitiveValue::UnitType::Centimeters: | 466 case CSSPrimitiveValue::UnitType::Centimeters: |
467 case CSSPrimitiveValue::UnitType::Millimeters: | 467 case CSSPrimitiveValue::UnitType::Millimeters: |
468 case CSSPrimitiveValue::UnitType::Inches: | 468 case CSSPrimitiveValue::UnitType::Inches: |
469 case CSSPrimitiveValue::UnitType::Points: | 469 case CSSPrimitiveValue::UnitType::Points: |
470 case CSSPrimitiveValue::UnitType::Picas: | 470 case CSSPrimitiveValue::UnitType::Picas: |
471 case CSSPrimitiveValue::UnitType::UserUnits: | 471 case CSSPrimitiveValue::UnitType::UserUnits: |
472 break; | |
473 case CSSPrimitiveValue::UnitType::ViewportWidth: | 472 case CSSPrimitiveValue::UnitType::ViewportWidth: |
474 case CSSPrimitiveValue::UnitType::ViewportHeight: | 473 case CSSPrimitiveValue::UnitType::ViewportHeight: |
475 case CSSPrimitiveValue::UnitType::ViewportMin: | 474 case CSSPrimitiveValue::UnitType::ViewportMin: |
476 case CSSPrimitiveValue::UnitType::ViewportMax: | 475 case CSSPrimitiveValue::UnitType::ViewportMax: |
477 if (cssParserMode == SVGAttributeMode) | |
478 return nullptr; | |
479 break; | 476 break; |
480 default: | 477 default: |
481 return nullptr; | 478 return nullptr; |
482 } | 479 } |
483 if (valueRange == ValueRangeNonNegative && token.numericValue() < 0) | 480 if (valueRange == ValueRangeNonNegative && token.numericValue() < 0) |
484 return nullptr; | 481 return nullptr; |
485 return cssValuePool().createValue(range.consumeIncludingWhitespace().num
ericValue(), token.unitType()); | 482 return cssValuePool().createValue(range.consumeIncludingWhitespace().num
ericValue(), token.unitType()); |
486 } | 483 } |
487 if (token.type() == NumberToken) { | 484 if (token.type() == NumberToken) { |
488 if (!shouldAcceptUnitlessValues(token.numericValue(), cssParserMode, uni
tless) | 485 if (!shouldAcceptUnitlessValues(token.numericValue(), cssParserMode, uni
tless) |
(...skipping 3138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3627 return consumeShorthandGreedily(flexFlowShorthand(), important); | 3624 return consumeShorthandGreedily(flexFlowShorthand(), important); |
3628 case CSSPropertyWebkitColumnRule: | 3625 case CSSPropertyWebkitColumnRule: |
3629 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); | 3626 return consumeShorthandGreedily(webkitColumnRuleShorthand(), important); |
3630 default: | 3627 default: |
3631 m_currentShorthand = oldShorthand; | 3628 m_currentShorthand = oldShorthand; |
3632 return false; | 3629 return false; |
3633 } | 3630 } |
3634 } | 3631 } |
3635 | 3632 |
3636 } // namespace blink | 3633 } // namespace blink |
OLD | NEW |