1/* 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org) 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public License 18 * along with this library; see the file COPYING.LIB. If not, write to 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * Boston, MA 02110-1301, USA. 21 * 22 */ 23 24#include "config.h" 25#include "StyleCachedImage.h" 26 27#include "CachedImage.h" 28#include "RenderObject.h" 29 30namespace WebCore { 31 32PassRefPtr<CSSValue> StyleCachedImage::cssValue() const 33{ 34 return CSSPrimitiveValue::create(m_image->url(), CSSPrimitiveValue::CSS_URI); 35} 36 37bool StyleCachedImage::canRender(float multiplier) const 38{ 39 return m_image->canRender(multiplier); 40} 41 42bool StyleCachedImage::isLoaded() const 43{ 44 return m_image->isLoaded(); 45} 46 47bool StyleCachedImage::errorOccurred() const 48{ 49 return m_image->errorOccurred(); 50} 51 52IntSize StyleCachedImage::imageSize(const RenderObject* /*renderer*/, float multiplier) const 53{ 54 return m_image->imageSize(multiplier); 55} 56 57bool StyleCachedImage::imageHasRelativeWidth() const 58{ 59 return m_image->imageHasRelativeWidth(); 60} 61 62bool StyleCachedImage::imageHasRelativeHeight() const 63{ 64 return m_image->imageHasRelativeHeight(); 65} 66 67bool StyleCachedImage::usesImageContainerSize() const 68{ 69 return m_image->usesImageContainerSize(); 70} 71 72void StyleCachedImage::setImageContainerSize(const IntSize& size) 73{ 74 return m_image->setImageContainerSize(size); 75} 76 77void StyleCachedImage::addClient(RenderObject* renderer) 78{ 79 return m_image->addClient(renderer); 80} 81 82void StyleCachedImage::removeClient(RenderObject* renderer) 83{ 84 return m_image->removeClient(renderer); 85} 86 87PassRefPtr<Image> StyleCachedImage::image(RenderObject*, const IntSize&) const 88{ 89 return m_image->image(); 90} 91 92} 93