| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 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 * | 7 * |
| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Returns true if drawing an image from this URL taints a canvas from | 116 // Returns true if drawing an image from this URL taints a canvas from |
| 117 // this security origin. For example, call this function before | 117 // this security origin. For example, call this function before |
| 118 // drawing an image onto an HTML canvas element with the drawImage API. | 118 // drawing an image onto an HTML canvas element with the drawImage API. |
| 119 bool taintsCanvas(const KURL&) const; | 119 bool taintsCanvas(const KURL&) const; |
| 120 | 120 |
| 121 // Returns true if |document| can display content from the given URL (e.g., | 121 // Returns true if |document| can display content from the given URL (e.g., |
| 122 // in an iframe or as an image). For example, web sites generally cannot | 122 // in an iframe or as an image). For example, web sites generally cannot |
| 123 // display content from the user's files system. | 123 // display content from the user's files system. |
| 124 bool canDisplay(const KURL&) const; | 124 bool canDisplay(const KURL&) const; |
| 125 | 125 |
| 126 // Returns true if the two URLs are equivalent and can be used as a URL for |
| 127 // |document|. It is used for history.pushState and history.replaceState. |
| 128 bool areSamePageUrls(const KURL&, const KURL&) const; |
| 129 |
| 126 // Returns true if the origin loads resources either from the local | 130 // Returns true if the origin loads resources either from the local |
| 127 // machine or over the network from a | 131 // machine or over the network from a |
| 128 // cryptographically-authenticated origin, as described in | 132 // cryptographically-authenticated origin, as described in |
| 129 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#is-origin-trustwo
rthy. | 133 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#is-origin-trustwo
rthy. |
| 130 bool isPotentiallyTrustworthy(String& errorMessage) const; | 134 bool isPotentiallyTrustworthy(String& errorMessage) const; |
| 131 | 135 |
| 132 // Returns true if this SecurityOrigin can load local resources, such | 136 // Returns true if this SecurityOrigin can load local resources, such |
| 133 // as images, iframes, and style sheets, and can link to local URLs. | 137 // as images, iframes, and style sheets, and can link to local URLs. |
| 134 // For example, call this function before creating an iframe to a | 138 // For example, call this function before creating an iframe to a |
| 135 // file:// URL. | 139 // file:// URL. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 bool m_universalAccess; | 266 bool m_universalAccess; |
| 263 bool m_domainWasSetInDOM; | 267 bool m_domainWasSetInDOM; |
| 264 bool m_canLoadLocalResources; | 268 bool m_canLoadLocalResources; |
| 265 bool m_blockLocalAccessFromLocalOrigin; | 269 bool m_blockLocalAccessFromLocalOrigin; |
| 266 bool m_needsDatabaseIdentifierQuirkForFiles; | 270 bool m_needsDatabaseIdentifierQuirkForFiles; |
| 267 }; | 271 }; |
| 268 | 272 |
| 269 } // namespace blink | 273 } // namespace blink |
| 270 | 274 |
| 271 #endif // SecurityOrigin_h | 275 #endif // SecurityOrigin_h |
| OLD | NEW |