[chromium] Scroll deltas should be floats
https://bugs.webkit.org/show_bug.cgi?id=111465

Reviewed by James Robinson.

This converts the remaining scroll delta fields to floats so that
we no longer lose precision due to DIP conversion. The natural
type for deltas is WebFloatSize, which was missing, so I also created
that type based on the existing WebSize header.

Source/Platform:

* Platform.gypi:
* chromium/public/WebFloatSize.h: Added.
(WebKit):
(WebFloatSize):
(WebKit::WebFloatSize::isEmpty):
(WebKit::WebFloatSize::WebFloatSize):
(WebKit::WebFloatSize::operator=):
(WebKit::WebFloatSize::operator WebCore::FloatSize):
(WebKit::WebFloatSize::operator gfx::SizeF):
(WebKit::WebFloatSize::operator gfx::Vector2dF):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebGestureCurveTarget.h:
(WebKit::WebGestureCurveTarget::scrollBy):
(WebGestureCurveTarget):
* chromium/public/WebInputHandlerClient.h:
(WebKit::WebInputHandlerClient::scrollByIfPossible):
(WebInputHandlerClient):

Source/WebKit/chromium:

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
(WebKit::WebCompositorInputHandlerImpl::touchpadFlingScroll):
(WebKit::WebCompositorInputHandlerImpl::scrollBy):
* src/WebCompositorInputHandlerImpl.h:
(WebCompositorInputHandlerImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::scrollBy):
* src/WebViewImpl.h:
(WebViewImpl):
* tests/WebCompositorInputHandlerImplTest.cpp:
(MockWebInputHandlerClient):
(WebKit::TEST_F):


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