Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: sky/engine/core/page/PageAnimator.cpp

Issue 646273006: Get rid of ScrollView. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/page/PageAnimator.h" 6 #include "core/page/PageAnimator.h"
7 7
8 #include "core/animation/DocumentAnimations.h" 8 #include "core/animation/DocumentAnimations.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 17 matching lines...) Expand all
28 m_animationFramePending = false; 28 m_animationFramePending = false;
29 TemporaryChange<bool> servicing(m_servicingAnimations, true); 29 TemporaryChange<bool> servicing(m_servicingAnimations, true);
30 30
31 WillBeHeapVector<RefPtrWillBeMember<Document> > documents; 31 WillBeHeapVector<RefPtrWillBeMember<Document> > documents;
32 documents.append(m_page->mainFrame()->document()); 32 documents.append(m_page->mainFrame()->document());
33 33
34 WTF_LOG(ScriptedAnimationController, "PageAnimator::serviceScriptedAnimation s: #documents = %d", 34 WTF_LOG(ScriptedAnimationController, "PageAnimator::serviceScriptedAnimation s: #documents = %d",
35 static_cast<int>(documents.size())); 35 static_cast<int>(documents.size()));
36 for (size_t i = 0; i < documents.size(); ++i) { 36 for (size_t i = 0; i < documents.size(); ++i) {
37 if (documents[i]->frame()) { 37 if (documents[i]->frame()) {
38 documents[i]->view()->serviceScrollAnimations(monotonicAnimationStar tTime);
39
40 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[ i]->view()->scrollableAreas()) { 38 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[ i]->view()->scrollableAreas()) {
41 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas ->begin(); it != scrollableAreas->end(); ++it) 39 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas ->begin(); it != scrollableAreas->end(); ++it)
42 (*it)->serviceScrollAnimations(monotonicAnimationStartTime); 40 (*it)->serviceScrollAnimations(monotonicAnimationStartTime);
43 } 41 }
44 } 42 }
45 } 43 }
46 44
47 for (size_t i = 0; i < documents.size(); ++i) 45 for (size_t i = 0; i < documents.size(); ++i)
48 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i] , monotonicAnimationStartTime); 46 DocumentAnimations::updateAnimationTimingForAnimationFrame(*documents[i] , monotonicAnimationStartTime);
49 47
(...skipping 22 matching lines...) Expand all
72 // setFrameRect(). This will be a quick operation for most frames, but the 70 // setFrameRect(). This will be a quick operation for most frames, but the
73 // NativeWindowWidgets will update a proper clipping region. 71 // NativeWindowWidgets will update a proper clipping region.
74 view->setFrameRect(view->frameRect()); 72 view->setFrameRect(view->frameRect());
75 73
76 // setFrameRect may have the side-effect of causing existing page layout to 74 // setFrameRect may have the side-effect of causing existing page layout to
77 // be invalidated, so layout needs to be called last. 75 // be invalidated, so layout needs to be called last.
78 view->updateLayoutAndStyleForPainting(); 76 view->updateLayoutAndStyleForPainting();
79 } 77 }
80 78
81 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698