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

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: Rebaselined and updated after Ojan's and Elliott's comments Created 7 years, 4 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSGridTemplateValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
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 "core/css/BasicShapeFunctions.h" 31 #include "core/css/BasicShapeFunctions.h"
32 #include "core/css/CSSArrayFunctionValue.h" 32 #include "core/css/CSSArrayFunctionValue.h"
33 #include "core/css/CSSAspectRatioValue.h" 33 #include "core/css/CSSAspectRatioValue.h"
34 #include "core/css/CSSBorderImage.h" 34 #include "core/css/CSSBorderImage.h"
35 #include "core/css/CSSFilterValue.h" 35 #include "core/css/CSSFilterValue.h"
36 #include "core/css/CSSFunctionValue.h" 36 #include "core/css/CSSFunctionValue.h"
37 #include "core/css/CSSGridTemplateValue.h"
37 #include "core/css/CSSLineBoxContainValue.h" 38 #include "core/css/CSSLineBoxContainValue.h"
38 #include "core/css/CSSMixFunctionValue.h" 39 #include "core/css/CSSMixFunctionValue.h"
39 #include "core/css/CSSParser.h" 40 #include "core/css/CSSParser.h"
40 #include "core/css/CSSPrimitiveValue.h" 41 #include "core/css/CSSPrimitiveValue.h"
41 #include "core/css/CSSPrimitiveValueMappings.h" 42 #include "core/css/CSSPrimitiveValueMappings.h"
42 #include "core/css/CSSReflectValue.h" 43 #include "core/css/CSSReflectValue.h"
43 #include "core/css/CSSSelector.h" 44 #include "core/css/CSSSelector.h"
44 #include "core/css/CSSTimingFunctionValue.h" 45 #include "core/css/CSSTimingFunctionValue.h"
45 #include "core/css/CSSTransformValue.h" 46 #include "core/css/CSSTransformValue.h"
46 #include "core/css/CSSValueList.h" 47 #include "core/css/CSSValueList.h"
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 return valueForGridPosition(style->gridRowStart()); 1974 return valueForGridPosition(style->gridRowStart());
1974 case CSSPropertyGridRowEnd: 1975 case CSSPropertyGridRowEnd:
1975 return valueForGridPosition(style->gridRowEnd()); 1976 return valueForGridPosition(style->gridRowEnd());
1976 case CSSPropertyGridColumn: 1977 case CSSPropertyGridColumn:
1977 return getCSSPropertyValuesForGridShorthand(gridColumnShorthand()); 1978 return getCSSPropertyValuesForGridShorthand(gridColumnShorthand());
1978 case CSSPropertyGridRow: 1979 case CSSPropertyGridRow:
1979 return getCSSPropertyValuesForGridShorthand(gridRowShorthand()); 1980 return getCSSPropertyValuesForGridShorthand(gridRowShorthand());
1980 case CSSPropertyGridArea: 1981 case CSSPropertyGridArea:
1981 return getCSSPropertyValuesForGridShorthand(gridAreaShorthand()); 1982 return getCSSPropertyValuesForGridShorthand(gridAreaShorthand());
1982 1983
1984 case CSSPropertyGridTemplate:
1985 if (!style->namedGridAreaRowCount()) {
1986 ASSERT(!style->namedGridAreaColumnCount());
1987 return cssValuePool().createIdentifierValue(CSSValueNone);
1988 }
1989
1990 return CSSGridTemplateValue::create(style->namedGridArea(), style->n amedGridAreaRowCount(), style->namedGridAreaColumnCount());
1991
1983 case CSSPropertyHeight: 1992 case CSSPropertyHeight:
1984 if (renderer) { 1993 if (renderer) {
1985 // According to http://www.w3.org/TR/CSS2/visudet.html#the-heigh t-property, 1994 // According to http://www.w3.org/TR/CSS2/visudet.html#the-heigh t-property,
1986 // the "height" property does not apply for non-replaced inline elements. 1995 // the "height" property does not apply for non-replaced inline elements.
1987 if (!renderer->isReplaced() && renderer->isInline()) 1996 if (!renderer->isReplaced() && renderer->isInline())
1988 return cssValuePool().createIdentifierValue(CSSValueAuto); 1997 return cssValuePool().createIdentifierValue(CSSValueAuto);
1989 return zoomAdjustedPixelValue(sizingBox(renderer).height(), styl e.get()); 1998 return zoomAdjustedPixelValue(sizingBox(renderer).height(), styl e.get());
1990 } 1999 }
1991 return zoomAdjustedPixelValueForLength(style->height(), style.get()) ; 2000 return zoomAdjustedPixelValueForLength(style->height(), style.get()) ;
1992 case CSSPropertyWebkitHighlight: 2001 case CSSPropertyWebkitHighlight:
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
3077 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3086 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3078 CSSPropertyB ackgroundClip }; 3087 CSSPropertyB ackgroundClip };
3079 3088
3080 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3089 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3081 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator)))); 3090 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator))));
3082 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator)))); 3091 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator))));
3083 return list.release(); 3092 return list.release();
3084 } 3093 }
3085 3094
3086 } // namespace WebCore 3095 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSGridTemplateValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698