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 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1776 if (charactersAreAllASCII(input, length)) { | 1776 if (charactersAreAllASCII(input, length)) { |
1777 // Fast case for all-ASCII. | 1777 // Fast case for all-ASCII. |
1778 for (unsigned i = 0; i < length; i++) | 1778 for (unsigned i = 0; i < length; i++) |
1779 output[i] = toASCIILower(input[i]); | 1779 output[i] = toASCIILower(input[i]); |
1780 } else { | 1780 } else { |
1781 for (unsigned i = 0; i < length; i++) | 1781 for (unsigned i = 0; i < length; i++) |
1782 output[i] = Unicode::toLower(input[i]); | 1782 output[i] = Unicode::toLower(input[i]); |
1783 } | 1783 } |
1784 } | 1784 } |
1785 | 1785 |
1786 void BisonCSSParser::tokenToLowerCase(const CSSParserString& token) | 1786 void BisonCSSParser::tokenToLowerCase(CSSParserString& token) |
1787 { | 1787 { |
1788 size_t length = token.length(); | 1788 size_t length = token.length(); |
1789 if (m_tokenizer.is8BitSource()) { | 1789 if (token.is8Bit()) { |
1790 size_t offset = token.characters8() - m_tokenizer.m_dataStart8.get(); | 1790 makeLower(token.characters8(), const_cast<LChar*>(token.characters8()), length); |
1791 makeLower(token.characters8(), m_tokenizer.m_dataStart8.get() + offset, length); | |
1792 } else { | 1791 } else { |
1793 size_t offset = token.characters16() - m_tokenizer.m_dataStart16.get(); | 1792 makeLower(token.characters16(), const_cast<UChar*>(token.characters16()) , length); |
rune
2014/04/02 11:11:09
Excuse my unicode ignorance, but are you guarantee
| |
1794 makeLower(token.characters16(), m_tokenizer.m_dataStart16.get() + offset , length); | |
1795 } | 1793 } |
1796 } | 1794 } |
1797 | 1795 |
1798 void BisonCSSParser::endInvalidRuleHeader() | 1796 void BisonCSSParser::endInvalidRuleHeader() |
1799 { | 1797 { |
1800 if (m_ruleHeaderType == CSSRuleSourceData::UNKNOWN_RULE) | 1798 if (m_ruleHeaderType == CSSRuleSourceData::UNKNOWN_RULE) |
1801 return; | 1799 return; |
1802 | 1800 |
1803 CSSParserLocation location; | 1801 CSSParserLocation location; |
1804 location.lineNumber = m_tokenizer.m_lineNumber; | 1802 location.lineNumber = m_tokenizer.m_lineNumber; |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2184 rule->setProperties(createStylePropertySet()); | 2182 rule->setProperties(createStylePropertySet()); |
2185 clearProperties(); | 2183 clearProperties(); |
2186 | 2184 |
2187 StyleRuleViewport* result = rule.get(); | 2185 StyleRuleViewport* result = rule.get(); |
2188 m_parsedRules.append(rule.release()); | 2186 m_parsedRules.append(rule.release()); |
2189 | 2187 |
2190 return result; | 2188 return result; |
2191 } | 2189 } |
2192 | 2190 |
2193 } | 2191 } |
OLD | NEW |