| 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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 linkHighlight->layer()->setWebLayerClient(this); | 1010 linkHighlight->layer()->setWebLayerClient(this); |
| 1011 updateChildList(); | 1011 updateChildList(); |
| 1012 } | 1012 } |
| 1013 | 1013 |
| 1014 void GraphicsLayer::removeLinkHighlight(LinkHighlightClient* linkHighlight) | 1014 void GraphicsLayer::removeLinkHighlight(LinkHighlightClient* linkHighlight) |
| 1015 { | 1015 { |
| 1016 m_linkHighlights.remove(m_linkHighlights.find(linkHighlight)); | 1016 m_linkHighlights.remove(m_linkHighlights.find(linkHighlight)); |
| 1017 updateChildList(); | 1017 updateChildList(); |
| 1018 } | 1018 } |
| 1019 | 1019 |
| 1020 void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isMai
nFrame) | 1020 void GraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea, bool isVie
wport) |
| 1021 { | 1021 { |
| 1022 if (m_scrollableArea == scrollableArea) | 1022 if (m_scrollableArea == scrollableArea) |
| 1023 return; | 1023 return; |
| 1024 | 1024 |
| 1025 m_scrollableArea = scrollableArea; | 1025 m_scrollableArea = scrollableArea; |
| 1026 | 1026 |
| 1027 // Main frame scrolling may involve pinch zoom and gets routed through | 1027 // Viewport scrolling may involve pinch zoom and gets routed through |
| 1028 // WebViewImpl explicitly rather than via GraphicsLayer::didScroll. | 1028 // WebViewImpl explicitly rather than via GraphicsLayer::didScroll. |
| 1029 // TODO(bokan): With pinch virtual viewport the special case will no | 1029 if (isViewport) |
| 1030 // longer be needed, remove once old-style pinch is gone. | |
| 1031 if (isMainFrame) | |
| 1032 m_layer->layer()->setScrollClient(0); | 1030 m_layer->layer()->setScrollClient(0); |
| 1033 else | 1031 else |
| 1034 m_layer->layer()->setScrollClient(this); | 1032 m_layer->layer()->setScrollClient(this); |
| 1035 } | 1033 } |
| 1036 | 1034 |
| 1037 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) | 1035 void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip) |
| 1038 { | 1036 { |
| 1039 paintGraphicsLayerContents(context, clip); | 1037 paintGraphicsLayerContents(context, clip); |
| 1040 } | 1038 } |
| 1041 | 1039 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1062 #ifndef NDEBUG | 1060 #ifndef NDEBUG |
| 1063 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1061 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
| 1064 { | 1062 { |
| 1065 if (!layer) | 1063 if (!layer) |
| 1066 return; | 1064 return; |
| 1067 | 1065 |
| 1068 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1066 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1069 fprintf(stderr, "%s\n", output.utf8().data()); | 1067 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1070 } | 1068 } |
| 1071 #endif | 1069 #endif |
| OLD | NEW |