| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. | 2  * Copyright (C) 2007, 2010 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 105   } else { | 105   } else { | 
| 106     // FIXME: CSSFontFaceSrcValue::fetch is invoked when @font-face rule | 106     // FIXME: CSSFontFaceSrcValue::fetch is invoked when @font-face rule | 
| 107     // is processed by StyleResolver / StyleEngine. | 107     // is processed by StyleResolver / StyleEngine. | 
| 108     restoreCachedResourceIfNeeded(document); | 108     restoreCachedResourceIfNeeded(document); | 
| 109   } | 109   } | 
| 110   return m_fetched->resource(); | 110   return m_fetched->resource(); | 
| 111 } | 111 } | 
| 112 | 112 | 
| 113 void CSSFontFaceSrcValue::restoreCachedResourceIfNeeded( | 113 void CSSFontFaceSrcValue::restoreCachedResourceIfNeeded( | 
| 114     Document* document) const { | 114     Document* document) const { | 
| 115   ASSERT(m_fetched); | 115   DCHECK(m_fetched); | 
| 116   ASSERT(document && document->fetcher()); | 116   DCHECK(document); | 
|  | 117   DCHECK(document->fetcher()); | 
| 117 | 118 | 
| 118   const String resourceURL = document->completeURL(m_absoluteResource); | 119   const String resourceURL = document->completeURL(m_absoluteResource); | 
| 119   DCHECK_EQ(m_shouldCheckContentSecurityPolicy, | 120   DCHECK_EQ(m_shouldCheckContentSecurityPolicy, | 
| 120             m_fetched->resource()->options().contentSecurityPolicyOption); | 121             m_fetched->resource()->options().contentSecurityPolicyOption); | 
| 121   document->fetcher()->emulateLoadStartedForInspector( | 122   document->fetcher()->emulateLoadStartedForInspector( | 
| 122       m_fetched->resource(), KURL(ParsedURLString, resourceURL), | 123       m_fetched->resource(), KURL(ParsedURLString, resourceURL), | 
| 123       WebURLRequest::RequestContextFont, FetchInitiatorTypeNames::css); | 124       WebURLRequest::RequestContextFont, FetchInitiatorTypeNames::css); | 
| 124 } | 125 } | 
| 125 | 126 | 
| 126 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const { | 127 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const { | 
| 127   return m_isLocal == other.m_isLocal && m_format == other.m_format && | 128   return m_isLocal == other.m_isLocal && m_format == other.m_format && | 
| 128          m_specifiedResource == other.m_specifiedResource && | 129          m_specifiedResource == other.m_specifiedResource && | 
| 129          m_absoluteResource == other.m_absoluteResource; | 130          m_absoluteResource == other.m_absoluteResource; | 
| 130 } | 131 } | 
| 131 | 132 | 
| 132 }  // namespace blink | 133 }  // namespace blink | 
| OLD | NEW | 
|---|