diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebCore/css/CSSImageSetValue.cpp | |
parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
download | qtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz |
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebCore/css/CSSImageSetValue.cpp')
-rw-r--r-- | Source/WebCore/css/CSSImageSetValue.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Source/WebCore/css/CSSImageSetValue.cpp b/Source/WebCore/css/CSSImageSetValue.cpp index 6dc76f580..f7d401f5c 100644 --- a/Source/WebCore/css/CSSImageSetValue.cpp +++ b/Source/WebCore/css/CSSImageSetValue.cpp @@ -140,7 +140,32 @@ StyleImage* CSSImageSetValue::cachedOrPendingImageSet(Document* document) String CSSImageSetValue::customCssText() const { - return "-webkit-image-set(" + CSSValueList::customCssText() + ")"; + StringBuilder result; + result.append("-webkit-image-set("); + + size_t length = this->length(); + size_t i = 0; + while (i < length) { + if (i > 0) + result.append(", "); + + const CSSValue* imageValue = item(i); + result.append(imageValue->cssText()); + result.append(' '); + + ++i; + ASSERT(i < length); + const CSSValue* scaleFactorValue = item(i); + result.append(scaleFactorValue->cssText()); + // FIXME: Eventually the scale factor should contain it's own unit http://wkb.ug/100120. + // For now 'x' is hard-coded in the parser, so we hard-code it here too. + result.append('x'); + + ++i; + } + + result.append(")"); + return result.toString(); } bool CSSImageSetValue::hasFailedOrCanceledSubresources() const |