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

Side by Side Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 199253002: Made PinchViewport a ScrollableArea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 1175
1176 void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isMai nFrame) 1176 void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isMai nFrame)
1177 { 1177 {
1178 if (m_scrollableArea == scrollableArea) 1178 if (m_scrollableArea == scrollableArea)
1179 return; 1179 return;
1180 1180
1181 m_scrollableArea = scrollableArea; 1181 m_scrollableArea = scrollableArea;
1182 1182
1183 // Main frame scrolling may involve pinch zoom and gets routed through 1183 // Main frame scrolling may involve pinch zoom and gets routed through
1184 // WebViewImpl explicitly rather than via GraphicsLayer::didScroll. 1184 // WebViewImpl explicitly rather than via GraphicsLayer::didScroll.
1185 // TODO(bokan): With pinch virtual viewport the special case will no
1186 // longer be needed, remove once old-style pinch is gone.
1185 if (isMainFrame) 1187 if (isMainFrame)
1186 m_layer->layer()->setScrollClient(0); 1188 m_layer->layer()->setScrollClient(0);
1187 else 1189 else
1188 m_layer->layer()->setScrollClient(this); 1190 m_layer->layer()->setScrollClient(this);
1189 } 1191 }
1190 1192
1191 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) 1193 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
1192 { 1194 {
1193 paintGraphicsLayerContents(context, clip); 1195 paintGraphicsLayerContents(context, clip);
1194 } 1196 }
(...skipping 21 matching lines...) Expand all
1216 #ifndef NDEBUG 1218 #ifndef NDEBUG
1217 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) 1219 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer)
1218 { 1220 {
1219 if (!layer) 1221 if (!layer)
1220 return; 1222 return;
1221 1223
1222 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); 1224 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo);
1223 fprintf(stderr, "%s\n", output.utf8().data()); 1225 fprintf(stderr, "%s\n", output.utf8().data());
1224 } 1226 }
1225 #endif 1227 #endif
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698