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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 HTMLImportChild* HTMLImportsController::load(HTMLImport* parent, HTMLImportChild
Client* client, FetchRequest request) | 79 HTMLImportChild* HTMLImportsController::load(HTMLImport* parent, HTMLImportChild
Client* client, FetchRequest request) |
80 { | 80 { |
81 ASSERT(!request.url().isEmpty() && request.url().isValid()); | 81 ASSERT(!request.url().isEmpty() && request.url().isValid()); |
82 | 82 |
83 if (findLinkFor(request.url())) { | 83 if (findLinkFor(request.url())) { |
84 HTMLImportChild* child = createChild(request.url(), parent, client); | 84 HTMLImportChild* child = createChild(request.url(), parent, client); |
85 child->wasAlreadyLoaded(); | 85 child->wasAlreadyLoaded(); |
86 return child; | 86 return child; |
87 } | 87 } |
88 | 88 |
89 request.setCrossOriginAccessControl(securityOrigin(), DoNotAllowStoredCreden
tials); | 89 bool sameOriginRequest = securityOrigin()->canRequest(request.url()); |
| 90 request.setCrossOriginAccessControl( |
| 91 securityOrigin(), sameOriginRequest ? AllowStoredCredentials : DoNotAllo
wStoredCredentials, |
| 92 ClientDidNotRequestCredentials); |
90 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); | 93 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); |
91 if (!resource) | 94 if (!resource) |
92 return 0; | 95 return 0; |
93 | 96 |
94 HTMLImportChild* child = createChild(request.url(), parent, client); | 97 HTMLImportChild* child = createChild(request.url(), parent, client); |
95 // We set resource after the import tree is built since | 98 // We set resource after the import tree is built since |
96 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. | 99 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. |
97 child->startLoading(resource); | 100 child->startLoading(resource); |
98 | 101 |
99 return child; | 102 return child; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 162 |
160 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) | 163 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) |
161 { | 164 { |
162 do { | 165 do { |
163 m_recalcTimer.stop(); | 166 m_recalcTimer.stop(); |
164 HTMLImport::recalcTreeState(this); | 167 HTMLImport::recalcTreeState(this); |
165 } while (m_recalcTimer.isActive()); | 168 } while (m_recalcTimer.isActive()); |
166 } | 169 } |
167 | 170 |
168 } // namespace WebCore | 171 } // namespace WebCore |
OLD | NEW |