Chromium Code Reviews| 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 3561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3572 | 3572 |
| 3573 return values; | 3573 return values; |
| 3574 } | 3574 } |
| 3575 | 3575 |
| 3576 bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list) | 3576 bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list) |
| 3577 { | 3577 { |
| 3578 CSSParserValueList* arguments = m_valueList->current()->function->args.get() ; | 3578 CSSParserValueList* arguments = m_valueList->current()->function->args.get() ; |
| 3579 if (!arguments || arguments->size() < 3 || !validUnit(arguments->valueAt(0), FPositiveInteger) || !isComma(arguments->valueAt(1))) | 3579 if (!arguments || arguments->size() < 3 || !validUnit(arguments->valueAt(0), FPositiveInteger) || !isComma(arguments->valueAt(1))) |
| 3580 return false; | 3580 return false; |
| 3581 | 3581 |
| 3582 size_t repetitions = arguments->valueAt(0)->fValue; | 3582 ASSERT_WITH_SECURITY_IMPLICATION(arguments->valueAt(0)->fValue > 0); |
|
Julien - ping for review
2014/10/21 15:33:12
I don't have this ASSERT on my tree.
svillar
2014/10/21 15:48:49
You should, I've just checked current master and i
Julien - ping for review
2014/10/21 19:22:36
Sigh, I was looking at the wrong place.
| |
| 3583 ASSERT_WITH_SECURITY_IMPLICATION(repetitions > 0); | 3583 size_t repetitions = std::min<double>(arguments->valueAt(0)->fValue, kGridMa xTracks); |
|
Julien - ping for review
2014/10/21 15:33:12
Why don't we just use clampTo<size_t>(argument->va
svillar
2014/10/21 15:48:49
You're totally right. Let's do it.
| |
| 3584 | 3584 |
| 3585 RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceS eparated(); | 3585 RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceS eparated(); |
| 3586 arguments->next(); // Skip the repetition count. | 3586 arguments->next(); // Skip the repetition count. |
| 3587 arguments->next(); // Skip the comma. | 3587 arguments->next(); // Skip the comma. |
| 3588 | 3588 |
| 3589 // Handle leading <ident>*. | 3589 // Handle leading <ident>*. |
| 3590 CSSParserValue* currentValue = arguments->current(); | 3590 CSSParserValue* currentValue = arguments->current(); |
| 3591 if (currentValue && currentValue->unit == CSSParserValue::ValueList) | 3591 if (currentValue && currentValue->unit == CSSParserValue::ValueList) |
| 3592 parseGridLineNames(*arguments, *repeatedValues); | 3592 parseGridLineNames(*arguments, *repeatedValues); |
| 3593 | 3593 |
| (...skipping 4754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8348 return nullptr; | 8348 return nullptr; |
| 8349 a = args->next(); | 8349 a = args->next(); |
| 8350 | 8350 |
| 8351 argNumber++; | 8351 argNumber++; |
| 8352 } | 8352 } |
| 8353 | 8353 |
| 8354 return transformValue.release(); | 8354 return transformValue.release(); |
| 8355 } | 8355 } |
| 8356 | 8356 |
| 8357 } // namespace blink | 8357 } // namespace blink |
| OLD | NEW |