CSSBorderImageValue.cpp [plain text]
#include "config.h"
#include "CSSBorderImageValue.h"
#include "PlatformString.h"
#include "Rect.h"
namespace WebCore {
CSSBorderImageValue::CSSBorderImageValue(PassRefPtr<CSSValue> image, PassRefPtr<CSSBorderImageSliceValue> imageSlice,
PassRefPtr<CSSValue> borderSlice, PassRefPtr<CSSValue> outset, PassRefPtr<CSSValue> repeat)
: m_image(image)
, m_imageSlice(imageSlice)
, m_borderSlice(borderSlice)
, m_outset(outset)
, m_repeat(repeat)
{
}
CSSBorderImageValue::~CSSBorderImageValue()
{
}
String CSSBorderImageValue::cssText() const
{
String text;
if (m_image)
text += m_image->cssText();
if (m_imageSlice) {
if (!text.isEmpty())
text += " ";
text += m_imageSlice->cssText();
}
if (m_borderSlice) {
text += " / ";
text += m_borderSlice->cssText();
}
if (m_outset) {
text += " / ";
text += m_outset->cssText();
}
if (m_repeat) {
if (!text.isEmpty())
text += " ";
text += m_repeat->cssText();
}
return text;
}
void CSSBorderImageValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const CSSStyleSheet* styleSheet)
{
m_image->addSubresourceStyleURLs(urls, styleSheet);
}
}