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

Unified Diff: content/renderer/render_widget.cc

Issue 1176353002: Showing Gloweffect correctly during fling on mainthread. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index c512d41fce1f9ef2586cbe2d416d3b84e793210e..06ddb9a862ecb62b4f8e1b3c152e643bb223d997 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -166,6 +166,11 @@ int64 GetEventLatencyMicros(const WebInputEvent& event, base::TimeTicks now) {
.ToInternalValue();
}
+// TODO(sataya.m): Remove this api once http://crbug.com/499743 is fixed.
+gfx::Vector2dF ToClientScrollIncrement(const blink::WebFloatSize& increment) {
jdduke (slow) 2015/06/12 14:53:16 Let's just inline this function and the comment, I
MuVen 2015/06/12 15:08:04 Done.
+ return gfx::Vector2dF(-increment.width, -increment.height);
+}
+
void LogInputEventLatencyUma(const WebInputEvent& event, base::TimeTicks now) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Event.AggregatedLatency.Renderer2",
@@ -2228,8 +2233,7 @@ void RenderWidget::didOverscroll(
accumulatedRootOverScroll.width, accumulatedRootOverScroll.height);
params.latest_overscroll_delta =
gfx::Vector2dF(unusedDelta.width, unusedDelta.height);
- params.current_fling_velocity =
- gfx::Vector2dF(velocity.width, velocity.height);
+ params.current_fling_velocity = ToClientScrollIncrement(velocity);
params.causal_event_viewport_point = gfx::PointF(position.x, position.y);
Send(new InputHostMsg_DidOverscroll(routing_id_, params));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698