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

Side by Side Diff: Source/web/WebInputEventConversion.cpp

Issue 893683003: Implement top controls show/hide functionality for main thread scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix hiding at the page bottom issue Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 break; 282 break;
283 default: 283 default:
284 ASSERT_NOT_REACHED(); 284 ASSERT_NOT_REACHED();
285 } 285 }
286 m_position = widget->convertFromContainingWindow(flooredIntPoint(convertHitP ointToWindow(widget, FloatPoint(e.x, e.y)))); 286 m_position = widget->convertFromContainingWindow(flooredIntPoint(convertHitP ointToWindow(widget, FloatPoint(e.x, e.y))));
287 m_globalPosition = IntPoint(e.globalX, e.globalY); 287 m_globalPosition = IntPoint(e.globalX, e.globalY);
288 m_timestamp = e.timeStampSeconds; 288 m_timestamp = e.timeStampSeconds;
289 m_modifiers = toPlatformEventModifiers(e.modifiers); 289 m_modifiers = toPlatformEventModifiers(e.modifiers);
290 } 290 }
291 291
292
293 PlatformGestureEventBuilder::PlatformGestureEventBuilder(Widget* widget, const W ebGestureEvent& e, float deltaX, float deltaY)
294 : PlatformGestureEventBuilder(widget, e)
295 {
296 if (m_type == PlatformEvent::GestureScrollUpdate) {
297 m_data.m_scrollUpdate.m_deltaX = deltaX;
298 m_data.m_scrollUpdate.m_deltaY = deltaY;
299 }
300 }
301
302
292 // MakePlatformKeyboardEvent -------------------------------------------------- 303 // MakePlatformKeyboardEvent --------------------------------------------------
293 304
294 inline PlatformEvent::Type toPlatformKeyboardEventType(WebInputEvent::Type type) 305 inline PlatformEvent::Type toPlatformKeyboardEventType(WebInputEvent::Type type)
295 { 306 {
296 switch (type) { 307 switch (type) {
297 case WebInputEvent::KeyUp: 308 case WebInputEvent::KeyUp:
298 return PlatformEvent::KeyUp; 309 return PlatformEvent::KeyUp;
299 case WebInputEvent::KeyDown: 310 case WebInputEvent::KeyDown:
300 return PlatformEvent::KeyDown; 311 return PlatformEvent::KeyDown;
301 case WebInputEvent::RawKeyDown: 312 case WebInputEvent::RawKeyDown:
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 modifiers = getWebInputModifiers(event); 819 modifiers = getWebInputModifiers(event);
809 820
810 globalX = event.screenX(); 821 globalX = event.screenX();
811 globalY = event.screenY(); 822 globalY = event.screenY();
812 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL ocation(), *layoutObject); 823 IntPoint localPoint = convertAbsoluteLocationForLayoutObject(event.absoluteL ocation(), *layoutObject);
813 x = localPoint.x(); 824 x = localPoint.x();
814 y = localPoint.y(); 825 y = localPoint.y();
815 } 826 }
816 827
817 } // namespace blink 828 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698