| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // of the image would be if we were drawing without clipping, and translate
accordingly. | 268 // of the image would be if we were drawing without clipping, and translate
accordingly. |
| 269 FloatSize topLeftOffset(srcRect.location().x() * scale.width(), srcRect.loca
tion().y() * scale.height()); | 269 FloatSize topLeftOffset(srcRect.location().x() * scale.width(), srcRect.loca
tion().y() * scale.height()); |
| 270 FloatPoint destOffset = dstRect.location() - topLeftOffset; | 270 FloatPoint destOffset = dstRect.location() - topLeftOffset; |
| 271 | 271 |
| 272 context->translate(destOffset.x(), destOffset.y()); | 272 context->translate(destOffset.x(), destOffset.y()); |
| 273 context->scale(scale); | 273 context->scale(scale); |
| 274 | 274 |
| 275 FrameView* view = frameView(); | 275 FrameView* view = frameView(); |
| 276 view->resize(containerSize()); | 276 view->resize(containerSize()); |
| 277 | 277 |
| 278 if (!m_url.isEmpty()) |
| 279 view->scrollToFragment(m_url); |
| 280 |
| 278 if (view->needsLayout()) | 281 if (view->needsLayout()) |
| 279 view->layout(); | 282 view->layout(); |
| 280 | 283 |
| 281 view->paint(context, enclosingIntRect(srcRect)); | 284 view->paint(context, enclosingIntRect(srcRect)); |
| 282 ASSERT(!view->needsLayout()); | 285 ASSERT(!view->needsLayout()); |
| 283 | 286 |
| 284 if (requiresTransparencyLayer) | 287 if (requiresTransparencyLayer) |
| 285 context->endLayer(); | 288 context->endLayer(); |
| 286 | 289 |
| 287 stateSaver.restore(); | 290 stateSaver.restore(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 410 |
| 408 return m_page; | 411 return m_page; |
| 409 } | 412 } |
| 410 | 413 |
| 411 String SVGImage::filenameExtension() const | 414 String SVGImage::filenameExtension() const |
| 412 { | 415 { |
| 413 return "svg"; | 416 return "svg"; |
| 414 } | 417 } |
| 415 | 418 |
| 416 } | 419 } |
| OLD | NEW |