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

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

Issue 453493002: Improve detection of touch events when hiding media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoHideControls
Patch Set: Revert Patch Set 8 Created 6 years, 3 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/PopupMenuTest.cpp ('k') | Source/web/tests/WebInputEventConversionTest.cpp » ('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 3291 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 request.setRequestContext(WebURLRequest::RequestContextDownload); 3302 request.setRequestContext(WebURLRequest::RequestContextDownload);
3303 m_page->deprecatedLocalMainFrame()->loader().client()->loadURLExternally( 3303 m_page->deprecatedLocalMainFrame()->loader().client()->loadURLExternally(
3304 request, NavigationPolicyDownloadTo, WebString()); 3304 request, NavigationPolicyDownloadTo, WebString());
3305 } 3305 }
3306 3306
3307 void WebViewImpl::dragSourceEndedAt( 3307 void WebViewImpl::dragSourceEndedAt(
3308 const WebPoint& clientPoint, 3308 const WebPoint& clientPoint,
3309 const WebPoint& screenPoint, 3309 const WebPoint& screenPoint,
3310 WebDragOperation operation) 3310 WebDragOperation operation)
3311 { 3311 {
3312 PlatformMouseEvent pme(clientPoint, 3312 PlatformMouseEvent pme(clientPoint, screenPoint, LeftButton, PlatformEvent:: MouseMoved,
3313 screenPoint, 3313 0, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishab le, 0);
3314 LeftButton, PlatformEvent::MouseMoved, 0, false, fals e, false,
3315 false, 0);
3316 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, 3314 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme,
3317 static_cast<DragOperation>(operation)); 3315 static_cast<DragOperation>(operation));
3318 } 3316 }
3319 3317
3320 void WebViewImpl::dragSourceSystemDragEnded() 3318 void WebViewImpl::dragSourceSystemDragEnded()
3321 { 3319 {
3322 // It's possible for us to get this callback while not doing a drag if 3320 // It's possible for us to get this callback while not doing a drag if
3323 // it's from a previous page that got unloaded. 3321 // it's from a previous page that got unloaded.
3324 if (m_doingDragAndDrop) { 3322 if (m_doingDragAndDrop) {
3325 m_page->dragController().dragEnded(); 3323 m_page->dragController().dragEnded();
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
4268 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4266 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4269 4267
4270 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4268 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4271 return false; 4269 return false;
4272 4270
4273 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4271 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4274 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4272 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4275 } 4273 }
4276 4274
4277 } // namespace blink 4275 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/PopupMenuTest.cpp ('k') | Source/web/tests/WebInputEventConversionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698