<rdar://problem/
10912486> CanvasRenderingContext2D does not expose its backing store resolution
https://bugs.webkit.org/show_bug.cgi?id=83619
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/canvas/2d.backingStorePixelRatio.html
Added a backingStorePixelRatio attribute to CanvasRenderingContext2D, as proposed in
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035112.html>. The attribute
is prefixed with “webkit” for now.
* html/HTMLCanvasElement.h:
(WebCore::HTMLCanvasElement::deviceScaleFactor): Added this getter.
* html/canvas/CanvasRenderingContext2D.h:
(WebCore::CanvasRenderingContext2D::webkitBackingStorePixelRatio): Added. Returns the canvas
element’s device scale factor.
(CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.idl: Added webkitBackingStorePixelRatio as a
read-only attribute.
LayoutTests:
* fast/canvas/2d.backingStorePixelRatio-expected.txt: Added.
* fast/canvas/2d.backingStorePixelRatio.html: Added.
* platform/mac/fast/canvas/2d.backingStorePixelRatio-expected.txt: Added.
* platform/win/fast/canvas/2d.backingStorePixelRatio-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113780
268f45cc-cd09-0410-ab3c-
d52691b4dbfc