| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 StringBuilder result; | 44 StringBuilder result; |
| 45 result.appendLiteral("-webkit-canvas("); | 45 result.appendLiteral("-webkit-canvas("); |
| 46 result.append(m_name); | 46 result.append(m_name); |
| 47 result.append(')'); | 47 result.append(')'); |
| 48 return result.toString(); | 48 return result.toString(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void CSSCanvasValue::canvasChanged(HTMLCanvasElement*, const FloatRect& changedR
ect) | 51 void CSSCanvasValue::canvasChanged(HTMLCanvasElement*, const FloatRect& changedR
ect) |
| 52 { | 52 { |
| 53 IntRect imageChangeRect = enclosingIntRect(changedRect); | 53 IntRect imageChangeRect = enclosingIntRect(changedRect); |
| 54 RenderObjectSizeCountMap::const_iterator end = clients().end(); | 54 for (const auto& curr : clients()) |
| 55 for (RenderObjectSizeCountMap::const_iterator curr = clients().begin(); curr
!= end; ++curr) | 55 const_cast<RenderObject*>(curr.key)->imageChanged(static_cast<WrappedIma
gePtr>(this), &imageChangeRect); |
| 56 const_cast<RenderObject*>(curr->key)->imageChanged(static_cast<WrappedIm
agePtr>(this), &imageChangeRect); | |
| 57 } | 56 } |
| 58 | 57 |
| 59 void CSSCanvasValue::canvasResized(HTMLCanvasElement*) | 58 void CSSCanvasValue::canvasResized(HTMLCanvasElement*) |
| 60 { | 59 { |
| 61 RenderObjectSizeCountMap::const_iterator end = clients().end(); | 60 for (const auto& curr : clients()) |
| 62 for (RenderObjectSizeCountMap::const_iterator curr = clients().begin(); curr
!= end; ++curr) | 61 const_cast<RenderObject*>(curr.key)->imageChanged(static_cast<WrappedIma
gePtr>(this)); |
| 63 const_cast<RenderObject*>(curr->key)->imageChanged(static_cast<WrappedIm
agePtr>(this)); | |
| 64 } | 62 } |
| 65 | 63 |
| 66 #if !ENABLE(OILPAN) | 64 #if !ENABLE(OILPAN) |
| 67 void CSSCanvasValue::canvasDestroyed(HTMLCanvasElement* element) | 65 void CSSCanvasValue::canvasDestroyed(HTMLCanvasElement* element) |
| 68 { | 66 { |
| 69 ASSERT_UNUSED(element, element == m_element); | 67 ASSERT_UNUSED(element, element == m_element); |
| 70 m_element = nullptr; | 68 m_element = nullptr; |
| 71 } | 69 } |
| 72 #endif | 70 #endif |
| 73 | 71 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 102 } | 100 } |
| 103 | 101 |
| 104 void CSSCanvasValue::traceAfterDispatch(Visitor* visitor) | 102 void CSSCanvasValue::traceAfterDispatch(Visitor* visitor) |
| 105 { | 103 { |
| 106 visitor->trace(m_canvasObserver); | 104 visitor->trace(m_canvasObserver); |
| 107 visitor->trace(m_element); | 105 visitor->trace(m_element); |
| 108 CSSImageGeneratorValue::traceAfterDispatch(visitor); | 106 CSSImageGeneratorValue::traceAfterDispatch(visitor); |
| 109 } | 107 } |
| 110 | 108 |
| 111 } // namespace blink | 109 } // namespace blink |
| OLD | NEW |