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 21 matching lines...) Expand all Loading... |
32 #include "core/dom/Node.h" | 32 #include "core/dom/Node.h" |
33 #include "core/fetch/FetchRequest.h" | 33 #include "core/fetch/FetchRequest.h" |
34 #include "core/fetch/FontResource.h" | 34 #include "core/fetch/FontResource.h" |
35 #include "core/fetch/ResourceFetcher.h" | 35 #include "core/fetch/ResourceFetcher.h" |
36 #include "core/svg/SVGFontFaceElement.h" | 36 #include "core/svg/SVGFontFaceElement.h" |
37 #include "platform/fonts/FontCustomPlatformData.h" | 37 #include "platform/fonts/FontCustomPlatformData.h" |
38 #include "wtf/text/StringBuilder.h" | 38 #include "wtf/text/StringBuilder.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
| 42 void CSSFontFaceSrcValue::traceAfterDispatch(Visitor* visitor) |
| 43 { |
| 44 #if ENABLE(SVG_FONTS) |
| 45 visitor->trace(m_svgFontFaceElement); |
| 46 #endif |
| 47 CSSValue::traceAfterDispatch(visitor); |
| 48 } |
| 49 |
42 #if ENABLE(SVG_FONTS) | 50 #if ENABLE(SVG_FONTS) |
43 bool CSSFontFaceSrcValue::isSVGFontFaceSrc() const | 51 bool CSSFontFaceSrcValue::isSVGFontFaceSrc() const |
44 { | 52 { |
45 return equalIgnoringCase(m_format, "svg"); | 53 return equalIgnoringCase(m_format, "svg"); |
46 } | 54 } |
47 #endif | 55 #endif |
48 | 56 |
49 bool CSSFontFaceSrcValue::isSupportedFormat() const | 57 bool CSSFontFaceSrcValue::isSupportedFormat() const |
50 { | 58 { |
51 // Normally we would just check the format, but in order to avoid conflicts
with the old WinIE style of font-face, | 59 // Normally we would just check the format, but in order to avoid conflicts
with the old WinIE style of font-face, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 FetchRequest request(ResourceRequest(resourceURL), FetchInitiatorTypeNames::
css); | 133 FetchRequest request(ResourceRequest(resourceURL), FetchInitiatorTypeNames::
css); |
126 document->fetcher()->requestLoadStarted(m_fetched.get(), request, ResourceFe
tcher::ResourceLoadingFromCache); | 134 document->fetcher()->requestLoadStarted(m_fetched.get(), request, ResourceFe
tcher::ResourceLoadingFromCache); |
127 } | 135 } |
128 | 136 |
129 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const | 137 bool CSSFontFaceSrcValue::equals(const CSSFontFaceSrcValue& other) const |
130 { | 138 { |
131 return m_isLocal == other.m_isLocal && m_format == other.m_format && m_resou
rce == other.m_resource; | 139 return m_isLocal == other.m_isLocal && m_format == other.m_format && m_resou
rce == other.m_resource; |
132 } | 140 } |
133 | 141 |
134 } | 142 } |
OLD | NEW |