| 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 HTMLImageElement::HTMLImageElement(Document& document, bool createdByParser) | 75 HTMLImageElement::HTMLImageElement(Document& document, bool createdByParser) |
| 76 : HTMLElement(HTMLNames::imgTag, document) | 76 : HTMLElement(HTMLNames::imgTag, document) |
| 77 , m_imageLoader(HTMLImageLoader::create(this)) | 77 , m_imageLoader(HTMLImageLoader::create(this)) |
| 78 , m_imageDevicePixelRatio(1.0f) | 78 , m_imageDevicePixelRatio(1.0f) |
| 79 , m_elementCreatedByParser(createdByParser) | 79 , m_elementCreatedByParser(createdByParser) |
| 80 , m_intrinsicSizingViewportDependant(false) | 80 , m_intrinsicSizingViewportDependant(false) |
| 81 , m_effectiveSizeViewportDependant(false) | 81 , m_effectiveSizeViewportDependant(false) |
| 82 { | 82 { |
| 83 ScriptWrappable::init(this); | |
| 84 } | 83 } |
| 85 | 84 |
| 86 PassRefPtr<HTMLImageElement> HTMLImageElement::create(Document& document) | 85 PassRefPtr<HTMLImageElement> HTMLImageElement::create(Document& document) |
| 87 { | 86 { |
| 88 return adoptRef(new HTMLImageElement(document)); | 87 return adoptRef(new HTMLImageElement(document)); |
| 89 } | 88 } |
| 90 | 89 |
| 91 PassRefPtr<HTMLImageElement> HTMLImageElement::create(Document& document, bool c
reatedByParser) | 90 PassRefPtr<HTMLImageElement> HTMLImageElement::create(Document& document, bool c
reatedByParser) |
| 92 { | 91 { |
| 93 return adoptRef(new HTMLImageElement(document, createdByParser)); | 92 return adoptRef(new HTMLImageElement(document, createdByParser)); |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 } | 438 } |
| 440 imageLoader().updateFromElement(behavior); | 439 imageLoader().updateFromElement(behavior); |
| 441 } | 440 } |
| 442 | 441 |
| 443 const KURL& HTMLImageElement::sourceURL() const | 442 const KURL& HTMLImageElement::sourceURL() const |
| 444 { | 443 { |
| 445 return cachedImage()->response().url(); | 444 return cachedImage()->response().url(); |
| 446 } | 445 } |
| 447 | 446 |
| 448 } | 447 } |
| OLD | NEW |