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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 // of the image would be if we were drawing without clipping, and translate accordingly. | 279 // of the image would be if we were drawing without clipping, and translate accordingly. |
280 FloatSize topLeftOffset(srcRect.location().x() * scale.width(), srcRect.loca tion().y() * scale.height()); | 280 FloatSize topLeftOffset(srcRect.location().x() * scale.width(), srcRect.loca tion().y() * scale.height()); |
281 FloatPoint destOffset = dstRect.location() - topLeftOffset; | 281 FloatPoint destOffset = dstRect.location() - topLeftOffset; |
282 | 282 |
283 context->translate(destOffset.x(), destOffset.y()); | 283 context->translate(destOffset.x(), destOffset.y()); |
284 context->scale(scale.width(), scale.height()); | 284 context->scale(scale.width(), scale.height()); |
285 | 285 |
286 FrameView* view = frameView(); | 286 FrameView* view = frameView(); |
287 view->resize(containerSize()); | 287 view->resize(containerSize()); |
288 | 288 |
289 if (!m_url.isEmpty()) | 289 view->scrollToFragment(m_url); |
fs
2015/01/26 12:06:30
Maybe add a short note here as to why this is alwa
| |
290 view->scrollToFragment(m_url); | |
291 | 290 |
292 view->updateLayoutAndStyleForPainting(); | 291 view->updateLayoutAndStyleForPainting(); |
293 view->paint(context, enclosingIntRect(srcRect)); | 292 view->paint(context, enclosingIntRect(srcRect)); |
294 ASSERT(!view->needsLayout()); | 293 ASSERT(!view->needsLayout()); |
295 | 294 |
296 if (requiresTransparencyLayer) | 295 if (requiresTransparencyLayer) |
297 context->endLayer(); | 296 context->endLayer(); |
298 | 297 |
299 stateSaver.restore(); | 298 stateSaver.restore(); |
300 | 299 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 | 440 |
442 return m_page; | 441 return m_page; |
443 } | 442 } |
444 | 443 |
445 String SVGImage::filenameExtension() const | 444 String SVGImage::filenameExtension() const |
446 { | 445 { |
447 return "svg"; | 446 return "svg"; |
448 } | 447 } |
449 | 448 |
450 } | 449 } |
OLD | NEW |