From 68393d750f8e72795f997d8a41bbb7a57e05d5bc Mon Sep 17 00:00:00 2001 From: "jknotten@chromium.org" Date: Tue, 21 Feb 2012 03:48:59 +0000 Subject: [PATCH] Default canvas backing store to be 1:1 with specified dimensions. https://bugs.webkit.org/show_bug.cgi?id=78971 Reviewed by Adam Barth. Although the canvas specification states that the backing image may be larger than the user-specified dimensions, there are a number of philip canvas tests that fail when the backing image data is not 1:1 with the specified canvas dimensions. These failures are tracked in https://bugs.webkit.org/show_bug.cgi?id=73645 This change defaults the canvas backing store to be 1:1 with the user-specified dimensions, while also providing an ENABLE(HIGH_DPI_CANVAS) build option to reinstate the original behaviour, so that the above bug may be more easily fixed. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108293 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 21 +++++++++++++++++++++ Source/WebCore/html/HTMLCanvasElement.cpp | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 5680e88..b910454 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,24 @@ +2012-02-20 John Knottenbelt + + Default canvas backing store to be 1:1 with specified dimensions. + https://bugs.webkit.org/show_bug.cgi?id=78971 + + Reviewed by Adam Barth. + + Although the canvas specification states that the backing image may + be larger than the user-specified dimensions, there are a number of + philip canvas tests that fail when the backing image data is not + 1:1 with the specified canvas dimensions. These failures are + tracked in https://bugs.webkit.org/show_bug.cgi?id=73645 + + This change defaults the canvas backing store to be 1:1 with the + user-specified dimensions, while also providing an + ENABLE(HIGH_DPI_CANVAS) build option to reinstate the original + behaviour, so that the above bug may be more easily fixed. + + * html/HTMLCanvasElement.cpp: + (WebCore::HTMLCanvasElement::HTMLCanvasElement): + 2012-02-20 Mary Wu Upstream RenderThemeBlackberry.h/.cpp into WebCore/platform/blackberry diff --git a/Source/WebCore/html/HTMLCanvasElement.cpp b/Source/WebCore/html/HTMLCanvasElement.cpp index 5faf295..beccb60 100644 --- a/Source/WebCore/html/HTMLCanvasElement.cpp +++ b/Source/WebCore/html/HTMLCanvasElement.cpp @@ -79,7 +79,12 @@ HTMLCanvasElement::HTMLCanvasElement(const QualifiedName& tagName, Document* doc , m_size(DefaultWidth, DefaultHeight) , m_rendererIsCanvas(false) , m_ignoreReset(false) +#if ENABLE(HIGH_DPI_CANVAS) + // FIXME: Make this the default once https://bugs.webkit.org/show_bug.cgi?id=73645 has been fixed. , m_deviceScaleFactor(document->frame() ? document->frame()->page()->deviceScaleFactor() : 1) +#else + , m_deviceScaleFactor(1) +#endif , m_originClean(true) , m_hasCreatedImageBuffer(false) { -- 2.7.4