| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 const KURL& sourceURL = imageSource->sourceURL(); | 64 const KURL& sourceURL = imageSource->sourceURL(); |
| 65 bool hasURL = (sourceURL.isValid() && !sourceURL.isAboutBlankURL()); | 65 bool hasURL = (sourceURL.isValid() && !sourceURL.isAboutBlankURL()); |
| 66 | 66 |
| 67 if (hasURL) { | 67 if (hasURL) { |
| 68 if (sourceURL.protocolIsData() || m_cleanURLs.contains(sourceURL.getStri
ng())) | 68 if (sourceURL.protocolIsData() || m_cleanURLs.contains(sourceURL.getStri
ng())) |
| 69 return false; | 69 return false; |
| 70 if (m_dirtyURLs.contains(sourceURL.getString())) | 70 if (m_dirtyURLs.contains(sourceURL.getString())) |
| 71 return true; | 71 return true; |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool taintOrigin = imageSource->wouldTaintOrigin(canvas()->securityOrigin())
; | 74 bool taintOrigin = imageSource->wouldTaintOrigin(canvas()->getSecurityOrigin
()); |
| 75 | 75 |
| 76 if (hasURL) { | 76 if (hasURL) { |
| 77 if (taintOrigin) | 77 if (taintOrigin) |
| 78 m_dirtyURLs.add(sourceURL.getString()); | 78 m_dirtyURLs.add(sourceURL.getString()); |
| 79 else | 79 else |
| 80 m_cleanURLs.add(sourceURL.getString()); | 80 m_cleanURLs.add(sourceURL.getString()); |
| 81 } | 81 } |
| 82 return taintOrigin; | 82 return taintOrigin; |
| 83 } | 83 } |
| 84 | 84 |
| 85 DEFINE_TRACE(CanvasRenderingContext) | 85 DEFINE_TRACE(CanvasRenderingContext) |
| 86 { | 86 { |
| 87 visitor->trace(m_canvas); | 87 visitor->trace(m_canvas); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |