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