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

Side by Side Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 166623002: [CSS Grid Layout] Introduce an explicit type for resolved grid positions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue Created 6 years, 8 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
« no previous file with comments | « Source/core/css/CSSGridTemplateAreasValue.cpp ('k') | Source/core/rendering/RenderGrid.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) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012 Intel Corporation. All rights reserved.
10 * 10 *
(...skipping 3845 matching lines...) Expand 10 before | Expand all | Expand 10 after
3856 } 3856 }
3857 3857
3858 NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaName); 3858 NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaName);
3859 if (gridAreaIt == gridAreaMap.end()) { 3859 if (gridAreaIt == gridAreaMap.end()) {
3860 gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount, rowC ount), GridSpan(currentCol, lookAheadCol))); 3860 gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount, rowC ount), GridSpan(currentCol, lookAheadCol)));
3861 } else { 3861 } else {
3862 GridCoordinate& gridCoordinate = gridAreaIt->value; 3862 GridCoordinate& gridCoordinate = gridAreaIt->value;
3863 3863
3864 // The following checks test that the grid area is a single filled-i n rectangle. 3864 // The following checks test that the grid area is a single filled-i n rectangle.
3865 // 1. The new row is adjacent to the previously parsed row. 3865 // 1. The new row is adjacent to the previously parsed row.
3866 if (rowCount != gridCoordinate.rows.finalPositionIndex + 1) 3866 if (rowCount != gridCoordinate.rows.resolvedFinalPosition.toInt() + 1)
3867 return false; 3867 return false;
3868 3868
3869 // 2. The new area starts at the same position as the previously par sed area. 3869 // 2. The new area starts at the same position as the previously par sed area.
3870 if (currentCol != gridCoordinate.columns.initialPositionIndex) 3870 if (currentCol != gridCoordinate.columns.resolvedInitialPosition.toI nt())
3871 return false; 3871 return false;
3872 3872
3873 // 3. The new area ends at the same position as the previously parse d area. 3873 // 3. The new area ends at the same position as the previously parse d area.
3874 if (lookAheadCol != gridCoordinate.columns.finalPositionIndex) 3874 if (lookAheadCol != gridCoordinate.columns.resolvedFinalPosition.toI nt())
3875 return false; 3875 return false;
3876 3876
3877 ++gridCoordinate.rows.finalPositionIndex; 3877 ++gridCoordinate.rows.resolvedFinalPosition;
3878 } 3878 }
3879 currentCol = lookAheadCol; 3879 currentCol = lookAheadCol;
3880 } 3880 }
3881 3881
3882 m_valueList->next(); 3882 m_valueList->next();
3883 return true; 3883 return true;
3884 } 3884 }
3885 3885
3886 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas() 3886 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
3887 { 3887 {
(...skipping 4567 matching lines...) Expand 10 before | Expand all | Expand 10 after
8455 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); 8455 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill));
8456 if (!seenStroke) 8456 if (!seenStroke)
8457 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); 8457 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) );
8458 if (!seenMarkers) 8458 if (!seenMarkers)
8459 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); 8459 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers ));
8460 8460
8461 return parsedValues.release(); 8461 return parsedValues.release();
8462 } 8462 }
8463 8463
8464 } // namespace WebCore 8464 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSGridTemplateAreasValue.cpp ('k') | Source/core/rendering/RenderGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698