[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andreas.kling at nokia.com
andreas.kling at nokia.com
Wed Dec 22 13:51:37 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit ba4874636df45faa556780a1466baefe27618eeb
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 28 14:24:30 2010 +0000
2010-09-28 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Canvas: Crash when setting a font with size in 'ex' units
https://bugs.webkit.org/show_bug.cgi?id=46538
update() the style's font after setting the style's font description.
Needed because CSSPrimitiveValue::computeLengthDouble() later assumes
that the style's font is properly initialized (for xHeight().)
Fixes crash on IE test center's canvas-text-font-002 test.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
2010-09-28 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
Canvas: Crash when setting a font with size in 'ex' units
https://bugs.webkit.org/show_bug.cgi?id=46538
* fast/canvas/canvas-font-ex-units-crash-expected.txt: Added.
* fast/canvas/canvas-font-ex-units-crash.html: Added.
* fast/canvas/script-tests/canvas-font-ex-units-crash.js: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8892847..7471d75 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-28 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Canvas: Crash when setting a font with size in 'ex' units
+ https://bugs.webkit.org/show_bug.cgi?id=46538
+
+ * fast/canvas/canvas-font-ex-units-crash-expected.txt: Added.
+ * fast/canvas/canvas-font-ex-units-crash.html: Added.
+ * fast/canvas/script-tests/canvas-font-ex-units-crash.js: Added.
+
2010-09-28 Satish Sampath <satish at chromium.org>
Unreviewed, enable a couple of speech input layout tests in chromium as they run successfully now.
diff --git a/LayoutTests/fast/canvas/canvas-font-ex-units-crash-expected.txt b/LayoutTests/fast/canvas/canvas-font-ex-units-crash-expected.txt
new file mode 100644
index 0000000..48309f4
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-font-ex-units-crash-expected.txt
@@ -0,0 +1,10 @@
+Test that setting a font with size in 'ex' units doesn't crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS ctx.font = '5ex sans-serif'; ctx.font is '5ex sans-serif'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/canvas/canvas-font-ex-units-crash.html b/LayoutTests/fast/canvas/canvas-font-ex-units-crash.html
new file mode 100644
index 0000000..91f9215
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-font-ex-units-crash.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../js/resources/js-test-style.css">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/canvas-font-ex-units-crash.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-font-ex-units-crash.js b/LayoutTests/fast/canvas/script-tests/canvas-font-ex-units-crash.js
new file mode 100644
index 0000000..52018ed
--- /dev/null
+++ b/LayoutTests/fast/canvas/script-tests/canvas-font-ex-units-crash.js
@@ -0,0 +1,8 @@
+description("Test that setting a font with size in 'ex' units doesn't crash.");
+
+ctx = document.createElement('canvas').getContext('2d');
+
+ctx.font = "5ex sans-serif";
+shouldBe("ctx.font = '5ex sans-serif'; ctx.font", "'5ex sans-serif'");
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 185a018..9d63883 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-28 Andreas Kling <andreas.kling at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Canvas: Crash when setting a font with size in 'ex' units
+ https://bugs.webkit.org/show_bug.cgi?id=46538
+
+ update() the style's font after setting the style's font description.
+ Needed because CSSPrimitiveValue::computeLengthDouble() later assumes
+ that the style's font is properly initialized (for xHeight().)
+
+ Fixes crash on IE test center's canvas-text-font-002 test.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setFont):
+
2010-09-28 Benjamin Poulain <benjamin.poulain at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index ec120dd..161a891 100644
--- a/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -1650,6 +1650,7 @@ void CanvasRenderingContext2D::setFont(const String& newFont)
RefPtr<RenderStyle> newStyle = RenderStyle::create();
if (RenderStyle* computedStyle = canvas()->computedStyle())
newStyle->setFontDescription(computedStyle->fontDescription());
+ newStyle->font().update(newStyle->font().fontSelector());
// Now map the font property into the style.
CSSStyleSelector* styleSelector = canvas()->styleSelector();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list