OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 bool SVGImageChromeClient::isSVGImageChromeClient() const { | 50 bool SVGImageChromeClient::isSVGImageChromeClient() const { |
51 return true; | 51 return true; |
52 } | 52 } |
53 | 53 |
54 void SVGImageChromeClient::chromeDestroyed() { | 54 void SVGImageChromeClient::chromeDestroyed() { |
55 m_image = nullptr; | 55 m_image = nullptr; |
56 } | 56 } |
57 | 57 |
58 void SVGImageChromeClient::invalidateRect(const IntRect& r) { | 58 void SVGImageChromeClient::invalidateRect(const IntRect& r) { |
59 // If m_image->m_page is null, we're being destructed, don't fire changedInRec
t() in that case. | 59 // If m_image->m_page is null, we're being destructed, don't fire |
| 60 // changedInRect() in that case. |
60 if (m_image && m_image->getImageObserver() && m_image->m_page) | 61 if (m_image && m_image->getImageObserver() && m_image->m_page) |
61 m_image->getImageObserver()->changedInRect(m_image, r); | 62 m_image->getImageObserver()->changedInRect(m_image, r); |
62 } | 63 } |
63 | 64 |
64 void SVGImageChromeClient::suspendAnimation() { | 65 void SVGImageChromeClient::suspendAnimation() { |
65 if (m_image->hasAnimations()) { | 66 if (m_image->hasAnimations()) { |
66 m_timelineState = SuspendedWithAnimationPending; | 67 m_timelineState = SuspendedWithAnimationPending; |
67 } else { | 68 } else { |
68 // Preserve SuspendedWithAnimationPending if set. | 69 // Preserve SuspendedWithAnimationPending if set. |
69 m_timelineState = std::max(m_timelineState, Suspended); | 70 m_timelineState = std::max(m_timelineState, Suspended); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // | 117 // |
117 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid | 118 // TODO(Oilpan): move (SVG)Image to the Oilpan heap, and avoid |
118 // this explicit lifetime check. | 119 // this explicit lifetime check. |
119 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) | 120 if (ThreadHeap::willObjectBeLazilySwept(m_image->getImageObserver())) |
120 return; | 121 return; |
121 | 122 |
122 m_image->serviceAnimations(monotonicallyIncreasingTime()); | 123 m_image->serviceAnimations(monotonicallyIncreasingTime()); |
123 } | 124 } |
124 | 125 |
125 } // namespace blink | 126 } // namespace blink |
OLD | NEW |