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 4773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4784 | 4784 |
4785 PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceUnicodeRang
e() | 4785 PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceUnicodeRang
e() |
4786 { | 4786 { |
4787 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); | 4787 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); |
4788 | 4788 |
4789 do { | 4789 do { |
4790 CSSParserValue* current = m_valueList->current(); | 4790 CSSParserValue* current = m_valueList->current(); |
4791 if (!current || current->unit != CSSParserValue::UnicodeRange) | 4791 if (!current || current->unit != CSSParserValue::UnicodeRange) |
4792 return nullptr; | 4792 return nullptr; |
4793 | 4793 |
4794 CSSParserValue* start = current->valueList->valueAt(0); | 4794 UChar32 start = current->m_unicodeRange.start; |
4795 CSSParserValue* end = current->valueList->valueAt(1); | 4795 UChar32 end = current->m_unicodeRange.end; |
4796 ASSERT(start->unit == CSSPrimitiveValue::CSS_NUMBER); | 4796 if (start > end) |
4797 ASSERT(end->unit == CSSPrimitiveValue::CSS_NUMBER); | |
4798 if (start->fValue > end->fValue) | |
4799 return nullptr; | 4797 return nullptr; |
4800 values->append(CSSUnicodeRangeValue::create(start->fValue, end->fValue))
; | 4798 values->append(CSSUnicodeRangeValue::create(start, end)); |
4801 m_valueList->next(); | 4799 m_valueList->next(); |
4802 } while (consumeComma(m_valueList)); | 4800 } while (consumeComma(m_valueList)); |
4803 | 4801 |
4804 return values.release(); | 4802 return values.release(); |
4805 } | 4803 } |
4806 | 4804 |
4807 // Returns the number of characters which form a valid double | 4805 // Returns the number of characters which form a valid double |
4808 // and are terminated by the given terminator character | 4806 // and are terminated by the given terminator character |
4809 template <typename CharacterType> | 4807 template <typename CharacterType> |
4810 static int checkForValidDouble(const CharacterType* string, const CharacterType*
end, const char terminator) | 4808 static int checkForValidDouble(const CharacterType* string, const CharacterType*
end, const char terminator) |
(...skipping 3603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8414 } | 8412 } |
8415 } | 8413 } |
8416 | 8414 |
8417 if (!list->length()) | 8415 if (!list->length()) |
8418 return nullptr; | 8416 return nullptr; |
8419 | 8417 |
8420 return list.release(); | 8418 return list.release(); |
8421 } | 8419 } |
8422 | 8420 |
8423 } // namespace blink | 8421 } // namespace blink |
OLD | NEW |