Chromium Code Reviews| 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 * Copyright (C) 2013 Opera Software ASA. All rights reserved. | |
| 7 * | 8 * |
| 8 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 11 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
| 12 * | 13 * |
| 13 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 * Lesser General Public License for more details. | 17 * Lesser General Public License for more details. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 CSSPropertyListStylePosition, | 139 CSSPropertyListStylePosition, |
| 139 CSSPropertyListStyleType, | 140 CSSPropertyListStyleType, |
| 140 CSSPropertyMarginBottom, | 141 CSSPropertyMarginBottom, |
| 141 CSSPropertyMarginLeft, | 142 CSSPropertyMarginLeft, |
| 142 CSSPropertyMarginRight, | 143 CSSPropertyMarginRight, |
| 143 CSSPropertyMarginTop, | 144 CSSPropertyMarginTop, |
| 144 CSSPropertyMaxHeight, | 145 CSSPropertyMaxHeight, |
| 145 CSSPropertyMaxWidth, | 146 CSSPropertyMaxWidth, |
| 146 CSSPropertyMinHeight, | 147 CSSPropertyMinHeight, |
| 147 CSSPropertyMinWidth, | 148 CSSPropertyMinWidth, |
| 149 CSSPropertyNavDown, | |
| 150 CSSPropertyNavLeft, | |
| 151 CSSPropertyNavRight, | |
| 152 CSSPropertyNavUp, | |
| 148 CSSPropertyMixBlendMode, | 153 CSSPropertyMixBlendMode, |
| 149 CSSPropertyOpacity, | 154 CSSPropertyOpacity, |
| 150 CSSPropertyOrphans, | 155 CSSPropertyOrphans, |
| 151 CSSPropertyOutlineColor, | 156 CSSPropertyOutlineColor, |
| 152 CSSPropertyOutlineOffset, | 157 CSSPropertyOutlineOffset, |
| 153 CSSPropertyOutlineStyle, | 158 CSSPropertyOutlineStyle, |
| 154 CSSPropertyOutlineWidth, | 159 CSSPropertyOutlineWidth, |
| 155 CSSPropertyOverflowWrap, | 160 CSSPropertyOverflowWrap, |
| 156 CSSPropertyOverflowX, | 161 CSSPropertyOverflowX, |
| 157 CSSPropertyOverflowY, | 162 CSSPropertyOverflowY, |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1400 | 1405 |
| 1401 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | 1406 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
| 1402 for (CounterDirectiveMap::const_iterator it = map->begin(); it != map->end() ; ++it) { | 1407 for (CounterDirectiveMap::const_iterator it = map->begin(); it != map->end() ; ++it) { |
| 1403 list->append(cssValuePool().createValue(it->key, CSSPrimitiveValue::CSS_ STRING)); | 1408 list->append(cssValuePool().createValue(it->key, CSSPrimitiveValue::CSS_ STRING)); |
| 1404 short number = propertyID == CSSPropertyCounterIncrement ? it->value.inc rementValue() : it->value.resetValue(); | 1409 short number = propertyID == CSSPropertyCounterIncrement ? it->value.inc rementValue() : it->value.resetValue(); |
| 1405 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu e::CSS_NUMBER)); | 1410 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu e::CSS_NUMBER)); |
| 1406 } | 1411 } |
| 1407 return list.release(); | 1412 return list.release(); |
| 1408 } | 1413 } |
| 1409 | 1414 |
| 1415 static PassRefPtr<CSSValue> navDirToCSSValue(const StyleNavigationValue& navValu e) | |
|
esprehn
2013/06/20 19:45:10
navDirectionToCSSValue
Krzysztof Olczyk
2013/07/22 14:14:16
Done.
| |
| 1416 { | |
| 1417 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | |
| 1418 list->append(cssValuePool().createValue(navValue.id().string(), CSSPrimitive Value::CSS_STRING)); | |
| 1419 list->append(cssValuePool().createValue(navValue.target().string(), CSSPrimi tiveValue::CSS_STRING)); | |
| 1420 | |
| 1421 return list.release(); | |
| 1422 } | |
| 1423 | |
| 1410 static void logUnimplementedPropertyID(CSSPropertyID propertyID) | 1424 static void logUnimplementedPropertyID(CSSPropertyID propertyID) |
| 1411 { | 1425 { |
| 1412 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ()); | 1426 DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ()); |
| 1413 if (!propertyIDSet.add(propertyID).isNewEntry) | 1427 if (!propertyIDSet.add(propertyID).isNewEntry) |
| 1414 return; | 1428 return; |
| 1415 | 1429 |
| 1416 LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", getPro pertyName(propertyID)); | 1430 LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", getPro pertyName(propertyID)); |
| 1417 } | 1431 } |
| 1418 | 1432 |
| 1419 static PassRefPtr<CSSValueList> fontFamilyFromStyle(RenderStyle* style) | 1433 static PassRefPtr<CSSValueList> fontFamilyFromStyle(RenderStyle* style) |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2025 if (marginBottom.isFixed() || !renderer || !renderer->isBox()) | 2039 if (marginBottom.isFixed() || !renderer || !renderer->isBox()) |
| 2026 return zoomAdjustedPixelValueForLength(marginBottom, style.get() ); | 2040 return zoomAdjustedPixelValueForLength(marginBottom, style.get() ); |
| 2027 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginBottom(), style.get()); | 2041 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginBottom(), style.get()); |
| 2028 } | 2042 } |
| 2029 case CSSPropertyMarginLeft: { | 2043 case CSSPropertyMarginLeft: { |
| 2030 Length marginLeft = style->marginLeft(); | 2044 Length marginLeft = style->marginLeft(); |
| 2031 if (marginLeft.isFixed() || !renderer || !renderer->isBox()) | 2045 if (marginLeft.isFixed() || !renderer || !renderer->isBox()) |
| 2032 return zoomAdjustedPixelValueForLength(marginLeft, style.get()); | 2046 return zoomAdjustedPixelValueForLength(marginLeft, style.get()); |
| 2033 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginLeft(), s tyle.get()); | 2047 return zoomAdjustedPixelValue(toRenderBox(renderer)->marginLeft(), s tyle.get()); |
| 2034 } | 2048 } |
| 2049 case CSSPropertyNavDown: | |
| 2050 return navDirToCSSValue(style->navDown()); | |
| 2051 case CSSPropertyNavLeft: | |
| 2052 return navDirToCSSValue(style->navLeft()); | |
| 2053 case CSSPropertyNavRight: | |
| 2054 return navDirToCSSValue(style->navRight()); | |
| 2055 case CSSPropertyNavUp: | |
| 2056 return navDirToCSSValue(style->navUp()); | |
| 2035 case CSSPropertyWebkitMarqueeDirection: | 2057 case CSSPropertyWebkitMarqueeDirection: |
| 2036 return cssValuePool().createValue(style->marqueeDirection()); | 2058 return cssValuePool().createValue(style->marqueeDirection()); |
| 2037 case CSSPropertyWebkitMarqueeIncrement: | 2059 case CSSPropertyWebkitMarqueeIncrement: |
| 2038 return cssValuePool().createValue(style->marqueeIncrement()); | 2060 return cssValuePool().createValue(style->marqueeIncrement()); |
| 2039 case CSSPropertyWebkitMarqueeRepetition: | 2061 case CSSPropertyWebkitMarqueeRepetition: |
| 2040 if (style->marqueeLoopCount() < 0) | 2062 if (style->marqueeLoopCount() < 0) |
| 2041 return cssValuePool().createIdentifierValue(CSSValueInfinite); | 2063 return cssValuePool().createIdentifierValue(CSSValueInfinite); |
| 2042 return cssValuePool().createValue(style->marqueeLoopCount(), CSSPrim itiveValue::CSS_NUMBER); | 2064 return cssValuePool().createValue(style->marqueeLoopCount(), CSSPrim itiveValue::CSS_NUMBER); |
| 2043 case CSSPropertyWebkitMarqueeStyle: | 2065 case CSSPropertyWebkitMarqueeStyle: |
| 2044 return cssValuePool().createValue(style->marqueeBehavior()); | 2066 return cssValuePool().createValue(style->marqueeBehavior()); |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2984 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, | 3006 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, |
| 2985 CSSPropertyB ackgroundClip }; | 3007 CSSPropertyB ackgroundClip }; |
| 2986 | 3008 |
| 2987 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3009 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
| 2988 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator)))); | 3010 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator)))); |
| 2989 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator)))); | 3011 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator)))); |
| 2990 return list.release(); | 3012 return list.release(); |
| 2991 } | 3013 } |
| 2992 | 3014 |
| 2993 } // namespace WebCore | 3015 } // namespace WebCore |
| OLD | NEW |