RenderImageResourceStyleImage.h [plain text]
#pragma once
#include "RenderImageResource.h"
#include "StyleImage.h"
#include <wtf/RefPtr.h>
namespace WebCore {
class RenderElement;
class RenderImageResourceStyleImage final : public RenderImageResource {
public:
explicit RenderImageResourceStyleImage(StyleImage&);
virtual ~RenderImageResourceStyleImage();
private:
void initialize(RenderElement*) override;
void shutdown() override;
RefPtr<Image> image(const IntSize& = { }) const override;
bool errorOccurred() const override { return m_styleImage->errorOccurred(); }
void setContainerSizeForRenderer(const IntSize&) override;
bool imageHasRelativeWidth() const override { return m_styleImage->imageHasRelativeWidth(); }
bool imageHasRelativeHeight() const override { return m_styleImage->imageHasRelativeHeight(); }
LayoutSize imageSize(float multiplier) const override { return LayoutSize(m_styleImage->imageSize(m_renderer, multiplier)); }
LayoutSize intrinsicSize(float multiplier) const override { return LayoutSize(m_styleImage->imageSize(m_renderer, multiplier)); }
WrappedImagePtr imagePtr() const override { return m_styleImage->data(); }
Ref<StyleImage> m_styleImage;
};
}