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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 if (m_child) { | 57 if (m_child) { |
58 m_child->clearClient(); | 58 m_child->clearClient(); |
59 m_child = 0; | 59 m_child = 0; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 Document* LinkImport::importedDocument() const | 63 Document* LinkImport::importedDocument() const |
64 { | 64 { |
65 if (!m_child || !m_owner || !m_owner->inDocument()) | 65 if (!m_child || !m_owner || !m_owner->inDocument()) |
66 return 0; | 66 return 0; |
67 return m_child->importedDocument(); | 67 if (m_child->loader()->hasError()) |
| 68 return 0; |
| 69 return m_child->document(); |
68 } | 70 } |
69 | 71 |
70 void LinkImport::process() | 72 void LinkImport::process() |
71 { | 73 { |
72 if (m_child) | 74 if (m_child) |
73 return; | 75 return; |
74 if (!m_owner) | 76 if (!m_owner) |
75 return; | 77 return; |
76 if (!shouldLoadResource()) | 78 if (!shouldLoadResource()) |
77 return; | 79 return; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 { | 127 { |
126 return m_child && m_child->isDone() && !m_child->loaderHasError(); | 128 return m_child && m_child->isDone() && !m_child->loaderHasError(); |
127 } | 129 } |
128 | 130 |
129 void LinkImport::trace(Visitor* visitor) | 131 void LinkImport::trace(Visitor* visitor) |
130 { | 132 { |
131 LinkResource::trace(visitor); | 133 LinkResource::trace(visitor); |
132 } | 134 } |
133 | 135 |
134 } // namespace WebCore | 136 } // namespace WebCore |
OLD | NEW |