OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adam Barth. All Rights Reserved. | 2 * Copyright (C) 2011 Adam Barth. All Rights Reserved. |
3 * Copyright (C) 2011 Daniel Bates (dbates@intudata.com). | 3 * Copyright (C) 2011 Daniel Bates (dbates@intudata.com). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "FormDataList.h" | 35 #include "FormDataList.h" |
36 #include "Frame.h" | 36 #include "Frame.h" |
37 #include "FrameLoaderClient.h" | 37 #include "FrameLoaderClient.h" |
38 #include "HTMLDocumentParser.h" | 38 #include "HTMLDocumentParser.h" |
39 #include "HTMLNames.h" | 39 #include "HTMLNames.h" |
40 #include "HTMLParamElement.h" | 40 #include "HTMLParamElement.h" |
41 #include "HTMLParserIdioms.h" | 41 #include "HTMLParserIdioms.h" |
42 #include "HTMLTokenizer.h" | 42 #include "HTMLTokenizer.h" |
43 #include "InspectorInstrumentation.h" | 43 #include "InspectorInstrumentation.h" |
44 #include "InspectorValues.h" | 44 #include "InspectorValues.h" |
45 #include "KURL.h" | |
46 #include "PingLoader.h" | 45 #include "PingLoader.h" |
47 #include "SecurityOrigin.h" | 46 #include "SecurityOrigin.h" |
48 #include "Settings.h" | 47 #include "Settings.h" |
49 #include "TextResourceDecoder.h" | 48 #include "TextResourceDecoder.h" |
50 #include "XLinkNames.h" | 49 #include "XLinkNames.h" |
51 #include "XSSAuditorDelegate.h" | 50 #include "XSSAuditorDelegate.h" |
| 51 #include "core/platform/KURL.h" |
52 #include "core/platform/network/FormData.h" | 52 #include "core/platform/network/FormData.h" |
53 #include "core/platform/text/DecodeEscapeSequences.h" | 53 #include "core/platform/text/DecodeEscapeSequences.h" |
54 #include "core/platform/text/TextEncoding.h" | 54 #include "core/platform/text/TextEncoding.h" |
55 | 55 |
56 #if ENABLE(SVG) | 56 #if ENABLE(SVG) |
57 #include "SVGNames.h" | 57 #include "SVGNames.h" |
58 #endif | 58 #endif |
59 | 59 |
60 #include <wtf/Functional.h> | 60 #include <wtf/Functional.h> |
61 #include <wtf/MainThread.h> | 61 #include <wtf/MainThread.h> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 static inline String decode16BitUnicodeEscapeSequences(const String& string) | 161 static inline String decode16BitUnicodeEscapeSequences(const String& string) |
162 { | 162 { |
163 // Note, the encoding is ignored since each %u-escape sequence represents a
UTF-16 code unit. | 163 // Note, the encoding is ignored since each %u-escape sequence represents a
UTF-16 code unit. |
164 return decodeEscapeSequences<Unicode16BitEscapeSequence>(string, UTF8Encodin
g()); | 164 return decodeEscapeSequences<Unicode16BitEscapeSequence>(string, UTF8Encodin
g()); |
165 } | 165 } |
166 | 166 |
167 static inline String decodeStandardURLEscapeSequences(const String& string, cons
t TextEncoding& encoding) | 167 static inline String decodeStandardURLEscapeSequences(const String& string, cons
t TextEncoding& encoding) |
168 { | 168 { |
169 // We use decodeEscapeSequences() instead of decodeURLEscapeSequences() (dec
lared in KURL.h) to | 169 // We use decodeEscapeSequences() instead of decodeURLEscapeSequences() (dec
lared in core/platform/KURL.h) to |
170 // avoid platform-specific URL decoding differences (e.g. KURLGoogle). | 170 // avoid platform-specific URL decoding differences (e.g. KURLGoogle). |
171 return decodeEscapeSequences<URLEscapeSequence>(string, encoding); | 171 return decodeEscapeSequences<URLEscapeSequence>(string, encoding); |
172 } | 172 } |
173 | 173 |
174 static String fullyDecodeString(const String& string, const TextEncoding& encodi
ng) | 174 static String fullyDecodeString(const String& string, const TextEncoding& encodi
ng) |
175 { | 175 { |
176 size_t oldWorkingStringLength; | 176 size_t oldWorkingStringLength; |
177 String workingString = string; | 177 String workingString = string; |
178 do { | 178 do { |
179 oldWorkingStringLength = workingString.length(); | 179 oldWorkingStringLength = workingString.length(); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 | 737 |
738 bool XSSAuditor::isSafeToSendToAnotherThread() const | 738 bool XSSAuditor::isSafeToSendToAnotherThread() const |
739 { | 739 { |
740 return m_documentURL.isSafeToSendToAnotherThread() | 740 return m_documentURL.isSafeToSendToAnotherThread() |
741 && m_decodedURL.isSafeToSendToAnotherThread() | 741 && m_decodedURL.isSafeToSendToAnotherThread() |
742 && m_decodedHTTPBody.isSafeToSendToAnotherThread() | 742 && m_decodedHTTPBody.isSafeToSendToAnotherThread() |
743 && m_cachedDecodedSnippet.isSafeToSendToAnotherThread(); | 743 && m_cachedDecodedSnippet.isSafeToSendToAnotherThread(); |
744 } | 744 } |
745 | 745 |
746 } // namespace WebCore | 746 } // namespace WebCore |
OLD | NEW |