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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 325 bool HTMLImageElement::hasLegalLinkAttribute(const QualifiedName& name) const |
326 { | 326 { |
327 return name == srcAttr || HTMLElement::hasLegalLinkAttribute(name); | 327 return name == srcAttr || HTMLElement::hasLegalLinkAttribute(name); |
328 } | 328 } |
329 | 329 |
| 330 const QualifiedName& HTMLImageElement::subResourceAttributeName() const |
| 331 { |
| 332 return srcAttr; |
| 333 } |
| 334 |
330 const AtomicString& HTMLImageElement::alt() const | 335 const AtomicString& HTMLImageElement::alt() const |
331 { | 336 { |
332 return fastGetAttribute(altAttr); | 337 return fastGetAttribute(altAttr); |
333 } | 338 } |
334 | 339 |
335 bool HTMLImageElement::draggable() const | 340 bool HTMLImageElement::draggable() const |
336 { | 341 { |
337 // Image elements are draggable by default. | 342 // Image elements are draggable by default. |
338 return !equalIgnoringCase(getAttribute(draggableAttr), "false"); | 343 return !equalIgnoringCase(getAttribute(draggableAttr), "false"); |
339 } | 344 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 if (!image) | 470 if (!image) |
466 return FloatSize(); | 471 return FloatSize(); |
467 LayoutSize size; | 472 LayoutSize size; |
468 size = image->imageSizeForRenderer(renderer(), 1.0f); // FIXME: Not sure abo
ut this. | 473 size = image->imageSizeForRenderer(renderer(), 1.0f); // FIXME: Not sure abo
ut this. |
469 if (renderer() && renderer()->isRenderImage() && image->image() && !image->i
mage()->hasRelativeWidth()) | 474 if (renderer() && renderer()->isRenderImage() && image->image() && !image->i
mage()->hasRelativeWidth()) |
470 size.scale(toRenderImage(renderer())->imageDevicePixelRatio()); | 475 size.scale(toRenderImage(renderer())->imageDevicePixelRatio()); |
471 return size; | 476 return size; |
472 } | 477 } |
473 | 478 |
474 } | 479 } |
OLD | NEW |