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 request.setCrossOriginAccessControl(securityOrigin(), DoNotAllowStoredCreden
tials); | 90 bool sameOriginRequest = securityOrigin()->canRequest(request.url()); |
| 91 request.setCrossOriginAccessControl( |
| 92 securityOrigin(), sameOriginRequest ? AllowStoredCredentials : DoNotAllo
wStoredCredentials, |
| 93 ClientDidNotRequestCredentials); |
91 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); | 94 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); |
92 if (!resource) | 95 if (!resource) |
93 return 0; | 96 return 0; |
94 | 97 |
95 HTMLImportChild* child = createChild(request.url(), parent, client); | 98 HTMLImportChild* child = createChild(request.url(), parent, client); |
96 // We set resource after the import tree is built since | 99 // We set resource after the import tree is built since |
97 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. | 100 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. |
98 child->startLoading(resource); | 101 child->startLoading(resource); |
99 | 102 |
100 return child; | 103 return child; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 173 |
171 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) | 174 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) |
172 { | 175 { |
173 do { | 176 do { |
174 m_recalcTimer.stop(); | 177 m_recalcTimer.stop(); |
175 HTMLImport::recalcTreeState(this); | 178 HTMLImport::recalcTreeState(this); |
176 } while (m_recalcTimer.isActive()); | 179 } while (m_recalcTimer.isActive()); |
177 } | 180 } |
178 | 181 |
179 } // namespace WebCore | 182 } // namespace WebCore |
OLD | NEW |