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

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

Issue 149373004: [CSS Grid Layout] Implementation of the grid-template shorthand. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@grid-template-working
Patch Set: New approach: simpler code, reusing track-list parsing and allow rewinding. Created 6 years, 10 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
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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 return valueForGridPosition(style->gridRowStart()); 1933 return valueForGridPosition(style->gridRowStart());
1934 case CSSPropertyGridRowEnd: 1934 case CSSPropertyGridRowEnd:
1935 return valueForGridPosition(style->gridRowEnd()); 1935 return valueForGridPosition(style->gridRowEnd());
1936 case CSSPropertyGridColumn: 1936 case CSSPropertyGridColumn:
1937 return valuesForGridShorthand(gridColumnShorthand()); 1937 return valuesForGridShorthand(gridColumnShorthand());
1938 case CSSPropertyGridRow: 1938 case CSSPropertyGridRow:
1939 return valuesForGridShorthand(gridRowShorthand()); 1939 return valuesForGridShorthand(gridRowShorthand());
1940 case CSSPropertyGridArea: 1940 case CSSPropertyGridArea:
1941 return valuesForGridShorthand(gridAreaShorthand()); 1941 return valuesForGridShorthand(gridAreaShorthand());
1942 1942
1943 case CSSPropertyGridTemplate:
1944 return valuesForGridShorthand(gridTemplateShorthand());
1945
1943 case CSSPropertyGridTemplateAreas: 1946 case CSSPropertyGridTemplateAreas:
1944 if (!style->namedGridAreaRowCount()) { 1947 if (!style->namedGridAreaRowCount()) {
1945 ASSERT(!style->namedGridAreaColumnCount()); 1948 ASSERT(!style->namedGridAreaColumnCount());
1946 return cssValuePool().createIdentifierValue(CSSValueNone); 1949 return cssValuePool().createIdentifierValue(CSSValueNone);
1947 } 1950 }
1948 1951
1949 return CSSGridTemplateAreasValue::create(style->namedGridArea(), sty le->namedGridAreaRowCount(), style->namedGridAreaColumnCount()); 1952 return CSSGridTemplateAreasValue::create(style->namedGridArea(), sty le->namedGridAreaRowCount(), style->namedGridAreaColumnCount());
1950 1953
1951 case CSSPropertyHeight: 1954 case CSSPropertyHeight:
1952 if (renderer) { 1955 if (renderer) {
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3021 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3019 CSSPropertyB ackgroundClip }; 3022 CSSPropertyB ackgroundClip };
3020 3023
3021 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ; 3024 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated() ;
3022 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 3025 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
3023 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 3026 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
3024 return list.release(); 3027 return list.release();
3025 } 3028 }
3026 3029
3027 } // namespace WebCore 3030 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698