Chromium Code Reviews| Index: Source/core/css/CSSFontFaceSrcValue.cpp |
| diff --git a/Source/core/css/CSSFontFaceSrcValue.cpp b/Source/core/css/CSSFontFaceSrcValue.cpp |
| index bc03ece0ad5e439a5d6f34519a5cce3c5df0aa7a..7fc20c69d9655c3399a1be915bfe6c87eee46794 100644 |
| --- a/Source/core/css/CSSFontFaceSrcValue.cpp |
| +++ b/Source/core/css/CSSFontFaceSrcValue.cpp |
| @@ -43,17 +43,10 @@ bool CSSFontFaceSrcValue::isSupportedFormat() const |
| { |
| // Normally we would just check the format, but in order to avoid conflicts with the old WinIE style of font-face, |
| // we will also check to see if the URL ends with .eot. If so, we'll go ahead and assume that we shouldn't load it. |
| - if (m_format.isEmpty()) { |
| - // Check for .eot. |
| - if (!m_resource.startsWith("data:", false) && m_resource.endsWith(".eot", false)) |
| - return false; |
| - return true; |
| - } |
| - |
| - if (FontCustomPlatformData::supportsFormat(m_format)) |
| - return true; |
| + if (m_format.isEmpty()) |
| + return !(!m_resource.startsWith("data:", false) && m_resource.endsWith(".eot", false)); // Check for .eot. |
|
Timothy Loh
2014/10/31 05:53:31
How about:
return m_resource.startsWith("data:", f
h.joshi
2014/10/31 08:58:04
Done.
Timothy Loh
2014/11/03 17:15:42
You didn't change the && to || here.
|
| - return false; |
| + return FontCustomPlatformData::supportsFormat(m_format); |
| } |
| String CSSFontFaceSrcValue::customCSSText() const |
| @@ -75,9 +68,7 @@ String CSSFontFaceSrcValue::customCSSText() const |
| bool CSSFontFaceSrcValue::hasFailedOrCanceledSubresources() const |
| { |
| - if (!m_fetched) |
| - return false; |
| - return m_fetched->loadFailedOrCanceled(); |
| + return m_fetched && m_fetched->loadFailedOrCanceled(); |
| } |
| bool CSSFontFaceSrcValue::shouldSetCrossOriginAccessControl(const KURL& resource, SecurityOrigin* securityOrigin) |