OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
8 * Copyright (C) 2010 Google Inc. All rights reserved. | 8 * Copyright (C) 2010 Google Inc. All rights reserved. |
9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
10 * | 10 * |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 context->clip(contentRect); | 177 context->clip(contentRect); |
178 } | 178 } |
179 | 179 |
180 paintIntoRect(context, paintRect); | 180 paintIntoRect(context, paintRect); |
181 | 181 |
182 if (clip) | 182 if (clip) |
183 context->restore(); | 183 context->restore(); |
184 } | 184 } |
185 } | 185 } |
186 | 186 |
187 void RenderImage::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) | |
188 { | |
189 RenderReplaced::paint(paintInfo, paintOffset); | |
190 | |
191 if (paintInfo.phase == PaintPhaseOutline) | |
192 paintAreaElementFocusRing(paintInfo); | |
193 } | |
194 | |
195 void RenderImage::paintAreaElementFocusRing(PaintInfo& paintInfo) | |
196 { | |
197 } | |
198 | |
199 void RenderImage::paintIntoRect(GraphicsContext* context, const LayoutRect& rect
) | 187 void RenderImage::paintIntoRect(GraphicsContext* context, const LayoutRect& rect
) |
200 { | 188 { |
201 IntRect alignedRect = pixelSnappedIntRect(rect); | 189 IntRect alignedRect = pixelSnappedIntRect(rect); |
202 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred() || alig
nedRect.width() <= 0 || alignedRect.height() <= 0) | 190 if (!m_imageResource->hasImage() || m_imageResource->errorOccurred() || alig
nedRect.width() <= 0 || alignedRect.height() <= 0) |
203 return; | 191 return; |
204 | 192 |
205 RefPtr<Image> img = m_imageResource->image(alignedRect.width(), alignedRect.
height()); | 193 RefPtr<Image> img = m_imageResource->image(alignedRect.width(), alignedRect.
height()); |
206 if (!img || img->isNull()) | 194 if (!img || img->isNull()) |
207 return; | 195 return; |
208 | 196 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 return; | 249 return; |
262 } | 250 } |
263 } | 251 } |
264 | 252 |
265 bool RenderImage::needsPreferredWidthsRecalculation() const | 253 bool RenderImage::needsPreferredWidthsRecalculation() const |
266 { | 254 { |
267 return RenderReplaced::needsPreferredWidthsRecalculation(); | 255 return RenderReplaced::needsPreferredWidthsRecalculation(); |
268 } | 256 } |
269 | 257 |
270 } // namespace blink | 258 } // namespace blink |
OLD | NEW |