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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 m_client->notifyAnimationStarted(this, monotonicTime); | 1049 m_client->notifyAnimationStarted(this, monotonicTime); |
1050 } | 1050 } |
1051 | 1051 |
1052 void GraphicsLayer::notifyAnimationFinished(double, WebCompositorAnimation::Targ
etProperty) | 1052 void GraphicsLayer::notifyAnimationFinished(double, WebCompositorAnimation::Targ
etProperty) |
1053 { | 1053 { |
1054 // Do nothing. | 1054 // Do nothing. |
1055 } | 1055 } |
1056 | 1056 |
1057 void GraphicsLayer::didScroll() | 1057 void GraphicsLayer::didScroll() |
1058 { | 1058 { |
1059 if (m_scrollableArea) | 1059 if (m_scrollableArea) { |
1060 m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minim
umScrollPosition() + toIntSize(m_layer->layer()->scrollPosition())); | 1060 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); |
| 1061 // FIXME: Remove the toFloatPoint(). crbug.com/414283. |
| 1062 m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPositio
n)); |
| 1063 } |
1061 } | 1064 } |
1062 | 1065 |
1063 } // namespace blink | 1066 } // namespace blink |
1064 | 1067 |
1065 #ifndef NDEBUG | 1068 #ifndef NDEBUG |
1066 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1069 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
1067 { | 1070 { |
1068 if (!layer) | 1071 if (!layer) |
1069 return; | 1072 return; |
1070 | 1073 |
1071 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1074 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
1072 fprintf(stderr, "%s\n", output.utf8().data()); | 1075 fprintf(stderr, "%s\n", output.utf8().data()); |
1073 } | 1076 } |
1074 #endif | 1077 #endif |
OLD | NEW |