Chromium Code Reviews| 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1050 m_client->notifyAnimationStarted(this, monotonicTime); | 1050 m_client->notifyAnimationStarted(this, monotonicTime); |
| 1051 } | 1051 } |
| 1052 | 1052 |
| 1053 void GraphicsLayer::notifyAnimationFinished(double, WebCompositorAnimation::Targ etProperty) | 1053 void GraphicsLayer::notifyAnimationFinished(double, WebCompositorAnimation::Targ etProperty) |
| 1054 { | 1054 { |
| 1055 // Do nothing. | 1055 // Do nothing. |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 void GraphicsLayer::didScroll() | 1058 void GraphicsLayer::didScroll() |
| 1059 { | 1059 { |
| 1060 if (m_scrollableArea) | 1060 if (m_scrollableArea) { |
| 1061 m_scrollableArea->scrollToOffsetWithoutAnimation(m_scrollableArea->minim umScrollPosition() + toIntSize(m_layer->layer()->scrollPosition())); | 1061 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to DoubleSize(m_layer->layer()->scrollPositionDouble()); |
| 1062 m_scrollableArea->scrollToOffsetWithoutAnimation(toFloatPoint(newPositio n)); | |
|
Rick Byers
2014/10/04 00:04:24
FIXME to remove the 'toFloatPoint' (like all the o
Yufeng Shen (Slow to review)
2014/10/06 17:54:58
Done.
| |
| 1063 } | |
| 1062 } | 1064 } |
| 1063 | 1065 |
| 1064 } // namespace blink | 1066 } // namespace blink |
| 1065 | 1067 |
| 1066 #ifndef NDEBUG | 1068 #ifndef NDEBUG |
| 1067 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) | 1069 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) |
| 1068 { | 1070 { |
| 1069 if (!layer) | 1071 if (!layer) |
| 1070 return; | 1072 return; |
| 1071 | 1073 |
| 1072 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1074 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1073 fprintf(stderr, "%s\n", output.utf8().data()); | 1075 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1074 } | 1076 } |
| 1075 #endif | 1077 #endif |
| OLD | NEW |