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

Side by Side Diff: Source/WebCore/css/CSSParser.cpp

Issue 6966014: Merge 87083 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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 | « LayoutTests/fast/css/parse-color-int-or-percent-crash-expected.txt ('k') | no next file » | 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 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 4141 matching lines...) Expand 10 before | Expand all | Expand 10 after
4152 if (newValue >= 255) { 4152 if (newValue >= 255) {
4153 // Clamp values at 255. 4153 // Clamp values at 255.
4154 localValue = 255; 4154 localValue = 255;
4155 while (current != end && isASCIIDigit(*current)) 4155 while (current != end && isASCIIDigit(*current))
4156 ++current; 4156 ++current;
4157 break; 4157 break;
4158 } 4158 }
4159 localValue = newValue; 4159 localValue = newValue;
4160 } 4160 }
4161 4161
4162 if (current == end)
4163 return false;
4164
4162 if (expect == CSSPrimitiveValue::CSS_NUMBER && (*current == '.' || *current == '%')) 4165 if (expect == CSSPrimitiveValue::CSS_NUMBER && (*current == '.' || *current == '%'))
4163 return false; 4166 return false;
4164 4167
4165 if (*current == '.') { 4168 if (*current == '.') {
4166 // We already parsed the integral part, try to parse 4169 // We already parsed the integral part, try to parse
4167 // the fraction part of the percentage value. 4170 // the fraction part of the percentage value.
4168 double percentage = 0; 4171 double percentage = 0;
4169 int numCharactersParsed = parseDouble(current, end, '%', percentage); 4172 int numCharactersParsed = parseDouble(current, end, '%', percentage);
4170 if (!numCharactersParsed) 4173 if (!numCharactersParsed)
4171 return false; 4174 return false;
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after
6801 // The macro is used in the tokenizer grammar with lines containing 6804 // The macro is used in the tokenizer grammar with lines containing
6802 // BEGIN(mediaqueries) and BEGIN(initial). yy_start acts as index to 6805 // BEGIN(mediaqueries) and BEGIN(initial). yy_start acts as index to
6803 // tokenizer transition table, and 'mediaqueries' and 'initial' are 6806 // tokenizer transition table, and 'mediaqueries' and 'initial' are
6804 // offset multipliers that specify which transitions are active 6807 // offset multipliers that specify which transitions are active
6805 // in the tokenizer during in each condition (tokenizer state). 6808 // in the tokenizer during in each condition (tokenizer state).
6806 #define BEGIN yy_start = 1 + 2 * 6809 #define BEGIN yy_start = 1 + 2 *
6807 6810
6808 #include "tokenizer.cpp" 6811 #include "tokenizer.cpp"
6809 6812
6810 } 6813 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/parse-color-int-or-percent-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698