OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (!document->frame()) { | 78 if (!document->frame()) { |
79 if (document->import()) | 79 if (document->import()) |
80 return document->url(); | 80 return document->url(); |
81 return KURL(); | 81 return KURL(); |
82 } | 82 } |
83 | 83 |
84 // Use the URL of the currently active document for this frame. | 84 // Use the URL of the currently active document for this frame. |
85 return document->frame()->document()->url(); | 85 return document->frame()->document()->url(); |
86 } | 86 } |
87 | 87 |
88 inline PassRefPtr<Event> createScriptLoadEvent() | 88 inline PassRefPtrWillBeRawPtr<Event> createScriptLoadEvent() |
89 { | 89 { |
90 return Event::create(EventTypeNames::load); | 90 return Event::create(EventTypeNames::load); |
91 } | 91 } |
92 | 92 |
93 ScriptSourceCode HTMLScriptRunner::sourceFromPendingScript(const PendingScript&
script, bool& errorOccurred) const | 93 ScriptSourceCode HTMLScriptRunner::sourceFromPendingScript(const PendingScript&
script, bool& errorOccurred) const |
94 { | 94 { |
95 if (script.resource()) { | 95 if (script.resource()) { |
96 errorOccurred = script.resource()->errorOccurred(); | 96 errorOccurred = script.resource()->errorOccurred(); |
97 ASSERT(script.resource()->isLoaded()); | 97 ASSERT(script.resource()->isLoaded()); |
98 return ScriptSourceCode(script.resource()); | 98 return ScriptSourceCode(script.resource()); |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 ScriptSourceCode sourceCode(script->textContent(), documentURLFo
rScriptExecution(m_document), scriptStartPosition); | 322 ScriptSourceCode sourceCode(script->textContent(), documentURLFo
rScriptExecution(m_document), scriptStartPosition); |
323 scriptLoader->executeScript(sourceCode); | 323 scriptLoader->executeScript(sourceCode); |
324 } | 324 } |
325 } else { | 325 } else { |
326 requestParsingBlockingScript(script); | 326 requestParsingBlockingScript(script); |
327 } | 327 } |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 } | 331 } |
OLD | NEW |