| 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 13 matching lines...) Expand all Loading... |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/html/parser/XSSAuditor.h" | 28 #include "core/html/parser/XSSAuditor.h" |
| 29 | 29 |
| 30 #include "HTMLNames.h" | 30 #include "HTMLNames.h" |
| 31 #include "SVGNames.h" | 31 #include "SVGNames.h" |
| 32 #include "XLinkNames.h" | 32 #include "XLinkNames.h" |
| 33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/html/FormDataList.h" | |
| 35 #include "core/html/HTMLParamElement.h" | 34 #include "core/html/HTMLParamElement.h" |
| 36 #include "core/html/parser/HTMLDocumentParser.h" | 35 #include "core/html/parser/HTMLDocumentParser.h" |
| 37 #include "core/html/parser/HTMLParserIdioms.h" | 36 #include "core/html/parser/HTMLParserIdioms.h" |
| 38 #include "core/html/parser/HTMLTokenizer.h" | |
| 39 #include "core/html/parser/XSSAuditorDelegate.h" | 37 #include "core/html/parser/XSSAuditorDelegate.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | |
| 41 #include "core/loader/DocumentLoader.h" | 38 #include "core/loader/DocumentLoader.h" |
| 42 #include "core/loader/FrameLoaderClient.h" | |
| 43 #include "core/loader/PingLoader.h" | |
| 44 #include "core/loader/TextResourceDecoder.h" | 39 #include "core/loader/TextResourceDecoder.h" |
| 45 #include "core/page/Console.h" | |
| 46 #include "core/page/ContentSecurityPolicy.h" | 40 #include "core/page/ContentSecurityPolicy.h" |
| 47 #include "core/page/DOMWindow.h" | |
| 48 #include "core/page/Frame.h" | 41 #include "core/page/Frame.h" |
| 49 #include "core/page/Settings.h" | 42 #include "core/page/Settings.h" |
| 50 #include "core/platform/JSONValues.h" | 43 #include "core/platform/JSONValues.h" |
| 51 #include "core/platform/network/FormData.h" | 44 #include "core/platform/network/FormData.h" |
| 52 #include "core/platform/text/DecodeEscapeSequences.h" | 45 #include "core/platform/text/DecodeEscapeSequences.h" |
| 53 #include "weborigin/KURL.h" | 46 #include "weborigin/KURL.h" |
| 54 #include "weborigin/SecurityOrigin.h" | |
| 55 #include "wtf/Functional.h" | |
| 56 #include "wtf/MainThread.h" | 47 #include "wtf/MainThread.h" |
| 57 #include "wtf/text/CString.h" | |
| 58 #include "wtf/text/TextEncoding.h" | 48 #include "wtf/text/TextEncoding.h" |
| 59 | 49 |
| 60 namespace WebCore { | 50 namespace WebCore { |
| 61 | 51 |
| 62 using namespace HTMLNames; | 52 using namespace HTMLNames; |
| 63 | 53 |
| 64 static bool isNonCanonicalCharacter(UChar c) | 54 static bool isNonCanonicalCharacter(UChar c) |
| 65 { | 55 { |
| 66 // We remove all non-ASCII characters, including non-printable ASCII charact
ers. | 56 // We remove all non-ASCII characters, including non-printable ASCII charact
ers. |
| 67 // | 57 // |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 719 |
| 730 bool XSSAuditor::isSafeToSendToAnotherThread() const | 720 bool XSSAuditor::isSafeToSendToAnotherThread() const |
| 731 { | 721 { |
| 732 return m_documentURL.isSafeToSendToAnotherThread() | 722 return m_documentURL.isSafeToSendToAnotherThread() |
| 733 && m_decodedURL.isSafeToSendToAnotherThread() | 723 && m_decodedURL.isSafeToSendToAnotherThread() |
| 734 && m_decodedHTTPBody.isSafeToSendToAnotherThread() | 724 && m_decodedHTTPBody.isSafeToSendToAnotherThread() |
| 735 && m_cachedDecodedSnippet.isSafeToSendToAnotherThread(); | 725 && m_cachedDecodedSnippet.isSafeToSendToAnotherThread(); |
| 736 } | 726 } |
| 737 | 727 |
| 738 } // namespace WebCore | 728 } // namespace WebCore |
| OLD | NEW |