Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: LayoutTests/fast/canvas/font-no-zoom.html

Issue 326893003: Reset computed size of the <canvas> FontDescription when setting CRC2D.font (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/font-no-zoom.html
diff --git a/LayoutTests/fast/canvas/font-no-zoom.html b/LayoutTests/fast/canvas/font-no-zoom.html
new file mode 100644
index 0000000000000000000000000000000000000000..be8537208e6fccbd3829c25d66301860df8e1394
--- /dev/null
+++ b/LayoutTests/fast/canvas/font-no-zoom.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+canvas {
+ font-family: sans-serif;
+ font-size: 100px;
+ zoom: 3;
+}
+</style>
+<canvas width="100" height="100"></canvas>
+<script>
+test(function() {
+ var ctx = document.querySelector('canvas').getContext('2d');
+ // Set same font as will be computed on the canvas element.
+ ctx.font = "100px sans-serif";
+ assert_equals(ctx.font, "100px sans-serif");
+}, "Zoom does not affect the font size.");
+</script>
« no previous file with comments | « no previous file | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698