| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const | 316 bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const |
| 317 { | 317 { |
| 318 return attribute.name() == srcAttr | 318 return attribute.name() == srcAttr |
| 319 || attribute.name() == lowsrcAttr | 319 || attribute.name() == lowsrcAttr |
| 320 || attribute.name() == longdescAttr | 320 || attribute.name() == longdescAttr |
| 321 || (attribute.name() == usemapAttr && attribute.value().string()[0] != '
#') | 321 || (attribute.name() == usemapAttr && attribute.value().string()[0] != '
#') |
| 322 || HTMLElement::isURLAttribute(attribute); | 322 || HTMLElement::isURLAttribute(attribute); |
| 323 } | 323 } |
| 324 | 324 |
| 325 bool HTMLImageElement::hasLegalLinkAttribute(const QualifiedName& name) const |
| 326 { |
| 327 return name == srcAttr || HTMLElement::hasLegalLinkAttribute(name); |
| 328 } |
| 329 |
| 325 const AtomicString& HTMLImageElement::alt() const | 330 const AtomicString& HTMLImageElement::alt() const |
| 326 { | 331 { |
| 327 return fastGetAttribute(altAttr); | 332 return fastGetAttribute(altAttr); |
| 328 } | 333 } |
| 329 | 334 |
| 330 bool HTMLImageElement::draggable() const | 335 bool HTMLImageElement::draggable() const |
| 331 { | 336 { |
| 332 // Image elements are draggable by default. | 337 // Image elements are draggable by default. |
| 333 return !equalIgnoringCase(getAttribute(draggableAttr), "false"); | 338 return !equalIgnoringCase(getAttribute(draggableAttr), "false"); |
| 334 } | 339 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 if (!image) | 465 if (!image) |
| 461 return FloatSize(); | 466 return FloatSize(); |
| 462 LayoutSize size; | 467 LayoutSize size; |
| 463 size = image->imageSizeForRenderer(renderer(), 1.0f); // FIXME: Not sure abo
ut this. | 468 size = image->imageSizeForRenderer(renderer(), 1.0f); // FIXME: Not sure abo
ut this. |
| 464 if (renderer() && renderer()->isRenderImage() && image->image() && !image->i
mage()->hasRelativeWidth()) | 469 if (renderer() && renderer()->isRenderImage() && image->image() && !image->i
mage()->hasRelativeWidth()) |
| 465 size.scale(toRenderImage(renderer())->imageDevicePixelRatio()); | 470 size.scale(toRenderImage(renderer())->imageDevicePixelRatio()); |
| 466 return size; | 471 return size; |
| 467 } | 472 } |
| 468 | 473 |
| 469 } | 474 } |
| OLD | NEW |