OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 795 |
796 if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getVal
ueID() == CSSValueOpen) { | 796 if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getVal
ueID() == CSSValueOpen) { |
797 state.style()->setTextEmphasisFill(*primitiveValue); | 797 state.style()->setTextEmphasisFill(*primitiveValue); |
798 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto); | 798 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto); |
799 } else { | 799 } else { |
800 state.style()->setTextEmphasisFill(TextEmphasisFillFilled); | 800 state.style()->setTextEmphasisFill(TextEmphasisFillFilled); |
801 state.style()->setTextEmphasisMark(*primitiveValue); | 801 state.style()->setTextEmphasisMark(*primitiveValue); |
802 } | 802 } |
803 } | 803 } |
804 | 804 |
805 #if ENABLE(CSS3_TEXT) | 805 void StyleBuilderFunctions::applyValueCSSPropertyTextUnderlinePosition(StyleReso
lverState& state, CSSValue* value) |
806 void StyleBuilderFunctions::applyValueCSSPropertyWebkitTextUnderlinePosition(Sty
leResolverState& state, CSSValue* value) | |
807 { | 806 { |
808 // This is true if value is 'auto' or 'alphabetic'. | 807 // This is true if value is 'auto' or 'alphabetic'. |
809 if (value->isPrimitiveValue()) { | 808 if (value->isPrimitiveValue()) { |
810 TextUnderlinePosition t = *toCSSPrimitiveValue(value); | 809 TextUnderlinePosition t = *toCSSPrimitiveValue(value); |
811 state.style()->setTextUnderlinePosition(t); | 810 state.style()->setTextUnderlinePosition(t); |
812 return; | 811 return; |
813 } | 812 } |
814 | 813 |
815 unsigned t = 0; | 814 unsigned t = 0; |
816 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { | 815 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { |
817 CSSValue* item = i.value(); | 816 CSSValue* item = i.value(); |
818 TextUnderlinePosition t2 = *toCSSPrimitiveValue(item); | 817 TextUnderlinePosition t2 = *toCSSPrimitiveValue(item); |
819 t |= t2; | 818 t |= t2; |
820 } | 819 } |
821 state.style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t
)); | 820 state.style()->setTextUnderlinePosition(static_cast<TextUnderlinePosition>(t
)); |
822 } | 821 } |
823 #endif // CSS3_TEXT | |
824 | 822 |
825 Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue*
value) | 823 Length StyleBuilderConverter::convertLength(StyleResolverState& state, CSSValue*
value) |
826 { | 824 { |
827 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 825 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
828 Length result = primitiveValue->convertToLength<FixedIntegerConversion | Per
centConversion>(state.style(), state.rootElementStyle(), state.style()->effectiv
eZoom()); | 826 Length result = primitiveValue->convertToLength<FixedIntegerConversion | Per
centConversion>(state.style(), state.rootElementStyle(), state.style()->effectiv
eZoom()); |
829 ASSERT(!result.isUndefined()); | 827 ASSERT(!result.isUndefined()); |
830 result.setQuirk(primitiveValue->isQuirkValue()); | 828 result.setQuirk(primitiveValue->isQuirkValue()); |
831 return result; | 829 return result; |
832 } | 830 } |
833 | 831 |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 case CSSPropertyWebkitPerspectiveOriginX: | 2088 case CSSPropertyWebkitPerspectiveOriginX: |
2091 case CSSPropertyWebkitPerspectiveOriginY: | 2089 case CSSPropertyWebkitPerspectiveOriginY: |
2092 case CSSPropertyWebkitPrintColorAdjust: | 2090 case CSSPropertyWebkitPrintColorAdjust: |
2093 case CSSPropertyWebkitRegionBreakAfter: | 2091 case CSSPropertyWebkitRegionBreakAfter: |
2094 case CSSPropertyWebkitRegionBreakBefore: | 2092 case CSSPropertyWebkitRegionBreakBefore: |
2095 case CSSPropertyWebkitRegionBreakInside: | 2093 case CSSPropertyWebkitRegionBreakInside: |
2096 case CSSPropertyWebkitRegionFragment: | 2094 case CSSPropertyWebkitRegionFragment: |
2097 case CSSPropertyWebkitRtlOrdering: | 2095 case CSSPropertyWebkitRtlOrdering: |
2098 case CSSPropertyWebkitRubyPosition: | 2096 case CSSPropertyWebkitRubyPosition: |
2099 case CSSPropertyWebkitTextCombine: | 2097 case CSSPropertyWebkitTextCombine: |
2100 #if ENABLE(CSS3_TEXT) | 2098 case CSSPropertyTextUnderlinePosition: |
2101 case CSSPropertyWebkitTextUnderlinePosition: | |
2102 #endif // CSS3_TEXT | |
2103 case CSSPropertyWebkitTextEmphasisColor: | 2099 case CSSPropertyWebkitTextEmphasisColor: |
2104 case CSSPropertyWebkitTextEmphasisPosition: | 2100 case CSSPropertyWebkitTextEmphasisPosition: |
2105 case CSSPropertyWebkitTextEmphasisStyle: | 2101 case CSSPropertyWebkitTextEmphasisStyle: |
2106 case CSSPropertyWebkitTextFillColor: | 2102 case CSSPropertyWebkitTextFillColor: |
2107 case CSSPropertyWebkitTextSecurity: | 2103 case CSSPropertyWebkitTextSecurity: |
2108 case CSSPropertyWebkitTextStrokeColor: | 2104 case CSSPropertyWebkitTextStrokeColor: |
2109 case CSSPropertyWebkitTransformOriginX: | 2105 case CSSPropertyWebkitTransformOriginX: |
2110 case CSSPropertyWebkitTransformOriginY: | 2106 case CSSPropertyWebkitTransformOriginY: |
2111 case CSSPropertyWebkitTransformOriginZ: | 2107 case CSSPropertyWebkitTransformOriginZ: |
2112 case CSSPropertyWebkitTransformStyle: | 2108 case CSSPropertyWebkitTransformStyle: |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2406 break; | 2402 break; |
2407 } | 2403 } |
2408 case CSSPropertyEnableBackground: | 2404 case CSSPropertyEnableBackground: |
2409 // Silently ignoring this property for now | 2405 // Silently ignoring this property for now |
2410 // http://bugs.webkit.org/show_bug.cgi?id=6022 | 2406 // http://bugs.webkit.org/show_bug.cgi?id=6022 |
2411 break; | 2407 break; |
2412 } | 2408 } |
2413 } | 2409 } |
2414 | 2410 |
2415 } // namespace WebCore | 2411 } // namespace WebCore |
OLD | NEW |