| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // The double* parameter may be 0 to check if the string can be parsed without | 51 // The double* parameter may be 0 to check if the string can be parsed without |
| 52 // getting the result. | 52 // getting the result. |
| 53 Decimal parseToDecimalForNumberType( | 53 Decimal parseToDecimalForNumberType( |
| 54 const String&, | 54 const String&, |
| 55 const Decimal& fallbackValue = Decimal::nan()); | 55 const Decimal& fallbackValue = Decimal::nan()); |
| 56 double parseToDoubleForNumberType( | 56 double parseToDoubleForNumberType( |
| 57 const String&, | 57 const String&, |
| 58 double fallbackValue = std::numeric_limits<double>::quiet_NaN()); | 58 double fallbackValue = std::numeric_limits<double>::quiet_NaN()); |
| 59 | 59 |
| 60 // http://www.whatwg.org/specs/web-apps/current-work/#rules-for-parsing-integers | 60 // http://www.whatwg.org/specs/web-apps/current-work/#rules-for-parsing-integers |
| 61 bool parseHTMLInteger(const String&, int&); | 61 CORE_EXPORT bool parseHTMLInteger(const String&, int&); |
| 62 | 62 |
| 63 // http://www.whatwg.org/specs/web-apps/current-work/#rules-for-parsing-non-nega
tive-integers | 63 // http://www.whatwg.org/specs/web-apps/current-work/#rules-for-parsing-non-nega
tive-integers |
| 64 CORE_EXPORT bool parseHTMLNonNegativeInteger(const String&, unsigned&); | 64 CORE_EXPORT bool parseHTMLNonNegativeInteger(const String&, unsigned&); |
| 65 | 65 |
| 66 // https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-
a-list-of-floating-point-numbers | 66 // https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-
a-list-of-floating-point-numbers |
| 67 CORE_EXPORT Vector<double> parseHTMLListOfFloatingPointNumbers(const String&); | 67 CORE_EXPORT Vector<double> parseHTMLListOfFloatingPointNumbers(const String&); |
| 68 | 68 |
| 69 typedef Vector<std::pair<String, String>> HTMLAttributeList; | 69 typedef Vector<std::pair<String, String>> HTMLAttributeList; |
| 70 // The returned encoding might not be valid. | 70 // The returned encoding might not be valid. |
| 71 WTF::TextEncoding encodingFromMetaAttributes(const HTMLAttributeList&); | 71 WTF::TextEncoding encodingFromMetaAttributes(const HTMLAttributeList&); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 inline static String attemptStaticStringCreation(const String str) { | 128 inline static String attemptStaticStringCreation(const String str) { |
| 129 if (!str.is8Bit()) | 129 if (!str.is8Bit()) |
| 130 return attemptStaticStringCreation(str.characters16(), str.length(), | 130 return attemptStaticStringCreation(str.characters16(), str.length(), |
| 131 Force16Bit); | 131 Force16Bit); |
| 132 return attemptStaticStringCreation(str.characters8(), str.length()); | 132 return attemptStaticStringCreation(str.characters8(), str.length()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace blink | 135 } // namespace blink |
| 136 | 136 |
| 137 #endif // HTMLParserIdioms_h | 137 #endif // HTMLParserIdioms_h |
| OLD | NEW |