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

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

Issue 1113973002: Remove FrameView::m_inProgrammaticScroll and related plumbing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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/core/page/EventHandler.cpp ('k') | Source/web/tests/ProgrammaticScrollTest.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 4268 matching lines...) Expand 10 before | Expand all | Expand 10 after
4279 4279
4280 // FIXME(305811): Refactor for OOPI. 4280 // FIXME(305811): Refactor for OOPI.
4281 FrameView* frameView = page()->deprecatedLocalMainFrame()->view(); 4281 FrameView* frameView = page()->deprecatedLocalMainFrame()->view();
4282 if (!frameView) 4282 if (!frameView)
4283 return; 4283 return;
4284 4284
4285 ScrollableArea* scrollableArea = frameView->scrollableArea(); 4285 ScrollableArea* scrollableArea = frameView->scrollableArea();
4286 if (scrollableArea->scrollPositionDouble() == scrollPosition) 4286 if (scrollableArea->scrollPositionDouble() == scrollPosition)
4287 return; 4287 return;
4288 4288
4289 bool oldProgrammaticScroll = frameView->inProgrammaticScroll();
4290 frameView->setInProgrammaticScroll(programmaticScroll);
4291 scrollableArea->notifyScrollPositionChanged(scrollPosition); 4289 scrollableArea->notifyScrollPositionChanged(scrollPosition);
4292 frameView->setInProgrammaticScroll(oldProgrammaticScroll); 4290 if (!programmaticScroll)
4291 frameView->setWasScrolledByUser(true);
4293 } 4292 }
4294 4293
4295 void WebViewImpl::applyViewportDeltas( 4294 void WebViewImpl::applyViewportDeltas(
4296 const WebFloatSize& pinchViewportDelta, 4295 const WebFloatSize& pinchViewportDelta,
4297 const WebFloatSize& outerViewportDelta, 4296 const WebFloatSize& outerViewportDelta,
4298 const WebFloatSize& elasticOverscrollDelta, 4297 const WebFloatSize& elasticOverscrollDelta,
4299 float pageScaleDelta, 4298 float pageScaleDelta,
4300 float topControlsShownRatioDelta) 4299 float topControlsShownRatioDelta)
4301 { 4300 {
4302 if (!mainFrameImpl()) 4301 if (!mainFrameImpl())
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
4467 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4466 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4468 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4467 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4469 } 4468 }
4470 4469
4471 void WebViewImpl::forceNextWebGLContextCreationToFail() 4470 void WebViewImpl::forceNextWebGLContextCreationToFail()
4472 { 4471 {
4473 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4472 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4474 } 4473 }
4475 4474
4476 } // namespace blink 4475 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/web/tests/ProgrammaticScrollTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698