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

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

Issue 819953002: Mac: Update scrollbar size and input position during impl-overscroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Peure virtual Created 6 years 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/WebPluginScrollbarImpl.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 4289 matching lines...) Expand 10 before | Expand all | Expand 10 after
4300 4300
4301 void WebViewImpl::applyViewportDeltas( 4301 void WebViewImpl::applyViewportDeltas(
4302 const WebSize& pinchViewportDelta, 4302 const WebSize& pinchViewportDelta,
4303 const WebSize& mainFrameDelta, 4303 const WebSize& mainFrameDelta,
4304 const WebFloatSize& elasticOverscrollDelta, 4304 const WebFloatSize& elasticOverscrollDelta,
4305 float pageScaleDelta, 4305 float pageScaleDelta,
4306 float topControlsDelta) 4306 float topControlsDelta)
4307 { 4307 {
4308 ASSERT(pinchVirtualViewportEnabled()); 4308 ASSERT(pinchVirtualViewportEnabled());
4309 4309
4310 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4310 if (!mainFrameImpl())
4311 return;
4312 FrameView* frameView = mainFrameImpl()->frameView();
4313 if (!frameView)
4311 return; 4314 return;
4312 4315
4313 setTopControlsContentOffset(m_topControlsContentOffset + topControlsDelta); 4316 setTopControlsContentOffset(m_topControlsContentOffset + topControlsDelta);
4314 4317
4315 FloatPoint pinchViewportOffset = page()->frameHost().pinchViewport().visible Rect().location(); 4318 FloatPoint pinchViewportOffset = page()->frameHost().pinchViewport().visible Rect().location();
4316 pinchViewportOffset.move(pinchViewportDelta.width, pinchViewportDelta.height ); 4319 pinchViewportOffset.move(pinchViewportDelta.width, pinchViewportDelta.height );
4317 setPageScaleFactorAndLocation(pageScaleFactor() * pageScaleDelta, pinchViewp ortOffset); 4320 setPageScaleFactorAndLocation(pageScaleFactor() * pageScaleDelta, pinchViewp ortOffset);
4318 4321
4319 if (pageScaleDelta != 1) 4322 if (pageScaleDelta != 1)
4320 m_doubleTapZoomPending = false; 4323 m_doubleTapZoomPending = false;
4321 4324
4325 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO verscroll());
4326
4322 IntPoint mainFrameScrollOffset = IntPoint(mainFrame()->scrollOffset()); 4327 IntPoint mainFrameScrollOffset = IntPoint(mainFrame()->scrollOffset());
4323 mainFrameScrollOffset.move(mainFrameDelta.width, mainFrameDelta.height); 4328 mainFrameScrollOffset.move(mainFrameDelta.width, mainFrameDelta.height);
4324 updateMainFrameScrollPosition(mainFrameScrollOffset, false); 4329 updateMainFrameScrollPosition(mainFrameScrollOffset, false);
4325 } 4330 }
4326 4331
4327 void WebViewImpl::applyViewportDeltas(const WebSize& scrollDelta, float pageScal eDelta, float topControlsDelta) 4332 void WebViewImpl::applyViewportDeltas(const WebSize& scrollDelta, float pageScal eDelta, float topControlsDelta)
4328 { 4333 {
4329 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4334 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4330 return; 4335 return;
4331 4336
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
4502 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4507 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4503 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4508 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4504 } 4509 }
4505 4510
4506 void WebViewImpl::forceNextWebGLContextCreationToFail() 4511 void WebViewImpl::forceNextWebGLContextCreationToFail()
4507 { 4512 {
4508 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4513 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4509 } 4514 }
4510 4515
4511 } // namespace blink 4516 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebPluginScrollbarImpl.cpp ('k') | Source/web/tests/WebInputEventConversionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698