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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 return !equalIgnoringCase(getAttribute(draggableAttr), "false"); | 311 return !equalIgnoringCase(getAttribute(draggableAttr), "false"); |
312 } | 312 } |
313 | 313 |
314 void HTMLImageElement::setHeight(int value) | 314 void HTMLImageElement::setHeight(int value) |
315 { | 315 { |
316 setIntegralAttribute(heightAttr, value); | 316 setIntegralAttribute(heightAttr, value); |
317 } | 317 } |
318 | 318 |
319 KURL HTMLImageElement::src() const | 319 KURL HTMLImageElement::src() const |
320 { | 320 { |
321 return document().completeURL(getAttribute(srcAttr)); | 321 return treeScope().completeURL(getAttribute(srcAttr)); |
322 } | 322 } |
323 | 323 |
324 void HTMLImageElement::setSrc(const String& value) | 324 void HTMLImageElement::setSrc(const String& value) |
325 { | 325 { |
326 setAttribute(srcAttr, AtomicString(value)); | 326 setAttribute(srcAttr, AtomicString(value)); |
327 } | 327 } |
328 | 328 |
329 void HTMLImageElement::setWidth(int value) | 329 void HTMLImageElement::setWidth(int value) |
330 { | 330 { |
331 setIntegralAttribute(widthAttr, value); | 331 setIntegralAttribute(widthAttr, value); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 { | 368 { |
369 if (!fastHasAttribute(ismapAttr)) | 369 if (!fastHasAttribute(ismapAttr)) |
370 return false; | 370 return false; |
371 | 371 |
372 const AtomicString& usemap = fastGetAttribute(usemapAttr); | 372 const AtomicString& usemap = fastGetAttribute(usemapAttr); |
373 | 373 |
374 // If the usemap attribute starts with '#', it refers to a map element in th
e document. | 374 // If the usemap attribute starts with '#', it refers to a map element in th
e document. |
375 if (usemap.string()[0] == '#') | 375 if (usemap.string()[0] == '#') |
376 return false; | 376 return false; |
377 | 377 |
378 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).isE
mpty(); | 378 return treeScope().completeURL(stripLeadingAndTrailingHTMLSpaces(usemap)).is
Empty(); |
379 } | 379 } |
380 | 380 |
381 Image* HTMLImageElement::imageContents() | 381 Image* HTMLImageElement::imageContents() |
382 { | 382 { |
383 if (!m_imageLoader.imageComplete()) | 383 if (!m_imageLoader.imageComplete()) |
384 return 0; | 384 return 0; |
385 | 385 |
386 return m_imageLoader.image()->image(); | 386 return m_imageLoader.image()->image(); |
387 } | 387 } |
388 | 388 |
389 bool HTMLImageElement::isInteractiveContent() const | 389 bool HTMLImageElement::isInteractiveContent() const |
390 { | 390 { |
391 return fastHasAttribute(usemapAttr); | 391 return fastHasAttribute(usemapAttr); |
392 } | 392 } |
393 | 393 |
394 } | 394 } |
OLD | NEW |