Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 18532004: Implement 'grid-template' parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Same change, forgot to update css-properties-as-js-properties.html result Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 14 matching lines...) Expand all
25 #include "core/css/CSSComputedStyleDeclaration.h" 25 #include "core/css/CSSComputedStyleDeclaration.h"
26 26
27 #include "CSSPropertyNames.h" 27 #include "CSSPropertyNames.h"
28 #include "FontFamilyNames.h" 28 #include "FontFamilyNames.h"
29 #include "core/css/BasicShapeFunctions.h" 29 #include "core/css/BasicShapeFunctions.h"
30 #include "core/css/CSSArrayFunctionValue.h" 30 #include "core/css/CSSArrayFunctionValue.h"
31 #include "core/css/CSSAspectRatioValue.h" 31 #include "core/css/CSSAspectRatioValue.h"
32 #include "core/css/CSSBorderImage.h" 32 #include "core/css/CSSBorderImage.h"
33 #include "core/css/CSSFilterValue.h" 33 #include "core/css/CSSFilterValue.h"
34 #include "core/css/CSSFunctionValue.h" 34 #include "core/css/CSSFunctionValue.h"
35 #include "core/css/CSSGridTemplateValue.h"
35 #include "core/css/CSSLineBoxContainValue.h" 36 #include "core/css/CSSLineBoxContainValue.h"
36 #include "core/css/CSSMixFunctionValue.h" 37 #include "core/css/CSSMixFunctionValue.h"
37 #include "core/css/CSSParser.h" 38 #include "core/css/CSSParser.h"
38 #include "core/css/CSSPrimitiveValue.h" 39 #include "core/css/CSSPrimitiveValue.h"
39 #include "core/css/CSSPrimitiveValueMappings.h" 40 #include "core/css/CSSPrimitiveValueMappings.h"
40 #include "core/css/CSSReflectValue.h" 41 #include "core/css/CSSReflectValue.h"
41 #include "core/css/CSSSelector.h" 42 #include "core/css/CSSSelector.h"
42 #include "core/css/CSSTimingFunctionValue.h" 43 #include "core/css/CSSTimingFunctionValue.h"
43 #include "core/css/CSSTransformValue.h" 44 #include "core/css/CSSTransformValue.h"
44 #include "core/css/CSSValueList.h" 45 #include "core/css/CSSValueList.h"
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 return valueForGridPosition(style->gridRowStart()); 1958 return valueForGridPosition(style->gridRowStart());
1958 case CSSPropertyGridRowEnd: 1959 case CSSPropertyGridRowEnd:
1959 return valueForGridPosition(style->gridRowEnd()); 1960 return valueForGridPosition(style->gridRowEnd());
1960 case CSSPropertyGridColumn: 1961 case CSSPropertyGridColumn:
1961 return getCSSPropertyValuesForGridShorthand(gridColumnShorthand()); 1962 return getCSSPropertyValuesForGridShorthand(gridColumnShorthand());
1962 case CSSPropertyGridRow: 1963 case CSSPropertyGridRow:
1963 return getCSSPropertyValuesForGridShorthand(gridRowShorthand()); 1964 return getCSSPropertyValuesForGridShorthand(gridRowShorthand());
1964 case CSSPropertyGridArea: 1965 case CSSPropertyGridArea:
1965 return getCSSPropertyValuesForGridShorthand(gridAreaShorthand()); 1966 return getCSSPropertyValuesForGridShorthand(gridAreaShorthand());
1966 1967
1968 case CSSPropertyGridTemplate:
1969 if (!style->namedGridAreaRowCount()) {
1970 ASSERT(!style->namedGridAreaColumnCount());
1971 return cssValuePool().createIdentifierValue(CSSValueNone);
1972 }
1973
1974 return CSSGridTemplateValue::create(style->namedGridArea(), style->n amedGridAreaRowCount(), style->namedGridAreaColumnCount());
1975
1967 case CSSPropertyHeight: 1976 case CSSPropertyHeight:
1968 if (renderer) { 1977 if (renderer) {
1969 // According to http://www.w3.org/TR/CSS2/visudet.html#the-heigh t-property, 1978 // According to http://www.w3.org/TR/CSS2/visudet.html#the-heigh t-property,
1970 // the "height" property does not apply for non-replaced inline elements. 1979 // the "height" property does not apply for non-replaced inline elements.
1971 if (!renderer->isReplaced() && renderer->isInline()) 1980 if (!renderer->isReplaced() && renderer->isInline())
1972 return cssValuePool().createIdentifierValue(CSSValueAuto); 1981 return cssValuePool().createIdentifierValue(CSSValueAuto);
1973 return zoomAdjustedPixelValue(sizingBox(renderer).height(), styl e.get()); 1982 return zoomAdjustedPixelValue(sizingBox(renderer).height(), styl e.get());
1974 } 1983 }
1975 return zoomAdjustedPixelValueForLength(style->height(), style.get()) ; 1984 return zoomAdjustedPixelValueForLength(style->height(), style.get()) ;
1976 case CSSPropertyWebkitHighlight: 1985 case CSSPropertyWebkitHighlight:
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3026 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3018 CSSPropertyB ackgroundClip }; 3027 CSSPropertyB ackgroundClip };
3019 3028
3020 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3029 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3021 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator)))); 3030 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator))));
3022 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator)))); 3031 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator))));
3023 return list.release(); 3032 return list.release();
3024 } 3033 }
3025 3034
3026 } // namespace WebCore 3035 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698