| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 static bool hasName(const HTMLToken& token, const QualifiedName& name) | 134 static bool hasName(const HTMLToken& token, const QualifiedName& name) |
| 135 { | 135 { |
| 136 return threadSafeMatch(token.name(), name); | 136 return threadSafeMatch(token.name(), name); |
| 137 } | 137 } |
| 138 | 138 |
| 139 static bool findAttributeWithName(const HTMLToken& token, const QualifiedName& n
ame, size_t& indexOfMatchingAttribute) | 139 static bool findAttributeWithName(const HTMLToken& token, const QualifiedName& n
ame, size_t& indexOfMatchingAttribute) |
| 140 { | 140 { |
| 141 // Notice that we're careful not to ref the StringImpl here because we might
be on a background thread. | 141 // Notice that we're careful not to ref the StringImpl here because we might
be on a background thread. |
| 142 const String& attrName = name.namespaceURI() == XLinkNames::xlinkNamespaceUR
I ? "xlink:" + name.localName().string() : name.localName().string(); | 142 const String& attrName = name.namespaceURI() == XLinkNames::xlinkNamespaceUR
I ? "xlink:" + name.localName().getString() : name.localName().getString(); |
| 143 | 143 |
| 144 for (size_t i = 0; i < token.attributes().size(); ++i) { | 144 for (size_t i = 0; i < token.attributes().size(); ++i) { |
| 145 if (equalIgnoringNullity(token.attributes().at(i).nameAsVector(), attrNa
me)) { | 145 if (equalIgnoringNullity(token.attributes().at(i).nameAsVector(), attrNa
me)) { |
| 146 indexOfMatchingAttribute = i; | 146 indexOfMatchingAttribute = i; |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 return false; | 150 return false; |
| 151 } | 151 } |
| 152 | 152 |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 823 |
| 824 bool XSSAuditor::isSafeToSendToAnotherThread() const | 824 bool XSSAuditor::isSafeToSendToAnotherThread() const |
| 825 { | 825 { |
| 826 return m_documentURL.isSafeToSendToAnotherThread() | 826 return m_documentURL.isSafeToSendToAnotherThread() |
| 827 && m_decodedURL.isSafeToSendToAnotherThread() | 827 && m_decodedURL.isSafeToSendToAnotherThread() |
| 828 && m_decodedHTTPBody.isSafeToSendToAnotherThread() | 828 && m_decodedHTTPBody.isSafeToSendToAnotherThread() |
| 829 && m_httpBodyAsString.isSafeToSendToAnotherThread(); | 829 && m_httpBodyAsString.isSafeToSendToAnotherThread(); |
| 830 } | 830 } |
| 831 | 831 |
| 832 } // namespace blink | 832 } // namespace blink |
| OLD | NEW |