| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const | 371 bool HTMLImageElement::isURLAttribute(const Attribute& attribute) const |
| 372 { | 372 { |
| 373 return attribute.name() == HTMLNames::srcAttr | 373 return attribute.name() == HTMLNames::srcAttr |
| 374 || attribute.name() == HTMLNames::lowsrcAttr | 374 || attribute.name() == HTMLNames::lowsrcAttr |
| 375 || attribute.name() == HTMLNames::longdescAttr | 375 || attribute.name() == HTMLNames::longdescAttr |
| 376 || (attribute.name() == HTMLNames::usemapAttr && attribute.value().strin
g()[0] != '#') | 376 || (attribute.name() == HTMLNames::usemapAttr && attribute.value().strin
g()[0] != '#') |
| 377 || HTMLElement::isURLAttribute(attribute); | 377 || HTMLElement::isURLAttribute(attribute); |
| 378 } | 378 } |
| 379 | 379 |
| 380 bool HTMLImageElement::hasLegalLinkAttribute(const QualifiedName& name) const | |
| 381 { | |
| 382 return name == HTMLNames::srcAttr || HTMLElement::hasLegalLinkAttribute(name
); | |
| 383 } | |
| 384 | |
| 385 const QualifiedName& HTMLImageElement::subResourceAttributeName() const | |
| 386 { | |
| 387 return HTMLNames::srcAttr; | |
| 388 } | |
| 389 | |
| 390 void HTMLImageElement::setHeight(int value) | 380 void HTMLImageElement::setHeight(int value) |
| 391 { | 381 { |
| 392 setIntegralAttribute(HTMLNames::heightAttr, value); | 382 setIntegralAttribute(HTMLNames::heightAttr, value); |
| 393 } | 383 } |
| 394 | 384 |
| 395 KURL HTMLImageElement::src() const | 385 KURL HTMLImageElement::src() const |
| 396 { | 386 { |
| 397 return document().completeURL(getAttribute(HTMLNames::srcAttr)); | 387 return document().completeURL(getAttribute(HTMLNames::srcAttr)); |
| 398 } | 388 } |
| 399 | 389 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 } | 531 } |
| 542 imageLoader().updateFromElement(behavior); | 532 imageLoader().updateFromElement(behavior); |
| 543 } | 533 } |
| 544 | 534 |
| 545 const KURL& HTMLImageElement::sourceURL() const | 535 const KURL& HTMLImageElement::sourceURL() const |
| 546 { | 536 { |
| 547 return cachedImage()->response().url(); | 537 return cachedImage()->response().url(); |
| 548 } | 538 } |
| 549 | 539 |
| 550 } | 540 } |
| OLD | NEW |