| 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.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "CSSPropertyNames.h" | 27 #include "CSSPropertyNames.h" |
| 28 #include "FontFamilyNames.h" | 28 #include "FontFamilyNames.h" |
| 29 #include "RuntimeEnabledFeatures.h" | 29 #include "RuntimeEnabledFeatures.h" |
| 30 #include "StylePropertyShorthand.h" | 30 #include "StylePropertyShorthand.h" |
| 31 #include "bindings/v8/ExceptionState.h" | 31 #include "bindings/v8/ExceptionState.h" |
| 32 #include "core/css/BasicShapeFunctions.h" | 32 #include "core/css/BasicShapeFunctions.h" |
| 33 #include "core/css/CSSArrayFunctionValue.h" | 33 #include "core/css/CSSArrayFunctionValue.h" |
| 34 #include "core/css/CSSAspectRatioValue.h" | 34 #include "core/css/CSSAspectRatioValue.h" |
| 35 #include "core/css/CSSBorderImage.h" | 35 #include "core/css/CSSBorderImage.h" |
| 36 #include "core/css/CSSFilterValue.h" | 36 #include "core/css/CSSFilterValue.h" |
| 37 #include "core/css/CSSFontFeatureValue.h" |
| 38 #include "core/css/CSSFontValue.h" |
| 37 #include "core/css/CSSFunctionValue.h" | 39 #include "core/css/CSSFunctionValue.h" |
| 38 #include "core/css/CSSGridTemplateValue.h" | 40 #include "core/css/CSSGridTemplateValue.h" |
| 39 #include "core/css/CSSLineBoxContainValue.h" | 41 #include "core/css/CSSLineBoxContainValue.h" |
| 40 #include "core/css/CSSMixFunctionValue.h" | 42 #include "core/css/CSSMixFunctionValue.h" |
| 41 #include "core/css/CSSParser.h" | 43 #include "core/css/CSSParser.h" |
| 42 #include "core/css/CSSPrimitiveValue.h" | 44 #include "core/css/CSSPrimitiveValue.h" |
| 43 #include "core/css/CSSPrimitiveValueMappings.h" | 45 #include "core/css/CSSPrimitiveValueMappings.h" |
| 44 #include "core/css/CSSReflectValue.h" | 46 #include "core/css/CSSReflectValue.h" |
| 45 #include "core/css/CSSSelector.h" | 47 #include "core/css/CSSSelector.h" |
| 46 #include "core/css/CSSTimingFunctionValue.h" | 48 #include "core/css/CSSTimingFunctionValue.h" |
| 47 #include "core/css/CSSTransformValue.h" | 49 #include "core/css/CSSTransformValue.h" |
| 48 #include "core/css/CSSValueList.h" | 50 #include "core/css/CSSValueList.h" |
| 49 #include "core/css/CSSValuePool.h" | 51 #include "core/css/CSSValuePool.h" |
| 50 #include "core/css/FontFeatureValue.h" | |
| 51 #include "core/css/FontValue.h" | |
| 52 #include "core/css/Pair.h" | 52 #include "core/css/Pair.h" |
| 53 #include "core/css/Rect.h" | 53 #include "core/css/Rect.h" |
| 54 #include "core/css/ShadowValue.h" | 54 #include "core/css/ShadowValue.h" |
| 55 #include "core/css/StylePropertySet.h" | 55 #include "core/css/StylePropertySet.h" |
| 56 #include "core/css/resolver/StyleResolver.h" | 56 #include "core/css/resolver/StyleResolver.h" |
| 57 #include "core/dom/Document.h" | 57 #include "core/dom/Document.h" |
| 58 #include "core/dom/ExceptionCode.h" | 58 #include "core/dom/ExceptionCode.h" |
| 59 #include "core/dom/PseudoElement.h" | 59 #include "core/dom/PseudoElement.h" |
| 60 #include "core/page/RuntimeCSSEnabled.h" | 60 #include "core/page/RuntimeCSSEnabled.h" |
| 61 #include "core/page/animation/AnimationController.h" | 61 #include "core/page/animation/AnimationController.h" |
| (...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 return cssValuePool().createValue(style->flexWrap()); | 1991 return cssValuePool().createValue(style->flexWrap()); |
| 1992 case CSSPropertyJustifyContent: | 1992 case CSSPropertyJustifyContent: |
| 1993 return cssValuePool().createValue(style->justifyContent()); | 1993 return cssValuePool().createValue(style->justifyContent()); |
| 1994 case CSSPropertyOrder: | 1994 case CSSPropertyOrder: |
| 1995 return cssValuePool().createValue(style->order(), CSSPrimitiveValue:
:CSS_NUMBER); | 1995 return cssValuePool().createValue(style->order(), CSSPrimitiveValue:
:CSS_NUMBER); |
| 1996 case CSSPropertyFloat: | 1996 case CSSPropertyFloat: |
| 1997 if (style->display() != NONE && style->hasOutOfFlowPosition()) | 1997 if (style->display() != NONE && style->hasOutOfFlowPosition()) |
| 1998 return cssValuePool().createIdentifierValue(CSSValueNone); | 1998 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1999 return cssValuePool().createValue(style->floating()); | 1999 return cssValuePool().createValue(style->floating()); |
| 2000 case CSSPropertyFont: { | 2000 case CSSPropertyFont: { |
| 2001 RefPtr<FontValue> computedFont = FontValue::create(); | 2001 RefPtr<CSSFontValue> computedFont = CSSFontValue::create(); |
| 2002 computedFont->style = valueForFontStyle(style.get()); | 2002 computedFont->style = valueForFontStyle(style.get()); |
| 2003 computedFont->variant = valueForFontVariant(style.get()); | 2003 computedFont->variant = valueForFontVariant(style.get()); |
| 2004 computedFont->weight = valueForFontWeight(style.get()); | 2004 computedFont->weight = valueForFontWeight(style.get()); |
| 2005 computedFont->size = valueForFontSize(style.get()); | 2005 computedFont->size = valueForFontSize(style.get()); |
| 2006 computedFont->lineHeight = valueForLineHeight(style.get(), m_node->d
ocument().renderView()); | 2006 computedFont->lineHeight = valueForLineHeight(style.get(), m_node->d
ocument().renderView()); |
| 2007 computedFont->family = valueForFontFamily(style.get()); | 2007 computedFont->family = valueForFontFamily(style.get()); |
| 2008 return computedFont.release(); | 2008 return computedFont.release(); |
| 2009 } | 2009 } |
| 2010 case CSSPropertyFontFamily: { | 2010 case CSSPropertyFontFamily: { |
| 2011 RefPtr<CSSValueList> fontFamilyList = valueForFontFamily(style.get()
); | 2011 RefPtr<CSSValueList> fontFamilyList = valueForFontFamily(style.get()
); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2023 return valueForFontVariant(style.get()); | 2023 return valueForFontVariant(style.get()); |
| 2024 case CSSPropertyFontWeight: | 2024 case CSSPropertyFontWeight: |
| 2025 return valueForFontWeight(style.get()); | 2025 return valueForFontWeight(style.get()); |
| 2026 case CSSPropertyWebkitFontFeatureSettings: { | 2026 case CSSPropertyWebkitFontFeatureSettings: { |
| 2027 const FontFeatureSettings* featureSettings = style->fontDescription(
).featureSettings(); | 2027 const FontFeatureSettings* featureSettings = style->fontDescription(
).featureSettings(); |
| 2028 if (!featureSettings || !featureSettings->size()) | 2028 if (!featureSettings || !featureSettings->size()) |
| 2029 return cssValuePool().createIdentifierValue(CSSValueNormal); | 2029 return cssValuePool().createIdentifierValue(CSSValueNormal); |
| 2030 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); | 2030 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); |
| 2031 for (unsigned i = 0; i < featureSettings->size(); ++i) { | 2031 for (unsigned i = 0; i < featureSettings->size(); ++i) { |
| 2032 const FontFeature& feature = featureSettings->at(i); | 2032 const FontFeature& feature = featureSettings->at(i); |
| 2033 RefPtr<FontFeatureValue> featureValue = FontFeatureValue::create
(feature.tag(), feature.value()); | 2033 RefPtr<CSSFontFeatureValue> featureValue = CSSFontFeatureValue::
create(feature.tag(), feature.value()); |
| 2034 list->append(featureValue.release()); | 2034 list->append(featureValue.release()); |
| 2035 } | 2035 } |
| 2036 return list.release(); | 2036 return list.release(); |
| 2037 } | 2037 } |
| 2038 case CSSPropertyGridAutoColumns: | 2038 case CSSPropertyGridAutoColumns: |
| 2039 return valueForGridTrackSize(style->gridAutoColumns(), style.get(),
m_node->document().renderView()); | 2039 return valueForGridTrackSize(style->gridAutoColumns(), style.get(),
m_node->document().renderView()); |
| 2040 case CSSPropertyGridAutoFlow: | 2040 case CSSPropertyGridAutoFlow: |
| 2041 return cssValuePool().createValue(style->gridAutoFlow()); | 2041 return cssValuePool().createValue(style->gridAutoFlow()); |
| 2042 case CSSPropertyGridAutoRows: | 2042 case CSSPropertyGridAutoRows: |
| 2043 return valueForGridTrackSize(style->gridAutoRows(), style.get(), m_n
ode->document().renderView()); | 2043 return valueForGridTrackSize(style->gridAutoRows(), style.get(), m_n
ode->document().renderView()); |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3233 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3233 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
| 3234 CSSPropertyB
ackgroundClip }; | 3234 CSSPropertyB
ackgroundClip }; |
| 3235 | 3235 |
| 3236 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3236 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
| 3237 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3237 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
| 3238 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3238 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
| 3239 return list.release(); | 3239 return list.release(); |
| 3240 } | 3240 } |
| 3241 | 3241 |
| 3242 } // namespace WebCore | 3242 } // namespace WebCore |
| OLD | NEW |