OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the XSL implementation. | 2 * This file is part of the XSL implementation. |
3 * | 3 * |
4 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Check for a cycle in our import chain. If we encounter a stylesheet in | 93 // Check for a cycle in our import chain. If we encounter a stylesheet in |
94 // our parent chain with the same URL, then just bail. | 94 // our parent chain with the same URL, then just bail. |
95 for (XSLStyleSheet* parentSheet = parentStyleSheet(); parentSheet; parentShe
et = parentSheet->parentStyleSheet()) { | 95 for (XSLStyleSheet* parentSheet = parentStyleSheet(); parentSheet; parentShe
et = parentSheet->parentStyleSheet()) { |
96 if (absHref == parentSheet->baseURL().string()) | 96 if (absHref == parentSheet->baseURL().string()) |
97 return; | 97 return; |
98 } | 98 } |
99 | 99 |
100 ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptions()
); | 100 ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptions()
); |
101 FetchRequest request(ResourceRequest(ownerDocument->completeURL(absHref)), F
etchInitiatorTypeNames::xml, fetchOptions); | 101 FetchRequest request(ResourceRequest(ownerDocument->completeURL(absHref)), F
etchInitiatorTypeNames::xml, fetchOptions); |
102 request.setOriginRestriction(FetchRequest::RestrictToSameOrigin); | 102 request.setOriginRestriction(FetchRequest::RestrictToSameOrigin); |
103 ResourcePtr<XSLStyleSheetResource> resource = XSLStyleSheetResource::fetchSy
nchronously(request, ownerDocument->fetcher()); | 103 RefPtrWillBeRawPtr<XSLStyleSheetResource> resource = XSLStyleSheetResource::
fetchSynchronously(request, ownerDocument->fetcher()); |
104 if (!resource || !resource->sheet()) | 104 if (!resource || !resource->sheet()) |
105 return; | 105 return; |
106 | 106 |
107 ASSERT(!m_styleSheet); | 107 ASSERT(!m_styleSheet); |
108 setXSLStyleSheet(absHref, resource->response().url(), resource->sheet()); | 108 setXSLStyleSheet(absHref, resource->response().url(), resource->sheet()); |
109 } | 109 } |
110 | 110 |
111 DEFINE_TRACE(XSLImportRule) | 111 DEFINE_TRACE(XSLImportRule) |
112 { | 112 { |
113 visitor->trace(m_parentStyleSheet); | 113 visitor->trace(m_parentStyleSheet); |
114 visitor->trace(m_styleSheet); | 114 visitor->trace(m_styleSheet); |
115 } | 115 } |
116 | 116 |
117 } // namespace blink | 117 } // namespace blink |
OLD | NEW |