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

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

Issue 217893004: Interface cleanup for WebGestureCurveTarget (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@input_fix_flingvel2
Patch Set: Rebase Created 6 years, 8 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
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/platform/WebGestureCurveTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 syntheticGestureEvent.globalY = m_globalPositionOnFlingStart.y; 590 syntheticGestureEvent.globalY = m_globalPositionOnFlingStart.y;
591 syntheticGestureEvent.modifiers = m_flingModifier; 591 syntheticGestureEvent.modifiers = m_flingModifier;
592 syntheticGestureEvent.sourceDevice = WebGestureEvent::Touchscreen; 592 syntheticGestureEvent.sourceDevice = WebGestureEvent::Touchscreen;
593 593
594 if (m_page && m_page->mainFrame() && m_page->mainFrame()->view()) 594 if (m_page && m_page->mainFrame() && m_page->mainFrame()->view())
595 return handleGestureEvent(syntheticGestureEvent); 595 return handleGestureEvent(syntheticGestureEvent);
596 } 596 }
597 return false; 597 return false;
598 } 598 }
599 599
600 void WebViewImpl::scrollBy(const WebFloatSize& delta)
601 {
602 scrollBy(delta, WebFloatSize());
603 }
604
605 bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event) 600 bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
606 { 601 {
607 bool eventSwallowed = false; 602 bool eventSwallowed = false;
608 bool eventCancelled = false; // for disambiguation 603 bool eventCancelled = false; // for disambiguation
609 604
610 // Special handling for slow-path fling gestures. 605 // Special handling for slow-path fling gestures.
611 switch (event.type) { 606 switch (event.type) {
612 case WebInputEvent::GestureFlingStart: { 607 case WebInputEvent::GestureFlingStart: {
613 if (mainFrameImpl()->frame()->eventHandler().isScrollbarHandlingGestures ()) 608 if (mainFrameImpl()->frame()->eventHandler().isScrollbarHandlingGestures ())
614 break; 609 break;
(...skipping 3366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3976 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3982 3977
3983 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3978 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3984 return false; 3979 return false;
3985 3980
3986 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3981 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3987 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3982 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3988 } 3983 }
3989 3984
3990 } // namespace blink 3985 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/platform/WebGestureCurveTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698