| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 #endif | 977 #endif |
| 978 | 978 |
| 979 bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(Frame
View* frameView) const | 979 bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(Frame
View* frameView) const |
| 980 { | 980 { |
| 981 const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects =
frameView->viewportConstrainedObjects(); | 981 const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects =
frameView->viewportConstrainedObjects(); |
| 982 if (!viewportConstrainedObjects) | 982 if (!viewportConstrainedObjects) |
| 983 return false; | 983 return false; |
| 984 | 984 |
| 985 for (const LayoutObject* layoutObject : *viewportConstrainedObjects) { | 985 for (const LayoutObject* layoutObject : *viewportConstrainedObjects) { |
| 986 ASSERT(layoutObject->isBoxModelObject() && layoutObject->hasLayer()); | 986 ASSERT(layoutObject->isBoxModelObject() && layoutObject->hasLayer()); |
| 987 ASSERT(layoutObject->style()->position() == FixedPosition); | 987 ASSERT(layoutObject->style()->position() == FixedPosition |
| 988 || layoutObject->style()->position() == StickyPosition); |
| 988 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); | 989 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); |
| 989 | 990 |
| 990 // Whether the Layer scrolls with the viewport is a tree-depenent | 991 // Whether the Layer scrolls with the viewport is a tree-depenent |
| 991 // property and our viewportConstrainedObjects collection is maintained | 992 // property and our viewportConstrainedObjects collection is maintained |
| 992 // with only LayoutObject-level information. | 993 // with only LayoutObject-level information. |
| 993 if (!layer->scrollsWithViewport()) | 994 if (!layer->scrollsWithViewport()) |
| 994 continue; | 995 continue; |
| 995 | 996 |
| 996 // If the whole subtree is invisible, there's no reason to scroll on | 997 // If the whole subtree is invisible, there's no reason to scroll on |
| 997 // the main thread because we don't need to generate invalidations | 998 // the main thread because we don't need to generate invalidations |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 { | 1092 { |
| 1092 if (m_programmaticScrollAnimatorTimeline) { | 1093 if (m_programmaticScrollAnimatorTimeline) { |
| 1093 ASSERT(m_page); | 1094 ASSERT(m_page); |
| 1094 ASSERT(m_page->mainFrame()->isLocalFrame()); | 1095 ASSERT(m_page->mainFrame()->isLocalFrame()); |
| 1095 m_page->chromeClient().detachCompositorAnimationTimeline(m_programmaticS
crollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame())); | 1096 m_page->chromeClient().detachCompositorAnimationTimeline(m_programmaticS
crollAnimatorTimeline.get(), toLocalFrame(m_page->mainFrame())); |
| 1096 m_programmaticScrollAnimatorTimeline.clear(); | 1097 m_programmaticScrollAnimatorTimeline.clear(); |
| 1097 } | 1098 } |
| 1098 } | 1099 } |
| 1099 | 1100 |
| 1100 } // namespace blink | 1101 } // namespace blink |
| OLD | NEW |