OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 #include "RenderFlowThread.h" | 79 #include "RenderFlowThread.h" |
80 #include "RenderInline.h" | 80 #include "RenderInline.h" |
81 #include "RenderMarquee.h" | 81 #include "RenderMarquee.h" |
82 #include "RenderReplica.h" | 82 #include "RenderReplica.h" |
83 #include "RenderScrollbar.h" | 83 #include "RenderScrollbar.h" |
84 #include "RenderScrollbarPart.h" | 84 #include "RenderScrollbarPart.h" |
85 #include "RenderTheme.h" | 85 #include "RenderTheme.h" |
86 #include "RenderTreeAsText.h" | 86 #include "RenderTreeAsText.h" |
87 #include "RenderView.h" | 87 #include "RenderView.h" |
88 #include "ScaleTransformOperation.h" | 88 #include "ScaleTransformOperation.h" |
| 89 #include "ScrollAnimator.h" |
89 #include "Scrollbar.h" | 90 #include "Scrollbar.h" |
90 #include "ScrollbarTheme.h" | 91 #include "ScrollbarTheme.h" |
91 #include "Settings.h" | 92 #include "Settings.h" |
92 #include "SourceGraphic.h" | 93 #include "SourceGraphic.h" |
93 #include "StylePropertySet.h" | 94 #include "StylePropertySet.h" |
94 #include "StyleResolver.h" | 95 #include "StyleResolver.h" |
95 #include "TextStream.h" | 96 #include "TextStream.h" |
96 #include "TransformationMatrix.h" | 97 #include "TransformationMatrix.h" |
97 #include "TranslateTransformOperation.h" | 98 #include "TranslateTransformOperation.h" |
98 #include <wtf/StdLibExtras.h> | 99 #include <wtf/StdLibExtras.h> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 if (!renderer->firstChild() && renderer->style()) { | 184 if (!renderer->firstChild() && renderer->style()) { |
184 m_visibleContentStatusDirty = false; | 185 m_visibleContentStatusDirty = false; |
185 m_hasVisibleContent = renderer->style()->visibility() == VISIBLE; | 186 m_hasVisibleContent = renderer->style()->visibility() == VISIBLE; |
186 } | 187 } |
187 | 188 |
188 Node* node = renderer->node(); | 189 Node* node = renderer->node(); |
189 if (node && node->isElementNode()) { | 190 if (node && node->isElementNode()) { |
190 // We save and restore only the scrollOffset as the other scroll values
are recalculated. | 191 // We save and restore only the scrollOffset as the other scroll values
are recalculated. |
191 Element* element = toElement(node); | 192 Element* element = toElement(node); |
192 m_scrollOffset = element->savedLayerScrollOffset(); | 193 m_scrollOffset = element->savedLayerScrollOffset(); |
| 194 if (!m_scrollOffset.isZero()) |
| 195 scrollAnimator()->setCurrentPosition(FloatPoint(m_scrollOffset.width
(), m_scrollOffset.height())); |
193 element->setSavedLayerScrollOffset(IntSize()); | 196 element->setSavedLayerScrollOffset(IntSize()); |
194 } | 197 } |
195 } | 198 } |
196 | 199 |
197 RenderLayer::~RenderLayer() | 200 RenderLayer::~RenderLayer() |
198 { | 201 { |
199 if (inResizeMode() && !renderer()->documentBeingDestroyed()) { | 202 if (inResizeMode() && !renderer()->documentBeingDestroyed()) { |
200 if (Frame* frame = renderer()->frame()) | 203 if (Frame* frame = renderer()->frame()) |
201 frame->eventHandler()->resizeLayerDestroyed(); | 204 frame->eventHandler()->resizeLayerDestroyed(); |
202 } | 205 } |
(...skipping 4832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5035 } | 5038 } |
5036 } | 5039 } |
5037 | 5040 |
5038 void showLayerTree(const WebCore::RenderObject* renderer) | 5041 void showLayerTree(const WebCore::RenderObject* renderer) |
5039 { | 5042 { |
5040 if (!renderer) | 5043 if (!renderer) |
5041 return; | 5044 return; |
5042 showLayerTree(renderer->enclosingLayer()); | 5045 showLayerTree(renderer->enclosingLayer()); |
5043 } | 5046 } |
5044 #endif | 5047 #endif |
OLD | NEW |