OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 | 413 |
414 case CSSPropertyTextAlign: | 414 case CSSPropertyTextAlign: |
415 // left | right | center | justify | -webkit-left | -webkit-right | -web
kit-center | -webkit-match-parent | 415 // left | right | center | justify | -webkit-left | -webkit-right | -web
kit-center | -webkit-match-parent |
416 // | start | end | <string> | inherit | -webkit-auto (converted to start
) | 416 // | start | end | <string> | inherit | -webkit-auto (converted to start
) |
417 // FIXME: <string> not supported right now | 417 // FIXME: <string> not supported right now |
418 if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitMatchParent) || id
== CSSValueStart || id == CSSValueEnd) { | 418 if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitMatchParent) || id
== CSSValueStart || id == CSSValueEnd) { |
419 validPrimitive = true; | 419 validPrimitive = true; |
420 } | 420 } |
421 break; | 421 break; |
422 | 422 |
423 case CSSPropertyOutlineColor: // <color> | invert | inherit | |
424 // Outline color has "invert" as additional keyword. | |
425 // Also, we want to allow the special focus color even in HTML Standard
parsing mode. | |
426 if (id == CSSValueInvert || id == CSSValueWebkitFocusRingColor) { | |
427 validPrimitive = true; | |
428 break; | |
429 } | |
430 /* nobreak */ | |
431 case CSSPropertyBackgroundColor: // <color> | inherit | 423 case CSSPropertyBackgroundColor: // <color> | inherit |
432 case CSSPropertyBorderTopColor: // <color> | inherit | 424 case CSSPropertyBorderTopColor: // <color> | inherit |
433 case CSSPropertyBorderRightColor: | 425 case CSSPropertyBorderRightColor: |
434 case CSSPropertyBorderBottomColor: | 426 case CSSPropertyBorderBottomColor: |
435 case CSSPropertyBorderLeftColor: | 427 case CSSPropertyBorderLeftColor: |
436 case CSSPropertyWebkitBorderStartColor: | 428 case CSSPropertyWebkitBorderStartColor: |
437 case CSSPropertyWebkitBorderEndColor: | 429 case CSSPropertyWebkitBorderEndColor: |
438 case CSSPropertyWebkitBorderBeforeColor: | 430 case CSSPropertyWebkitBorderBeforeColor: |
439 case CSSPropertyWebkitBorderAfterColor: | 431 case CSSPropertyWebkitBorderAfterColor: |
440 case CSSPropertyWebkitColumnRuleColor: | 432 case CSSPropertyWebkitColumnRuleColor: |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 break; | 594 break; |
603 | 595 |
604 case CSSPropertyBorderTopWidth: //// <border-width> | inherit | 596 case CSSPropertyBorderTopWidth: //// <border-width> | inherit |
605 case CSSPropertyBorderRightWidth: // Which is defined as | 597 case CSSPropertyBorderRightWidth: // Which is defined as |
606 case CSSPropertyBorderBottomWidth: // thin | medium | thick | <length> | 598 case CSSPropertyBorderBottomWidth: // thin | medium | thick | <length> |
607 case CSSPropertyBorderLeftWidth: | 599 case CSSPropertyBorderLeftWidth: |
608 if (!inShorthand() || m_currentShorthand == CSSPropertyBorderWidth) | 600 if (!inShorthand() || m_currentShorthand == CSSPropertyBorderWidth) |
609 unitless = FUnitlessQuirk; | 601 unitless = FUnitlessQuirk; |
610 // fall through | 602 // fall through |
611 case CSSPropertyWebkitTextStrokeWidth: | 603 case CSSPropertyWebkitTextStrokeWidth: |
612 case CSSPropertyOutlineWidth: // <border-width> | inherit | |
613 case CSSPropertyWebkitBorderStartWidth: | 604 case CSSPropertyWebkitBorderStartWidth: |
614 case CSSPropertyWebkitBorderEndWidth: | 605 case CSSPropertyWebkitBorderEndWidth: |
615 case CSSPropertyWebkitBorderBeforeWidth: | 606 case CSSPropertyWebkitBorderBeforeWidth: |
616 case CSSPropertyWebkitBorderAfterWidth: | 607 case CSSPropertyWebkitBorderAfterWidth: |
617 case CSSPropertyWebkitColumnRuleWidth: | 608 case CSSPropertyWebkitColumnRuleWidth: |
618 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) | 609 if (id == CSSValueThin || id == CSSValueMedium || id == CSSValueThick) |
619 validPrimitive = true; | 610 validPrimitive = true; |
620 else | 611 else |
621 validPrimitive = validUnit(value, FLength | FNonNeg | unitless); | 612 validPrimitive = validUnit(value, FLength | FNonNeg | unitless); |
622 break; | 613 break; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 parsedValue2 = parsedValue1; | 734 parsedValue2 = parsedValue1; |
744 | 735 |
745 if (m_valueList->next()) | 736 if (m_valueList->next()) |
746 return false; | 737 return false; |
747 addProperty(propId, CSSValuePair::create(parsedValue1.release(), parsedV
alue2.release(), CSSValuePair::DropIdenticalValues), important); | 738 addProperty(propId, CSSValuePair::create(parsedValue1.release(), parsedV
alue2.release(), CSSValuePair::DropIdenticalValues), important); |
748 return true; | 739 return true; |
749 } | 740 } |
750 case CSSPropertyBorderRadius: | 741 case CSSPropertyBorderRadius: |
751 case CSSPropertyAliasWebkitBorderRadius: | 742 case CSSPropertyAliasWebkitBorderRadius: |
752 return parseBorderRadius(unresolvedProperty, important); | 743 return parseBorderRadius(unresolvedProperty, important); |
753 case CSSPropertyOutlineOffset: | |
754 validPrimitive = validUnit(value, FLength); | |
755 break; | |
756 case CSSPropertyWebkitBoxReflect: | 744 case CSSPropertyWebkitBoxReflect: |
757 if (id == CSSValueNone) | 745 if (id == CSSValueNone) |
758 validPrimitive = true; | 746 validPrimitive = true; |
759 else | 747 else |
760 parsedValue = parseReflect(); | 748 parsedValue = parseReflect(); |
761 break; | 749 break; |
762 case CSSPropertyFontSizeAdjust: // none | <number> | 750 case CSSPropertyFontSizeAdjust: // none | <number> |
763 ASSERT(RuntimeEnabledFeatures::cssFontSizeAdjustEnabled()); | 751 ASSERT(RuntimeEnabledFeatures::cssFontSizeAdjustEnabled()); |
764 validPrimitive = (id == CSSValueNone) ? true : validUnit(value, FNumber
| FNonNeg); | 752 validPrimitive = (id == CSSValueNone) ? true : validUnit(value, FNumber
| FNonNeg); |
765 break; | 753 break; |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 // [ 'border-left-width' || 'border-style' || <color> ] | inherit | 1024 // [ 'border-left-width' || 'border-style' || <color> ] | inherit |
1037 return parseShorthand(propId, borderLeftShorthand(), important); | 1025 return parseShorthand(propId, borderLeftShorthand(), important); |
1038 case CSSPropertyWebkitBorderStart: | 1026 case CSSPropertyWebkitBorderStart: |
1039 return parseShorthand(propId, webkitBorderStartShorthand(), important); | 1027 return parseShorthand(propId, webkitBorderStartShorthand(), important); |
1040 case CSSPropertyWebkitBorderEnd: | 1028 case CSSPropertyWebkitBorderEnd: |
1041 return parseShorthand(propId, webkitBorderEndShorthand(), important); | 1029 return parseShorthand(propId, webkitBorderEndShorthand(), important); |
1042 case CSSPropertyWebkitBorderBefore: | 1030 case CSSPropertyWebkitBorderBefore: |
1043 return parseShorthand(propId, webkitBorderBeforeShorthand(), important); | 1031 return parseShorthand(propId, webkitBorderBeforeShorthand(), important); |
1044 case CSSPropertyWebkitBorderAfter: | 1032 case CSSPropertyWebkitBorderAfter: |
1045 return parseShorthand(propId, webkitBorderAfterShorthand(), important); | 1033 return parseShorthand(propId, webkitBorderAfterShorthand(), important); |
1046 case CSSPropertyOutline: | |
1047 // [ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit | |
1048 return parseShorthand(propId, outlineShorthand(), important); | |
1049 case CSSPropertyBorderColor: | 1034 case CSSPropertyBorderColor: |
1050 // <color>{1,4} | inherit | 1035 // <color>{1,4} | inherit |
1051 return parse4Values(propId, borderColorShorthand().properties(), importa
nt); | 1036 return parse4Values(propId, borderColorShorthand().properties(), importa
nt); |
1052 case CSSPropertyBorderWidth: | 1037 case CSSPropertyBorderWidth: |
1053 // <border-width>{1,4} | inherit | 1038 // <border-width>{1,4} | inherit |
1054 return parse4Values(propId, borderWidthShorthand().properties(), importa
nt); | 1039 return parse4Values(propId, borderWidthShorthand().properties(), importa
nt); |
1055 case CSSPropertyBorderStyle: | 1040 case CSSPropertyBorderStyle: |
1056 // <border-style>{1,4} | inherit | 1041 // <border-style>{1,4} | inherit |
1057 return parse4Values(propId, borderStyleShorthand().properties(), importa
nt); | 1042 return parse4Values(propId, borderStyleShorthand().properties(), importa
nt); |
1058 case CSSPropertyMargin: | 1043 case CSSPropertyMargin: |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 case CSSPropertyColor: | 1188 case CSSPropertyColor: |
1204 case CSSPropertyZIndex: | 1189 case CSSPropertyZIndex: |
1205 case CSSPropertyTextShadow: | 1190 case CSSPropertyTextShadow: |
1206 case CSSPropertyBoxShadow: | 1191 case CSSPropertyBoxShadow: |
1207 case CSSPropertyWebkitFilter: | 1192 case CSSPropertyWebkitFilter: |
1208 case CSSPropertyBackdropFilter: | 1193 case CSSPropertyBackdropFilter: |
1209 case CSSPropertyTextDecorationColor: | 1194 case CSSPropertyTextDecorationColor: |
1210 case CSSPropertyWebkitTextDecorationsInEffect: | 1195 case CSSPropertyWebkitTextDecorationsInEffect: |
1211 case CSSPropertyTextDecorationLine: | 1196 case CSSPropertyTextDecorationLine: |
1212 case CSSPropertyTextDecoration: | 1197 case CSSPropertyTextDecoration: |
| 1198 case CSSPropertyOutline: |
| 1199 case CSSPropertyOutlineColor: |
| 1200 case CSSPropertyOutlineWidth: |
| 1201 case CSSPropertyOutlineOffset: |
1213 validPrimitive = false; | 1202 validPrimitive = false; |
1214 break; | 1203 break; |
1215 | 1204 |
1216 case CSSPropertyScrollSnapPointsX: | 1205 case CSSPropertyScrollSnapPointsX: |
1217 case CSSPropertyScrollSnapPointsY: | 1206 case CSSPropertyScrollSnapPointsY: |
1218 parsedValue = parseScrollSnapPoints(); | 1207 parsedValue = parseScrollSnapPoints(); |
1219 break; | 1208 break; |
1220 case CSSPropertyScrollSnapCoordinate: | 1209 case CSSPropertyScrollSnapCoordinate: |
1221 parsedValue = parseScrollSnapCoordinate(); | 1210 parsedValue = parseScrollSnapCoordinate(); |
1222 break; | 1211 break; |
(...skipping 4789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6012 } | 6001 } |
6013 } | 6002 } |
6014 | 6003 |
6015 if (!list->length()) | 6004 if (!list->length()) |
6016 return nullptr; | 6005 return nullptr; |
6017 | 6006 |
6018 return list.release(); | 6007 return list.release(); |
6019 } | 6008 } |
6020 | 6009 |
6021 } // namespace blink | 6010 } // namespace blink |
OLD | NEW |