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 11 matching lines...) Expand all Loading... |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #include "config.h" | 25 #include "config.h" |
26 #include "core/html/parser/HTMLParserIdioms.h" | 26 #include "core/html/parser/HTMLParserIdioms.h" |
27 | 27 |
28 #include <limits> | 28 #include <limits> |
29 #include "core/dom/QualifiedName.h" | 29 #include "core/dom/QualifiedName.h" |
30 #include "core/html/parser/HTMLIdentifier.h" | 30 #include "core/html/parser/HTMLIdentifier.h" |
31 #include "core/platform/Decimal.h" | 31 #include "core/platform/Decimal.h" |
32 #include <wtf/MathExtras.h> | 32 #include "wtf/MathExtras.h" |
33 #include <wtf/text/AtomicString.h> | 33 #include "wtf/text/AtomicString.h" |
34 #include <wtf/text/StringBuilder.h> | 34 #include "wtf/text/StringBuilder.h" |
35 #include <wtf/text/StringHash.h> | |
36 | 35 |
37 namespace WebCore { | 36 namespace WebCore { |
38 | 37 |
39 template <typename CharType> | 38 template <typename CharType> |
40 static String stripLeadingAndTrailingHTMLSpaces(String string, CharType characte
rs, unsigned length) | 39 static String stripLeadingAndTrailingHTMLSpaces(String string, CharType characte
rs, unsigned length) |
41 { | 40 { |
42 unsigned numLeadingSpaces = 0; | 41 unsigned numLeadingSpaces = 0; |
43 unsigned numTrailingSpaces = 0; | 42 unsigned numTrailingSpaces = 0; |
44 | 43 |
45 for (; numLeadingSpaces < length; ++numLeadingSpaces) { | 44 for (; numLeadingSpaces < length; ++numLeadingSpaces) { |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 { | 290 { |
292 return threadSafeEqual(a.localName().impl(), b.localName().impl()); | 291 return threadSafeEqual(a.localName().impl(), b.localName().impl()); |
293 } | 292 } |
294 | 293 |
295 bool threadSafeMatch(const HTMLIdentifier& localName, const QualifiedName& qName
) | 294 bool threadSafeMatch(const HTMLIdentifier& localName, const QualifiedName& qName
) |
296 { | 295 { |
297 return threadSafeEqual(localName.asStringImpl(), qName.localName().impl()); | 296 return threadSafeEqual(localName.asStringImpl(), qName.localName().impl()); |
298 } | 297 } |
299 | 298 |
300 } | 299 } |
OLD | NEW |