Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp

Issue 2508033004: Reduce unnecessary usage of TextCaseSensitivity::TextCaseInsensitive. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 #include "platform/weborigin/SecurityPolicy.h" 41 #include "platform/weborigin/SecurityPolicy.h"
42 #include "wtf/text/StringBuilder.h" 42 #include "wtf/text/StringBuilder.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 bool CSSFontFaceSrcValue::isSupportedFormat() const { 46 bool CSSFontFaceSrcValue::isSupportedFormat() const {
47 // Normally we would just check the format, but in order to avoid conflicts 47 // Normally we would just check the format, but in order to avoid conflicts
48 // with the old WinIE style of font-face, we will also check to see if the URL 48 // with the old WinIE style of font-face, we will also check to see if the URL
49 // ends with .eot. If so, we'll go ahead and assume that we shouldn't load 49 // ends with .eot. If so, we'll go ahead and assume that we shouldn't load
50 // it. 50 // it.
51 if (m_format.isEmpty()) 51 if (m_format.isEmpty()) {
52 return m_absoluteResource.startsWith("data:", TextCaseInsensitive) || 52 return m_absoluteResource.startsWith("data:", TextCaseASCIIInsensitive) ||
53 !m_absoluteResource.endsWith(".eot", TextCaseInsensitive); 53 !m_absoluteResource.endsWith(".eot", TextCaseASCIIInsensitive);
54 }
54 55
55 return FontCustomPlatformData::supportsFormat(m_format); 56 return FontCustomPlatformData::supportsFormat(m_format);
56 } 57 }
57 58
58 String CSSFontFaceSrcValue::customCSSText() const { 59 String CSSFontFaceSrcValue::customCSSText() const {
59 StringBuilder result; 60 StringBuilder result;
60 if (isLocal()) { 61 if (isLocal()) {
61 result.append("local("); 62 result.append("local(");
62 result.append(serializeString(m_absoluteResource)); 63 result.append(serializeString(m_absoluteResource));
63 result.append(')'); 64 result.append(')');
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ResourceFetcher::ResourceLoadingFromCache); 135 ResourceFetcher::ResourceLoadingFromCache);
135 } 136 }
136 137
137 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const { 138 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const {
138 return m_isLocal == other.m_isLocal && m_format == other.m_format && 139 return m_isLocal == other.m_isLocal && m_format == other.m_format &&
139 m_specifiedResource == other.m_specifiedResource && 140 m_specifiedResource == other.m_specifiedResource &&
140 m_absoluteResource == other.m_absoluteResource; 141 m_absoluteResource == other.m_absoluteResource;
141 } 142 }
142 143
143 } // namespace blink 144 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptRegexp.cpp ('k') | third_party/WebKit/Source/core/dom/DOMImplementation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698