| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // TODO(hiroshige): Make this asynchronous. Currently we fire the error | 337 // TODO(hiroshige): Make this asynchronous. Currently we fire the error |
| 338 // event synchronously to keep the existing behavior. | 338 // event synchronously to keep the existing behavior. |
| 339 DispatchErrorEvent(); | 339 DispatchErrorEvent(); |
| 340 return false; | 340 return false; |
| 341 } | 341 } |
| 342 | 342 |
| 343 // 21.3. "Set the element's from an external file flag." | 343 // 21.3. "Set the element's from an external file flag." |
| 344 is_external_script_ = true; | 344 is_external_script_ = true; |
| 345 | 345 |
| 346 // 21.4. "Parse src relative to the element's node document." | 346 // 21.4. "Parse src relative to the element's node document." |
| 347 // TODO(hiroshige): Use CompleteURL(src) instead. | 347 KURL url = element_document.CompleteURL(src); |
| 348 KURL url = element_document.CompleteURL(element_->SourceAttributeValue()); | |
| 349 | 348 |
| 350 // 21.5. "If the previous step failed, queue a task to | 349 // 21.5. "If the previous step failed, queue a task to |
| 351 // fire an event named error at the element, and abort these steps." | 350 // fire an event named error at the element, and abort these steps." |
| 352 if (!url.IsValid()) { | 351 if (!url.IsValid()) { |
| 353 // TODO(hiroshige): Make this asynchronous. Currently we fire the error | 352 // TODO(hiroshige): Make this asynchronous. Currently we fire the error |
| 354 // event synchronously to keep the existing behavior. | 353 // event synchronously to keep the existing behavior. |
| 355 DispatchErrorEvent(); | 354 DispatchErrorEvent(); |
| 356 return false; | 355 return false; |
| 357 } | 356 } |
| 358 | 357 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 // then abort these steps at this point. The script is not executed. | 851 // then abort these steps at this point. The script is not executed. |
| 853 return DeprecatedEqualIgnoringCase(event_attribute, "onload") || | 852 return DeprecatedEqualIgnoringCase(event_attribute, "onload") || |
| 854 DeprecatedEqualIgnoringCase(event_attribute, "onload()"); | 853 DeprecatedEqualIgnoringCase(event_attribute, "onload()"); |
| 855 } | 854 } |
| 856 | 855 |
| 857 String ScriptLoader::ScriptContent() const { | 856 String ScriptLoader::ScriptContent() const { |
| 858 return element_->TextFromChildren(); | 857 return element_->TextFromChildren(); |
| 859 } | 858 } |
| 860 | 859 |
| 861 } // namespace blink | 860 } // namespace blink |
| OLD | NEW |