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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 m_master = 0; | 66 m_master = 0; |
67 } | 67 } |
68 | 68 |
69 PassRefPtr<HTMLImportLoader> HTMLImportsController::createLoader(HTMLImport* par
ent, FetchRequest request) | 69 PassRefPtr<HTMLImportLoader> HTMLImportsController::createLoader(HTMLImport* par
ent, FetchRequest request) |
70 { | 70 { |
71 ASSERT(!request.url().isEmpty() && request.url().isValid()); | 71 ASSERT(!request.url().isEmpty() && request.url().isValid()); |
72 | 72 |
73 if (RefPtr<HTMLImportLoader> found = findLinkFor(request.url())) | 73 if (RefPtr<HTMLImportLoader> found = findLinkFor(request.url())) |
74 return found.release(); | 74 return found.release(); |
75 | 75 |
76 request.setPotentiallyCrossOriginEnabled(securityOrigin(), DoNotAllowStoredC
redentials); | 76 request.setCrossOriginAccessControl(securityOrigin(), DoNotAllowStoredCreden
tials); |
77 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); | 77 ResourcePtr<RawResource> resource = parent->document()->fetcher()->fetchImpo
rt(request); |
78 if (!resource) | 78 if (!resource) |
79 return 0; | 79 return 0; |
80 | 80 |
81 RefPtr<HTMLImportLoader> loader = adoptRef(new HTMLImportLoader(request.url(
))); | 81 RefPtr<HTMLImportLoader> loader = adoptRef(new HTMLImportLoader(request.url(
))); |
82 parent->appendChild(loader.get()); | 82 parent->appendChild(loader.get()); |
83 m_imports.append(loader); | 83 m_imports.append(loader); |
84 | 84 |
85 // We set resource after the import tree is built since | 85 // We set resource after the import tree is built since |
86 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. | 86 // Resource::addClient() immediately calls back to feed the bytes when the r
esource is cached. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 void HTMLImportsController::unblockTimerFired(Timer<HTMLImportsController>*) | 153 void HTMLImportsController::unblockTimerFired(Timer<HTMLImportsController>*) |
154 { | 154 { |
155 do { | 155 do { |
156 m_unblockTimer.stop(); | 156 m_unblockTimer.stop(); |
157 HTMLImport::unblock(this); | 157 HTMLImport::unblock(this); |
158 } while (m_unblockTimer.isActive()); | 158 } while (m_unblockTimer.isActive()); |
159 } | 159 } |
160 | 160 |
161 } // namespace WebCore | 161 } // namespace WebCore |
OLD | NEW |