[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
yuzo at google.com
yuzo at google.com
Wed Dec 22 15:06:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit fcdb14049cf121f3d5f5bbfe5f26327b9eb7abb7
Author: yuzo at google.com <yuzo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 28 03:11:33 2010 +0000
2010-10-27 Yuzo Fujishima <yuzo at google.com>
Reviewed by Eric Seidel.
Fix for Bug 48310 - SVG font-face-name without name attribute causes a crash
https://bugs.webkit.org/show_bug.cgi?id=48310
* svg/custom/font-face-name-without-name-attr-expected.txt: Added.
* svg/custom/font-face-name-without-name-attr.svg: Added.
2010-10-27 Yuzo Fujishima <yuzo at google.com>
Reviewed by Eric Seidel.
Fix for Bug 48310 - SVG font-face-name without name attribute causes a crash
https://bugs.webkit.org/show_bug.cgi?id=48310
Test: svg/custom/font-face-name-without-name-attr.svg
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace): Don't create src
property if the src value list is empty.
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::srcValue): Don't add empty src
values to the src value list.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 09b50e4..ed4d95e 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-27 Yuzo Fujishima <yuzo at google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix for Bug 48310 - SVG font-face-name without name attribute causes a crash
+ https://bugs.webkit.org/show_bug.cgi?id=48310
+
+ * svg/custom/font-face-name-without-name-attr-expected.txt: Added.
+ * svg/custom/font-face-name-without-name-attr.svg: Added.
+
2010-10-27 Stephen White <senorblanco at chromium.org>
Reviewed by Kenneth Russell.
diff --git a/LayoutTests/svg/custom/font-face-name-without-name-attr-expected.txt b/LayoutTests/svg/custom/font-face-name-without-name-attr-expected.txt
new file mode 100644
index 0000000..82e688e
--- /dev/null
+++ b/LayoutTests/svg/custom/font-face-name-without-name-attr-expected.txt
@@ -0,0 +1 @@
+This test passes if WebKit doesn't crash.
diff --git a/LayoutTests/svg/custom/font-face-name-without-name-attr.svg b/LayoutTests/svg/custom/font-face-name-without-name-attr.svg
new file mode 100644
index 0000000..1379a0d
--- /dev/null
+++ b/LayoutTests/svg/custom/font-face-name-without-name-attr.svg
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<defs>
+ <font-face font-family="svgtest">
+ <font-face-src>
+ <font-face-name/> <!-- no name attribute -->
+ </font-face-src>
+ </font-face>
+</defs>
+<text font-family="svgtest" x="0" y="1cm">This test passes if WebKit doesn't crash.</text>
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+</script>
+</svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 63a14b4..92d04e8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-27 Yuzo Fujishima <yuzo at google.com>
+
+ Reviewed by Eric Seidel.
+
+ Fix for Bug 48310 - SVG font-face-name without name attribute causes a crash
+ https://bugs.webkit.org/show_bug.cgi?id=48310
+
+ Test: svg/custom/font-face-name-without-name-attr.svg
+
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::rebuildFontFace): Don't create src
+ property if the src value list is empty.
+ * svg/SVGFontFaceSrcElement.cpp:
+ (WebCore::SVGFontFaceSrcElement::srcValue): Don't add empty src
+ values to the src value list.
+
2010-10-27 Chris Rogers <crogers at google.com>
Reviewed by Kenneth Russell.
diff --git a/WebCore/svg/SVGFontFaceElement.cpp b/WebCore/svg/SVGFontFaceElement.cpp
index 4884074..0c74d08 100644
--- a/WebCore/svg/SVGFontFaceElement.cpp
+++ b/WebCore/svg/SVGFontFaceElement.cpp
@@ -288,7 +288,7 @@ void SVGFontFaceElement::rebuildFontFace()
list = srcElement->srcValue();
}
- if (!list)
+ if (!list || !list->length())
return;
// Parse in-memory CSS rules
diff --git a/WebCore/svg/SVGFontFaceSrcElement.cpp b/WebCore/svg/SVGFontFaceSrcElement.cpp
index 891ddcd..e003944 100644
--- a/WebCore/svg/SVGFontFaceSrcElement.cpp
+++ b/WebCore/svg/SVGFontFaceSrcElement.cpp
@@ -47,10 +47,13 @@ PassRefPtr<CSSValueList> SVGFontFaceSrcElement::srcValue() const
{
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (Node* child = firstChild(); child; child = child->nextSibling()) {
+ RefPtr<CSSFontFaceSrcValue> srcValue;
if (child->hasTagName(font_face_uriTag))
- list->append(static_cast<SVGFontFaceUriElement*>(child)->srcValue());
+ srcValue = static_cast<SVGFontFaceUriElement*>(child)->srcValue();
else if (child->hasTagName(font_face_nameTag))
- list->append(static_cast<SVGFontFaceNameElement*>(child)->srcValue());
+ srcValue = static_cast<SVGFontFaceNameElement*>(child)->srcValue();
+ if (srcValue && srcValue->resource().length())
+ list->append(srcValue);
}
return list;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list