OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 HTMLImportChild* HTMLImportsController::load(HTMLImport* parent, HTMLImportChild
Client* client, FetchRequest request) | 80 HTMLImportChild* HTMLImportsController::load(HTMLImport* parent, HTMLImportChild
Client* client, FetchRequest request) |
81 { | 81 { |
82 ASSERT(!request.url().isEmpty() && request.url().isValid()); | 82 ASSERT(!request.url().isEmpty() && request.url().isValid()); |
83 | 83 |
84 if (findLinkFor(request.url())) { | 84 if (findLinkFor(request.url())) { |
85 HTMLImportChild* child = createChild(request.url(), parent, client); | 85 HTMLImportChild* child = createChild(request.url(), parent, client); |
86 child->wasAlreadyLoaded(); | 86 child->wasAlreadyLoaded(); |
87 return child; | 87 return child; |
88 } | 88 } |
89 | 89 |
90 bool sameOriginRequest = securityOrigin()->canRequest(request.url()); | 90 request.setCrossOriginAccessControl(securityOrigin(), DoNotAllowStoredCreden
tials); |
91 request.setCrossOriginAccessControl( | |
92 securityOrigin(), sameOriginRequest ? AllowStoredCredentials : DoNotAllo
wStoredCredentials, | |
93 ClientDidNotRequestCredentials); | |
94 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); | 91 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); |
95 if (!resource) | 92 if (!resource) |
96 return 0; | 93 return 0; |
97 | 94 |
98 HTMLImportChild* child = createChild(request.url(), parent, client); | 95 HTMLImportChild* child = createChild(request.url(), parent, client); |
99 // We set resource after the import tree is built since | 96 // We set resource after the import tree is built since |
100 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. | 97 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. |
101 child->startLoading(resource); | 98 child->startLoading(resource); |
102 | 99 |
103 return child; | 100 return child; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 170 |
174 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) | 171 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) |
175 { | 172 { |
176 do { | 173 do { |
177 m_recalcTimer.stop(); | 174 m_recalcTimer.stop(); |
178 HTMLImport::recalcTreeState(this); | 175 HTMLImport::recalcTreeState(this); |
179 } while (m_recalcTimer.isActive()); | 176 } while (m_recalcTimer.isActive()); |
180 } | 177 } |
181 | 178 |
182 } // namespace WebCore | 179 } // namespace WebCore |
OLD | NEW |