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 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4677 bool CSSPropertyParser::parseLineHeight(bool important) | 4677 bool CSSPropertyParser::parseLineHeight(bool important) |
| 4678 { | 4678 { |
| 4679 CSSParserValue* value = m_valueList->current(); | 4679 CSSParserValue* value = m_valueList->current(); |
| 4680 CSSValueID id = value->id; | 4680 CSSValueID id = value->id; |
| 4681 bool validPrimitive = false; | 4681 bool validPrimitive = false; |
| 4682 // normal | <number> | <length> | <percentage> | inherit | 4682 // normal | <number> | <length> | <percentage> | inherit |
| 4683 if (id == CSSValueNormal) | 4683 if (id == CSSValueNormal) |
| 4684 validPrimitive = true; | 4684 validPrimitive = true; |
| 4685 else | 4685 else |
| 4686 validPrimitive = (!id && validUnit(value, FNumber | FLength | FPercent | FNonNeg)); | 4686 validPrimitive = (!id && validUnit(value, FNumber | FLength | FPercent | FNonNeg)); |
| 4687 // The line-height property can accept both percents and numbers but additiv e opertaions are | |
| 4688 // not permitted on them in calc() expressions. | |
| 4689 if (m_parsedCalculation && m_parsedCalculation->category() == CalcPercentNum ber) | |
| 4690 validPrimitive = false; | |
|
alancutter (OOO until 2018)
2014/12/31 03:38:08
You should release() m_parsedCalulation here if it
| |
| 4687 if (validPrimitive && (!m_valueList->next() || inShorthand())) | 4691 if (validPrimitive && (!m_valueList->next() || inShorthand())) |
| 4688 addProperty(CSSPropertyLineHeight, parseValidPrimitive(id, value), impor tant); | 4692 addProperty(CSSPropertyLineHeight, parseValidPrimitive(id, value), impor tant); |
| 4689 return validPrimitive; | 4693 return validPrimitive; |
| 4690 } | 4694 } |
| 4691 | 4695 |
| 4692 bool CSSPropertyParser::parseFontSize(bool important) | 4696 bool CSSPropertyParser::parseFontSize(bool important) |
| 4693 { | 4697 { |
| 4694 CSSParserValue* value = m_valueList->current(); | 4698 CSSParserValue* value = m_valueList->current(); |
| 4695 CSSValueID id = value->id; | 4699 CSSValueID id = value->id; |
| 4696 bool validPrimitive = false; | 4700 bool validPrimitive = false; |
| (...skipping 3853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8550 } | 8554 } |
| 8551 } | 8555 } |
| 8552 | 8556 |
| 8553 if (!list->length()) | 8557 if (!list->length()) |
| 8554 return nullptr; | 8558 return nullptr; |
| 8555 | 8559 |
| 8556 return list.release(); | 8560 return list.release(); |
| 8557 } | 8561 } |
| 8558 | 8562 |
| 8559 } // namespace blink | 8563 } // namespace blink |
| OLD | NEW |