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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 if (m_format.isEmpty()) | 49 if (m_format.isEmpty()) |
50 return m_absoluteResource.startsWith("data:", TextCaseInsensitive) || !m
_absoluteResource.endsWith(".eot", TextCaseInsensitive); | 50 return m_absoluteResource.startsWith("data:", TextCaseInsensitive) || !m
_absoluteResource.endsWith(".eot", TextCaseInsensitive); |
51 | 51 |
52 return FontCustomPlatformData::supportsFormat(m_format); | 52 return FontCustomPlatformData::supportsFormat(m_format); |
53 } | 53 } |
54 | 54 |
55 String CSSFontFaceSrcValue::customCSSText() const | 55 String CSSFontFaceSrcValue::customCSSText() const |
56 { | 56 { |
57 StringBuilder result; | 57 StringBuilder result; |
58 if (isLocal()) { | 58 if (isLocal()) { |
59 result.appendLiteral("local("); | 59 result.append("local("); |
60 result.append(serializeString(m_absoluteResource)); | 60 result.append(serializeString(m_absoluteResource)); |
61 result.appendLiteral(")"); | 61 result.append(")"); |
62 } else { | 62 } else { |
63 result.append(serializeURI(m_specifiedResource)); | 63 result.append(serializeURI(m_specifiedResource)); |
64 } | 64 } |
65 if (!m_format.isEmpty()) { | 65 if (!m_format.isEmpty()) { |
66 result.appendLiteral(" format("); | 66 result.append(" format("); |
67 result.append(serializeString(m_format)); | 67 result.append(serializeString(m_format)); |
68 result.appendLiteral(")"); | 68 result.append(")"); |
69 } | 69 } |
70 return result.toString(); | 70 return result.toString(); |
71 } | 71 } |
72 | 72 |
73 bool CSSFontFaceSrcValue::hasFailedOrCanceledSubresources() const | 73 bool CSSFontFaceSrcValue::hasFailedOrCanceledSubresources() const |
74 { | 74 { |
75 return m_fetched && m_fetched->resource()->loadFailedOrCanceled(); | 75 return m_fetched && m_fetched->resource()->loadFailedOrCanceled(); |
76 } | 76 } |
77 | 77 |
78 static void setCrossOriginAccessControl(FetchRequest& request, SecurityOrigin* s
ecurityOrigin) | 78 static void setCrossOriginAccessControl(FetchRequest& request, SecurityOrigin* s
ecurityOrigin) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 m_fetched->resource()->lastResourceRequest().url(), MixedContentChecker:
:SendReport); | 120 m_fetched->resource()->lastResourceRequest().url(), MixedContentChecker:
:SendReport); |
121 document->fetcher()->requestLoadStarted(m_fetched->resource(), request, Reso
urceFetcher::ResourceLoadingFromCache); | 121 document->fetcher()->requestLoadStarted(m_fetched->resource(), request, Reso
urceFetcher::ResourceLoadingFromCache); |
122 } | 122 } |
123 | 123 |
124 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const | 124 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const |
125 { | 125 { |
126 return m_isLocal == other.m_isLocal && m_format == other.m_format && m_speci
fiedResource == other.m_specifiedResource && m_absoluteResource == other.m_absol
uteResource; | 126 return m_isLocal == other.m_isLocal && m_format == other.m_format && m_speci
fiedResource == other.m_specifiedResource && m_absoluteResource == other.m_absol
uteResource; |
127 } | 127 } |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
OLD | NEW |