OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
8 * Copyright (C) 2015 Google Inc. All rights reserved. | 8 * Copyright (C) 2015 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 case TextDecorationStyleDashed: | 1114 case TextDecorationStyleDashed: |
1115 return CSSIdentifierValue::create(CSSValueDashed); | 1115 return CSSIdentifierValue::create(CSSValueDashed); |
1116 case TextDecorationStyleWavy: | 1116 case TextDecorationStyleWavy: |
1117 return CSSIdentifierValue::create(CSSValueWavy); | 1117 return CSSIdentifierValue::create(CSSValueWavy); |
1118 } | 1118 } |
1119 | 1119 |
1120 ASSERT_NOT_REACHED(); | 1120 ASSERT_NOT_REACHED(); |
1121 return CSSInitialValue::create(); | 1121 return CSSInitialValue::create(); |
1122 } | 1122 } |
1123 | 1123 |
| 1124 static CSSValue* valueForTextDecorationSkip( |
| 1125 TextDecorationSkip textDecorationSkip) { |
| 1126 CSSValueList* list = CSSValueList::createSpaceSeparated(); |
| 1127 if (textDecorationSkip & TextDecorationSkipObjects) |
| 1128 list->append(*CSSIdentifierValue::create(CSSValueObjects)); |
| 1129 if (textDecorationSkip & TextDecorationSkipInk) |
| 1130 list->append(*CSSIdentifierValue::create(CSSValueInk)); |
| 1131 |
| 1132 DCHECK(list->length()); |
| 1133 return list; |
| 1134 } |
| 1135 |
1124 static CSSValue* touchActionFlagsToCSSValue(TouchAction touchAction) { | 1136 static CSSValue* touchActionFlagsToCSSValue(TouchAction touchAction) { |
1125 CSSValueList* list = CSSValueList::createSpaceSeparated(); | 1137 CSSValueList* list = CSSValueList::createSpaceSeparated(); |
1126 if (touchAction == TouchActionAuto) { | 1138 if (touchAction == TouchActionAuto) { |
1127 list->append(*CSSIdentifierValue::create(CSSValueAuto)); | 1139 list->append(*CSSIdentifierValue::create(CSSValueAuto)); |
1128 } else if (touchAction == TouchActionNone) { | 1140 } else if (touchAction == TouchActionNone) { |
1129 list->append(*CSSIdentifierValue::create(CSSValueNone)); | 1141 list->append(*CSSIdentifierValue::create(CSSValueNone)); |
1130 } else if (touchAction == TouchActionManipulation) { | 1142 } else if (touchAction == TouchActionManipulation) { |
1131 list->append(*CSSIdentifierValue::create(CSSValueManipulation)); | 1143 list->append(*CSSIdentifierValue::create(CSSValueManipulation)); |
1132 } else { | 1144 } else { |
1133 if ((touchAction & TouchActionPanX) == TouchActionPanX) | 1145 if ((touchAction & TouchActionPanX) == TouchActionPanX) |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2667 case CSSPropertyTextAlignLast: | 2679 case CSSPropertyTextAlignLast: |
2668 return CSSIdentifierValue::create(style.getTextAlignLast()); | 2680 return CSSIdentifierValue::create(style.getTextAlignLast()); |
2669 case CSSPropertyTextDecoration: | 2681 case CSSPropertyTextDecoration: |
2670 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) | 2682 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) |
2671 return valuesForShorthandProperty(textDecorationShorthand(), style, | 2683 return valuesForShorthandProperty(textDecorationShorthand(), style, |
2672 layoutObject, styledNode, | 2684 layoutObject, styledNode, |
2673 allowVisitedStyle); | 2685 allowVisitedStyle); |
2674 // Fall through. | 2686 // Fall through. |
2675 case CSSPropertyTextDecorationLine: | 2687 case CSSPropertyTextDecorationLine: |
2676 return renderTextDecorationFlagsToCSSValue(style.getTextDecoration()); | 2688 return renderTextDecorationFlagsToCSSValue(style.getTextDecoration()); |
| 2689 case CSSPropertyTextDecorationSkip: |
| 2690 return valueForTextDecorationSkip(style.getTextDecorationSkip()); |
2677 case CSSPropertyTextDecorationStyle: | 2691 case CSSPropertyTextDecorationStyle: |
2678 return valueForTextDecorationStyle(style.getTextDecorationStyle()); | 2692 return valueForTextDecorationStyle(style.getTextDecorationStyle()); |
2679 case CSSPropertyTextDecorationColor: | 2693 case CSSPropertyTextDecorationColor: |
2680 return currentColorOrValidColor(style, style.textDecorationColor()); | 2694 return currentColorOrValidColor(style, style.textDecorationColor()); |
2681 case CSSPropertyTextJustify: | 2695 case CSSPropertyTextJustify: |
2682 return CSSIdentifierValue::create(style.getTextJustify()); | 2696 return CSSIdentifierValue::create(style.getTextJustify()); |
2683 case CSSPropertyTextUnderlinePosition: | 2697 case CSSPropertyTextUnderlinePosition: |
2684 return CSSIdentifierValue::create(style.getTextUnderlinePosition()); | 2698 return CSSIdentifierValue::create(style.getTextUnderlinePosition()); |
2685 case CSSPropertyWebkitTextDecorationsInEffect: | 2699 case CSSPropertyWebkitTextDecorationsInEffect: |
2686 return renderTextDecorationFlagsToCSSValue( | 2700 return renderTextDecorationFlagsToCSSValue( |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3599 case CSSPropertyAll: | 3613 case CSSPropertyAll: |
3600 return nullptr; | 3614 return nullptr; |
3601 default: | 3615 default: |
3602 break; | 3616 break; |
3603 } | 3617 } |
3604 ASSERT_NOT_REACHED(); | 3618 ASSERT_NOT_REACHED(); |
3605 return nullptr; | 3619 return nullptr; |
3606 } | 3620 } |
3607 | 3621 |
3608 } // namespace blink | 3622 } // namespace blink |
OLD | NEW |