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 10 matching lines...) Expand all Loading... |
21 */ | 21 */ |
22 | 22 |
23 #include "config.h" | 23 #include "config.h" |
24 #include "core/html/HTMLImageElement.h" | 24 #include "core/html/HTMLImageElement.h" |
25 | 25 |
26 #include "CSSPropertyNames.h" | 26 #include "CSSPropertyNames.h" |
27 #include "HTMLNames.h" | 27 #include "HTMLNames.h" |
28 #include "RuntimeEnabledFeatures.h" | 28 #include "RuntimeEnabledFeatures.h" |
29 #include "bindings/v8/ScriptEventListener.h" | 29 #include "bindings/v8/ScriptEventListener.h" |
30 #include "core/dom/Attribute.h" | 30 #include "core/dom/Attribute.h" |
31 #include "core/events/ThreadLocalEventNames.h" | |
32 #include "core/fetch/ImageResource.h" | 31 #include "core/fetch/ImageResource.h" |
33 #include "core/html/HTMLAnchorElement.h" | 32 #include "core/html/HTMLAnchorElement.h" |
34 #include "core/html/HTMLCanvasElement.h" | 33 #include "core/html/HTMLCanvasElement.h" |
35 #include "core/html/HTMLFormElement.h" | 34 #include "core/html/HTMLFormElement.h" |
36 #include "core/html/canvas/CanvasRenderingContext.h" | 35 #include "core/html/canvas/CanvasRenderingContext.h" |
37 #include "core/html/parser/HTMLParserIdioms.h" | 36 #include "core/html/parser/HTMLParserIdioms.h" |
38 #include "core/html/parser/HTMLSrcsetParser.h" | 37 #include "core/html/parser/HTMLSrcsetParser.h" |
39 #include "core/rendering/RenderImage.h" | 38 #include "core/rendering/RenderImage.h" |
40 | 39 |
41 using namespace std; | 40 using namespace std; |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if (!image) | 469 if (!image) |
471 return FloatSize(); | 470 return FloatSize(); |
472 LayoutSize size; | 471 LayoutSize size; |
473 size = image->imageSizeForRenderer(renderer(), 1.0f); // FIXME: Not sure abo
ut this. | 472 size = image->imageSizeForRenderer(renderer(), 1.0f); // FIXME: Not sure abo
ut this. |
474 if (renderer() && renderer()->isRenderImage() && image->image() && !image->i
mage()->hasRelativeWidth()) | 473 if (renderer() && renderer()->isRenderImage() && image->image() && !image->i
mage()->hasRelativeWidth()) |
475 size.scale(toRenderImage(renderer())->imageDevicePixelRatio()); | 474 size.scale(toRenderImage(renderer())->imageDevicePixelRatio()); |
476 return size; | 475 return size; |
477 } | 476 } |
478 | 477 |
479 } | 478 } |
OLD | NEW |