Introduce WebScreenInfo.deviceScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=101613

Patch by Sami Kyostila <skyostil@chromium.org> on 2012-11-08
Reviewed by Adam Barth.

Introduce the WebScreenInfo.deviceScaleFactor property, which specifies the
ratio between physical and logical pixels. This is the first step in replacing
horizontalDPI/verticalDPI in favor of the deviceScaleFactor.

For now, this value is only initialized on Mac, because the other ports that
use it initialize the value in Chromium, whereas Windows and X11 default to a
factor of 1. The value on Mac is truncated to an integer to match the
expectation in Chromium's RenderWidget.

Source/Platform:

* chromium/public/WebScreenInfo.h:
(WebScreenInfo):
(WebKit::WebScreenInfo::WebScreenInfo):

Source/WebKit/chromium:

* src/mac/WebScreenInfoFactory.mm:
(WebKit::WebScreenInfoFactory::screenInfo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk/Source/Platform/chromium/public@133927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 file changed
tree: e23ad00e8f061779a19636fc4f13839f89ec80d5
  1. android/
  2. linux/
  3. mac/
  4. win/
  5. Platform.h
  6. WebAnimation.h
  7. WebAnimationCurve.h
  8. WebAnimationDelegate.h
  9. WebAudioBus.h
  10. WebAudioDevice.h
  11. WebBlobData.h
  12. WebBlobRegistry.h
  13. WebCanvas.h
  14. WebClipboard.h
  15. WebColor.h
  16. WebCommon.h
  17. WebCompositor.h
  18. WebCompositorFrame.h
  19. WebCompositorFrameAck.h
  20. WebCompositorOutputSurface.h
  21. WebCompositorOutputSurfaceClient.h
  22. WebCompositorSoftwareOutputDevice.h
  23. WebCompositorSupport.h
  24. WebCompositorTransferableResourceList.h
  25. WebContentLayer.h
  26. WebContentLayerClient.h
  27. WebCookie.h
  28. WebCookieJar.h
  29. WebCString.h
  30. WebData.h
  31. WebDelegatedRendererLayer.h
  32. WebDragData.h
  33. WebExternalTextureLayer.h
  34. WebExternalTextureLayerClient.h
  35. WebFileInfo.h
  36. WebFileSystem.h
  37. WebFileUtilities.h
  38. WebFilterOperation.h
  39. WebFilterOperations.h
  40. WebFlingAnimator.h
  41. WebFloatAnimationCurve.h
  42. WebFloatKeyframe.h
  43. WebFloatPoint.h
  44. WebFloatQuad.h
  45. WebFloatRect.h
  46. WebGamepad.h
  47. WebGamepads.h
  48. WebGestureCurve.h
  49. WebGestureCurveTarget.h
  50. WebGraphicsContext3D.h
  51. WebGraphicsMemoryAllocation.h
  52. WebGraphicsMemoryStats.h
  53. WebHTTPBody.h
  54. WebHTTPHeaderVisitor.h
  55. WebHTTPLoadInfo.h
  56. WebICECandidateDescriptor.h
  57. WebICEOptions.h
  58. WebImage.h
  59. WebImageLayer.h
  60. WebInputHandler.h
  61. WebInputHandlerClient.h
  62. WebIOSurfaceLayer.h
  63. WebLayer.h
  64. WebLayerScrollClient.h
  65. WebLayerTreeView.h
  66. WebLayerTreeViewClient.h
  67. WebLocalizedString.h
  68. WebMediaConstraints.h
  69. WebMediaHints.h
  70. WebMediaStreamCenter.h
  71. WebMediaStreamCenterClient.h
  72. WebMediaStreamComponent.h
  73. WebMediaStreamDescriptor.h
  74. WebMediaStreamSource.h
  75. WebMediaStreamSourcesRequest.h
  76. WebMessagePortChannel.h
  77. WebMessagePortChannelClient.h
  78. WebMimeRegistry.h
  79. WebNonCopyable.h
  80. WebPeerConnection00Handler.h
  81. WebPeerConnection00HandlerClient.h
  82. WebPeerConnectionHandler.h
  83. WebPeerConnectionHandlerClient.h
  84. WebPoint.h
  85. WebPrerender.h
  86. WebPrerenderingSupport.h
  87. WebPrivateOwnPtr.h
  88. WebPrivatePtr.h
  89. WebRect.h
  90. WebReferrerPolicy.h
  91. WebRenderingStats.h
  92. WebRTCConfiguration.h
  93. WebRTCDataChannel.h
  94. WebRTCICECandidate.h
  95. WebRTCPeerConnectionHandler.h
  96. WebRTCPeerConnectionHandlerClient.h
  97. WebRTCSessionDescription.h
  98. WebRTCSessionDescriptionRequest.h
  99. WebRTCStatsRequest.h
  100. WebRTCStatsResponse.h
  101. WebRTCVoidRequest.h
  102. WebScreenInfo.h
  103. WebScrollbar.h
  104. WebScrollbarLayer.h
  105. WebScrollbarThemeGeometry.h
  106. WebScrollbarThemePainter.h
  107. WebSessionDescriptionDescriptor.h
  108. WebSharedGraphicsContext3D.h
  109. WebSize.h
  110. WebSocketStreamError.h
  111. WebSocketStreamHandle.h
  112. WebSocketStreamHandleClient.h
  113. WebSolidColorLayer.h
  114. WebStorageArea.h
  115. WebStorageNamespace.h
  116. WebString.h
  117. WebThread.h
  118. WebThreadSafeData.h
  119. WebTransformAnimationCurve.h
  120. WebTransformationMatrix.h
  121. WebTransformKeyframe.h
  122. WebTransformOperations.h
  123. WebURL.h
  124. WebURLError.h
  125. WebURLLoader.h
  126. WebURLLoaderClient.h
  127. WebURLLoadTiming.h
  128. WebURLRequest.h
  129. WebURLResponse.h
  130. WebVector.h
  131. WebVideoFrame.h
  132. WebVideoFrameProvider.h
  133. WebVideoLayer.h
  134. WebWorkerRunLoop.h