OLD | NEW |
---|---|
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 Loading... | |
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 | |
aelias_OOO_until_Jul13
2014/03/24 21:47:24
Could you make this conditional on the pinchVirtua
bokan
2014/03/24 23:36:30
The isMainFrame argument is conditional on that fl
aelias_OOO_until_Jul13
2014/03/25 00:05:48
Yes, I think that would make more sense. Since it
bokan
2014/03/25 00:54:42
It doesn't look like there's any hooks in Graphics
aelias_OOO_until_Jul13
2014/03/25 01:09:00
OK, whatever, the TODO is fine then. No big deal
| |
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 Loading... | |
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 |
OLD | NEW |