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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
value); | 107 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
value); |
108 else | 108 else |
109 HTMLElement::collectStyleForPresentationAttribute(name, value, style); | 109 HTMLElement::collectStyleForPresentationAttribute(name, value, style); |
110 } | 110 } |
111 | 111 |
112 const AtomicString HTMLImageElement::imageSourceURL() const | 112 const AtomicString HTMLImageElement::imageSourceURL() const |
113 { | 113 { |
114 return m_bestFitImageURL.isNull() ? fastGetAttribute(srcAttr) : m_bestFitIma
geURL; | 114 return m_bestFitImageURL.isNull() ? fastGetAttribute(srcAttr) : m_bestFitIma
geURL; |
115 } | 115 } |
116 | 116 |
| 117 HTMLFormElement* HTMLImageElement::formOwner() const |
| 118 { |
| 119 return findFormAncestor(); |
| 120 } |
| 121 |
117 void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) | 122 void HTMLImageElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) |
118 { | 123 { |
119 if (name == altAttr) { | 124 if (name == altAttr) { |
120 if (renderer() && renderer()->isImage()) | 125 if (renderer() && renderer()->isImage()) |
121 toRenderImage(renderer())->updateAltText(); | 126 toRenderImage(renderer())->updateAltText(); |
122 } else if (name == srcAttr || name == srcsetAttr) { | 127 } else if (name == srcAttr || name == srcsetAttr) { |
123 if (RuntimeEnabledFeatures::srcsetEnabled()) { | 128 if (RuntimeEnabledFeatures::srcsetEnabled()) { |
124 ImageCandidate candidate = bestFitSourceForImageAttributes(document(
).devicePixelRatio(), fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr)); | 129 ImageCandidate candidate = bestFitSourceForImageAttributes(document(
).devicePixelRatio(), fastGetAttribute(srcAttr), fastGetAttribute(srcsetAttr)); |
125 m_bestFitImageURL = candidate.toString(); | 130 m_bestFitImageURL = candidate.toString(); |
126 float candidateScaleFactor = candidate.scaleFactor(); | 131 float candidateScaleFactor = candidate.scaleFactor(); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 394 |
390 return m_imageLoader.image()->image(); | 395 return m_imageLoader.image()->image(); |
391 } | 396 } |
392 | 397 |
393 bool HTMLImageElement::isInteractiveContent() const | 398 bool HTMLImageElement::isInteractiveContent() const |
394 { | 399 { |
395 return fastHasAttribute(usemapAttr); | 400 return fastHasAttribute(usemapAttr); |
396 } | 401 } |
397 | 402 |
398 } | 403 } |
OLD | NEW |