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

Side by Side Diff: Source/core/frame/PinchViewport.cpp

Issue 1167503002: Remove obsolete pinch-zoom related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix for broken SVG layout test Created 5 years, 6 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 | « no previous file | Source/web/WebViewImpl.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void PinchViewport::setScaleAndLocation(float scale, const FloatPoint& location) 191 void PinchViewport::setScaleAndLocation(float scale, const FloatPoint& location)
192 { 192 {
193 bool valuesChanged = false; 193 bool valuesChanged = false;
194 194
195 if (scale != m_scale) { 195 if (scale != m_scale) {
196 m_scale = scale; 196 m_scale = scale;
197 valuesChanged = true; 197 valuesChanged = true;
198 frameHost().chrome().client().pageScaleFactorChanged(); 198 frameHost().chrome().client().pageScaleFactorChanged();
199 } 199 }
200 200
201 // Old-style pinch sets scale here but we shouldn't call into the
202 // location code below. Can be removed when there's no old-style pinch.
203 // FIXME(bokan): Remove when cleaning up old pinch code.
204 if (!m_innerViewportScrollLayer) {
205 if (valuesChanged)
206 mainFrame()->loader().saveScrollState();
207
208 return;
209 }
210
211 FloatPoint clampedOffset(clampOffsetToBoundaries(location)); 201 FloatPoint clampedOffset(clampOffsetToBoundaries(location));
212 202
213 if (clampedOffset != m_offset) { 203 if (clampedOffset != m_offset) {
214 m_offset = clampedOffset; 204 m_offset = clampedOffset;
215 scrollAnimator()->setCurrentPosition(m_offset); 205 scrollAnimator()->setCurrentPosition(m_offset);
216 206
217 ScrollingCoordinator* coordinator = frameHost().page().scrollingCoordina tor(); 207 // SVG runs with accelerated compositing disabled so no ScrollingCoordin ator.
218 ASSERT(coordinator); 208 if (ScrollingCoordinator* coordinator = frameHost().page().scrollingCoor dinator())
219 coordinator->scrollableAreaScrollLayerDidChange(this); 209 coordinator->scrollableAreaScrollLayerDidChange(this);
220 210
221 Document* document = mainFrame()->document(); 211 Document* document = mainFrame()->document();
222 document->enqueueScrollEventForNode(document); 212 document->enqueueScrollEventForNode(document);
223 213
224 mainFrame()->loader().client()->didChangeScrollOffset(); 214 mainFrame()->loader().client()->didChangeScrollOffset();
225 InspectorInstrumentation::didScroll(mainFrame()); 215 InspectorInstrumentation::didScroll(mainFrame());
226 valuesChanged = true; 216 valuesChanged = true;
227 } 217 }
228 218
229 if (!valuesChanged) 219 if (!valuesChanged)
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } else if (graphicsLayer == m_rootTransformLayer) { 654 } else if (graphicsLayer == m_rootTransformLayer) {
665 name = "Root Transform Layer"; 655 name = "Root Transform Layer";
666 } else { 656 } else {
667 ASSERT_NOT_REACHED(); 657 ASSERT_NOT_REACHED();
668 } 658 }
669 659
670 return name; 660 return name;
671 } 661 }
672 662
673 } // namespace blink 663 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698