| 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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 linkHighlight->layer()->setLayerClient(this); | 1216 linkHighlight->layer()->setLayerClient(this); |
| 1217 updateChildList(); | 1217 updateChildList(); |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 void GraphicsLayer::removeLinkHighlight(LinkHighlight* linkHighlight) | 1220 void GraphicsLayer::removeLinkHighlight(LinkHighlight* linkHighlight) |
| 1221 { | 1221 { |
| 1222 m_linkHighlights.remove(m_linkHighlights.find(linkHighlight)); | 1222 m_linkHighlights.remove(m_linkHighlights.find(linkHighlight)); |
| 1223 updateChildList(); | 1223 updateChildList(); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isVie
wport) | 1226 void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isVis
ualViewport) |
| 1227 { | 1227 { |
| 1228 if (m_scrollableArea == scrollableArea) | 1228 if (m_scrollableArea == scrollableArea) |
| 1229 return; | 1229 return; |
| 1230 | 1230 |
| 1231 m_scrollableArea = scrollableArea; | 1231 m_scrollableArea = scrollableArea; |
| 1232 | 1232 |
| 1233 // Viewport scrolling may involve pinch zoom and gets routed through | 1233 // VisualViewport scrolling may involve pinch zoom and gets routed through |
| 1234 // WebViewImpl explicitly rather than via GraphicsLayer::didScroll. | 1234 // WebViewImpl explicitly rather than via GraphicsLayer::didScroll since it |
| 1235 if (isViewport) | 1235 // needs to be set in tandem with the page scale delta. |
| 1236 if (isVisualViewport) |
| 1236 m_layer->layer()->setScrollClient(0); | 1237 m_layer->layer()->setScrollClient(0); |
| 1237 else | 1238 else |
| 1238 m_layer->layer()->setScrollClient(this); | 1239 m_layer->layer()->setScrollClient(this); |
| 1239 } | 1240 } |
| 1240 | 1241 |
| 1241 void GraphicsLayer::didScroll() | 1242 void GraphicsLayer::didScroll() |
| 1242 { | 1243 { |
| 1243 if (m_scrollableArea) { | 1244 if (m_scrollableArea) { |
| 1244 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); | 1245 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); |
| 1245 | 1246 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1379 { | 1380 { |
| 1380 if (!layer) { | 1381 if (!layer) { |
| 1381 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1382 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1382 return; | 1383 return; |
| 1383 } | 1384 } |
| 1384 | 1385 |
| 1385 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1386 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1386 fprintf(stderr, "%s\n", output.utf8().data()); | 1387 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1387 } | 1388 } |
| 1388 #endif | 1389 #endif |
| OLD | NEW |