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

Side by Side Diff: Source/core/page/PageAnimator.cpp

Issue 302213002: Convert page-level classes to handle RemoteFrames from FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 years, 6 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
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 12 matching lines...) Expand all
23 , m_updatingLayoutAndStyleForPainting(false) 23 , m_updatingLayoutAndStyleForPainting(false)
24 { 24 {
25 } 25 }
26 26
27 void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime) 27 void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
28 { 28 {
29 m_animationFramePending = false; 29 m_animationFramePending = false;
30 TemporaryChange<bool> servicing(m_servicingAnimations, true); 30 TemporaryChange<bool> servicing(m_servicingAnimations, true);
31 31
32 WillBeHeapVector<RefPtrWillBeMember<Document> > documents; 32 WillBeHeapVector<RefPtrWillBeMember<Document> > documents;
33 for (RefPtr<LocalFrame> frame = m_page->mainFrame(); frame; frame = frame->t ree().traverseNext()) 33 for (RefPtr<Frame> frame = m_page->mainFrame(); frame; frame = frame->tree() .traverseNext()) {
34 documents.append(frame->document()); 34 if (frame->isLocalFrame())
35 documents.append(toLocalFrame(frame.get())->document());
36 }
35 37
36 for (size_t i = 0; i < documents.size(); ++i) { 38 for (size_t i = 0; i < documents.size(); ++i) {
37 if (documents[i]->frame()) { 39 if (documents[i]->frame()) {
38 documents[i]->view()->serviceScrollAnimations(); 40 documents[i]->view()->serviceScrollAnimations();
39 41
40 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[ i]->view()->scrollableAreas()) { 42 if (const FrameView::ScrollableAreaSet* scrollableAreas = documents[ i]->view()->scrollableAreas()) {
41 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas ->begin(); it != scrollableAreas->end(); ++it) 43 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas ->begin(); it != scrollableAreas->end(); ++it)
42 (*it)->serviceScrollAnimations(); 44 (*it)->serviceScrollAnimations();
43 } 45 }
44 } 46 }
(...skipping 29 matching lines...) Expand all
74 // setFrameRect(). This will be a quick operation for most frames, but the 76 // setFrameRect(). This will be a quick operation for most frames, but the
75 // NativeWindowWidgets will update a proper clipping region. 77 // NativeWindowWidgets will update a proper clipping region.
76 view->setFrameRect(view->frameRect()); 78 view->setFrameRect(view->frameRect());
77 79
78 // setFrameRect may have the side-effect of causing existing page layout to 80 // setFrameRect may have the side-effect of causing existing page layout to
79 // be invalidated, so layout needs to be called last. 81 // be invalidated, so layout needs to be called last.
80 view->updateLayoutAndStyleForPainting(); 82 view->updateLayoutAndStyleForPainting();
81 } 83 }
82 84
83 } 85 }
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/page/PageSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698