Commit a2712bd9 authored by h.joshi@samsung.com's avatar h.joshi@samsung.com

Code readability patch, removed extra returned statements from code

Layout test not needed.

Review URL: https://codereview.chromium.org/691493005

git-svn-id: svn://svn.chromium.org/blink/trunk@184855 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 836f22e6
...@@ -43,17 +43,10 @@ bool CSSFontFaceSrcValue::isSupportedFormat() const ...@@ -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, // 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. // 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()) { if (m_format.isEmpty())
// Check for .eot. return m_resource.startsWith("data:", false) || !m_resource.endsWith(".eot", false);
if (!m_resource.startsWith("data:", false) && m_resource.endsWith(".eot", false))
return false;
return true;
}
if (FontCustomPlatformData::supportsFormat(m_format))
return true;
return false; return FontCustomPlatformData::supportsFormat(m_format);
} }
String CSSFontFaceSrcValue::customCSSText() const String CSSFontFaceSrcValue::customCSSText() const
...@@ -75,9 +68,7 @@ String CSSFontFaceSrcValue::customCSSText() const ...@@ -75,9 +68,7 @@ String CSSFontFaceSrcValue::customCSSText() const
bool CSSFontFaceSrcValue::hasFailedOrCanceledSubresources() const bool CSSFontFaceSrcValue::hasFailedOrCanceledSubresources() const
{ {
if (!m_fetched) return m_fetched && m_fetched->loadFailedOrCanceled();
return false;
return m_fetched->loadFailedOrCanceled();
} }
bool CSSFontFaceSrcValue::shouldSetCrossOriginAccessControl(const KURL& resource, SecurityOrigin* securityOrigin) bool CSSFontFaceSrcValue::shouldSetCrossOriginAccessControl(const KURL& resource, SecurityOrigin* securityOrigin)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment