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.
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.
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.
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.
25 #include "StyleCachedImage.h"
27 #include "CachedImage.h"
28 #include "RenderObject.h"
32 PassRefPtr<CSSValue> StyleCachedImage::cssValue() const
34 return CSSPrimitiveValue::create(m_image->url(), CSSPrimitiveValue::CSS_URI);
37 bool StyleCachedImage::canRender(float multiplier) const
39 return m_image->canRender(multiplier);
42 bool StyleCachedImage::isLoaded() const
44 return m_image->isLoaded();
47 bool StyleCachedImage::errorOccurred() const
49 return m_image->errorOccurred();
52 IntSize StyleCachedImage::imageSize(const RenderObject* /*renderer*/, float multiplier) const
54 return m_image->imageSize(multiplier);
57 bool StyleCachedImage::imageHasRelativeWidth() const
59 return m_image->imageHasRelativeWidth();
62 bool StyleCachedImage::imageHasRelativeHeight() const
64 return m_image->imageHasRelativeHeight();
67 bool StyleCachedImage::usesImageContainerSize() const
69 return m_image->usesImageContainerSize();
72 void StyleCachedImage::setImageContainerSize(const IntSize& size)
74 return m_image->setImageContainerSize(size);
77 void StyleCachedImage::addClient(RenderObject* renderer)
79 return m_image->addClient(renderer);
82 void StyleCachedImage::removeClient(RenderObject* renderer)
84 return m_image->removeClient(renderer);
87 PassRefPtr<Image> StyleCachedImage::image(RenderObject*, const IntSize&) const
89 return m_image->image();