OLD | NEW |
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 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2392 | 2392 |
2393 // We handle several grid areas with the same name at once to simplify t
he validation code. | 2393 // We handle several grid areas with the same name at once to simplify t
he validation code. |
2394 size_t lookAheadCol; | 2394 size_t lookAheadCol; |
2395 for (lookAheadCol = currentCol + 1; lookAheadCol < columnCount; ++lookAh
eadCol) { | 2395 for (lookAheadCol = currentCol + 1; lookAheadCol < columnCount; ++lookAh
eadCol) { |
2396 if (columnNames[lookAheadCol] != gridAreaName) | 2396 if (columnNames[lookAheadCol] != gridAreaName) |
2397 break; | 2397 break; |
2398 } | 2398 } |
2399 | 2399 |
2400 NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaName); | 2400 NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaName); |
2401 if (gridAreaIt == gridAreaMap.end()) { | 2401 if (gridAreaIt == gridAreaMap.end()) { |
2402 gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan::definiteGridS
pan(rowCount, rowCount + 1), GridSpan::definiteGridSpan(currentCol, lookAheadCol
))); | 2402 gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan::translatedDef
initeGridSpan(rowCount, rowCount + 1), GridSpan::translatedDefiniteGridSpan(curr
entCol, lookAheadCol))); |
2403 } else { | 2403 } else { |
2404 GridCoordinate& gridCoordinate = gridAreaIt->value; | 2404 GridCoordinate& gridCoordinate = gridAreaIt->value; |
2405 | 2405 |
2406 // The following checks test that the grid area is a single filled-i
n rectangle. | 2406 // The following checks test that the grid area is a single filled-i
n rectangle. |
2407 // 1. The new row is adjacent to the previously parsed row. | 2407 // 1. The new row is adjacent to the previously parsed row. |
2408 if (rowCount != gridCoordinate.rows.resolvedFinalPosition()) | 2408 if (rowCount != gridCoordinate.rows.resolvedFinalPosition()) |
2409 return false; | 2409 return false; |
2410 | 2410 |
2411 // 2. The new area starts at the same position as the previously par
sed area. | 2411 // 2. The new area starts at the same position as the previously par
sed area. |
2412 if (currentCol != gridCoordinate.columns.resolvedInitialPosition()) | 2412 if (currentCol != gridCoordinate.columns.resolvedInitialPosition()) |
2413 return false; | 2413 return false; |
2414 | 2414 |
2415 // 3. The new area ends at the same position as the previously parse
d area. | 2415 // 3. The new area ends at the same position as the previously parse
d area. |
2416 if (lookAheadCol != gridCoordinate.columns.resolvedFinalPosition()) | 2416 if (lookAheadCol != gridCoordinate.columns.resolvedFinalPosition()) |
2417 return false; | 2417 return false; |
2418 | 2418 |
2419 gridCoordinate.rows = GridSpan::definiteGridSpan(gridCoordinate.rows
.resolvedInitialPosition(), gridCoordinate.rows.resolvedFinalPosition() + 1); | 2419 gridCoordinate.rows = GridSpan::translatedDefiniteGridSpan(gridCoord
inate.rows.resolvedInitialPosition(), gridCoordinate.rows.resolvedFinalPosition(
) + 1); |
2420 } | 2420 } |
2421 currentCol = lookAheadCol - 1; | 2421 currentCol = lookAheadCol - 1; |
2422 } | 2422 } |
2423 | 2423 |
2424 m_valueList->next(); | 2424 m_valueList->next(); |
2425 return true; | 2425 return true; |
2426 } | 2426 } |
2427 | 2427 |
2428 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas() | 2428 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas() |
2429 { | 2429 { |
(...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4625 ASSERT(!m_parsedCalculation); | 4625 ASSERT(!m_parsedCalculation); |
4626 m_parsedCalculation = CSSCalcValue::create(args, range); | 4626 m_parsedCalculation = CSSCalcValue::create(args, range); |
4627 | 4627 |
4628 if (!m_parsedCalculation) | 4628 if (!m_parsedCalculation) |
4629 return false; | 4629 return false; |
4630 | 4630 |
4631 return true; | 4631 return true; |
4632 } | 4632 } |
4633 | 4633 |
4634 } // namespace blink | 4634 } // namespace blink |
OLD | NEW |