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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.cpp

Issue 2723993002: Rename platform/Widget to platform/FrameViewBase in core. (Closed)
Patch Set: Created 3 years, 9 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 | « third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool havePendingAnimation = m_timelineState == SuspendedWithAnimationPending; 75 bool havePendingAnimation = m_timelineState == SuspendedWithAnimationPending;
76 m_timelineState = Running; 76 m_timelineState = Running;
77 77
78 // If an animation frame was pending/requested while animations were 78 // If an animation frame was pending/requested while animations were
79 // suspended, schedule a new animation frame. 79 // suspended, schedule a new animation frame.
80 if (!havePendingAnimation) 80 if (!havePendingAnimation)
81 return; 81 return;
82 scheduleAnimation(nullptr); 82 scheduleAnimation(nullptr);
83 } 83 }
84 84
85 void SVGImageChromeClient::scheduleAnimation(Widget*) { 85 void SVGImageChromeClient::scheduleAnimation(FrameViewBase*) {
86 // Because a single SVGImage can be shared by multiple pages, we can't key 86 // Because a single SVGImage can be shared by multiple pages, we can't key
87 // our svg image layout on the page's real animation frame. Therefore, we 87 // our svg image layout on the page's real animation frame. Therefore, we
88 // run this fake animation timer to trigger layout in SVGImages. The name, 88 // run this fake animation timer to trigger layout in SVGImages. The name,
89 // "animationTimer", is to match the new requestAnimationFrame-based layout 89 // "animationTimer", is to match the new requestAnimationFrame-based layout
90 // approach. 90 // approach.
91 if (m_animationTimer->isActive()) 91 if (m_animationTimer->isActive())
92 return; 92 return;
93 // Schedule the 'animation' ASAP if the image does not contain any 93 // Schedule the 'animation' ASAP if the image does not contain any
94 // animations, but prefer a fixed, jittery, frame-delay if there're any 94 // animations, but prefer a fixed, jittery, frame-delay if there're any
95 // animations. Checking for pending/active animations could be more 95 // animations. Checking for pending/active animations could be more
(...skipping 21 matching lines...) Expand all
117 // 117 //
118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid 118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid
119 // this explicit lifetime check. 119 // this explicit lifetime check.
120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) 120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver()))
121 return; 121 return;
122 122
123 m_image->serviceAnimations(monotonicallyIncreasingTime()); 123 m_image->serviceAnimations(monotonicallyIncreasingTime());
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/graphics/SVGImageChromeClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698