Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: Source/core/svg/graphics/SVGImage.cpp

Issue 180973005: Respect SVG fragment identifiers in <img> src attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove include Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/svg/graphics/SVGImage.h ('k') | Source/core/svg/graphics/SVGImageCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/svg/graphics/SVGImage.h ('k') | Source/core/svg/graphics/SVGImageCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698