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 4898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4909 } | 4909 } |
4910 | 4910 |
4911 NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaNam
e); | 4911 NamedGridAreaMap::iterator gridAreaIt = gridAreaMap.find(gridAreaNam
e); |
4912 if (gridAreaIt == gridAreaMap.end()) { | 4912 if (gridAreaIt == gridAreaMap.end()) { |
4913 gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount,
rowCount), GridSpan(currentCol, lookAheadCol))); | 4913 gridAreaMap.add(gridAreaName, GridCoordinate(GridSpan(rowCount,
rowCount), GridSpan(currentCol, lookAheadCol))); |
4914 } else { | 4914 } else { |
4915 GridCoordinate& gridCoordinate = gridAreaIt->value; | 4915 GridCoordinate& gridCoordinate = gridAreaIt->value; |
4916 | 4916 |
4917 // The following checks test that the grid area is a single fill
ed-in rectangle. | 4917 // The following checks test that the grid area is a single fill
ed-in rectangle. |
4918 // 1. The new row is adjacent to the previously parsed row. | 4918 // 1. The new row is adjacent to the previously parsed row. |
4919 if (rowCount != gridCoordinate.rows.initialPositionIndex + 1) | 4919 if (rowCount != gridCoordinate.rows.initialPositionIndex.integer
Position() + 1) |
4920 return 0; | 4920 return 0; |
4921 | 4921 |
4922 // 2. The new area starts at the same position as the previously
parsed area. | 4922 // 2. The new area starts at the same position as the previously
parsed area. |
4923 if (currentCol != gridCoordinate.columns.initialPositionIndex) | 4923 if (currentCol != gridCoordinate.columns.initialPositionIndex.in
tegerPosition()) |
4924 return 0; | 4924 return 0; |
4925 | 4925 |
4926 // 3. The new area ends at the same position as the previously p
arsed area. | 4926 // 3. The new area ends at the same position as the previously p
arsed area. |
4927 if (lookAheadCol != gridCoordinate.columns.finalPositionIndex) | 4927 if (lookAheadCol != gridCoordinate.columns.finalPositionIndex.in
tegerPosition()) |
4928 return 0; | 4928 return 0; |
4929 | 4929 |
4930 ++gridCoordinate.rows.finalPositionIndex; | 4930 gridCoordinate.rows.finalPositionIndex.setIntegerPosition(gridCo
ordinate.rows.finalPositionIndex.integerPosition() + 1); |
4931 } | 4931 } |
4932 currentCol = lookAheadCol; | 4932 currentCol = lookAheadCol; |
4933 } | 4933 } |
4934 | 4934 |
4935 ++rowCount; | 4935 ++rowCount; |
4936 m_valueList->next(); | 4936 m_valueList->next(); |
4937 } | 4937 } |
4938 | 4938 |
4939 if (!rowCount || !columnCount) | 4939 if (!rowCount || !columnCount) |
4940 return 0; | 4940 return 0; |
(...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10246 { | 10246 { |
10247 // The tokenizer checks for the construct of an+b. | 10247 // The tokenizer checks for the construct of an+b. |
10248 // However, since the {ident} rule precedes the {nth} rule, some of those | 10248 // However, since the {ident} rule precedes the {nth} rule, some of those |
10249 // tokens are identified as string literal. Furthermore we need to accept | 10249 // tokens are identified as string literal. Furthermore we need to accept |
10250 // "odd" and "even" which does not match to an+b. | 10250 // "odd" and "even" which does not match to an+b. |
10251 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 10251 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
10252 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 10252 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
10253 } | 10253 } |
10254 | 10254 |
10255 } | 10255 } |
OLD | NEW |