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

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

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 frame->init(); 411 frame->init();
412 FrameLoader& loader = frame->loader(); 412 FrameLoader& loader = frame->loader();
413 loader.forceSandboxFlags(SandboxAll); 413 loader.forceSandboxFlags(SandboxAll);
414 414
415 frame->view()->setScrollbarsSuppressed(true); 415 frame->view()->setScrollbarsSuppressed(true);
416 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars. 416 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars.
417 frame->view()->setTransparent(true); // SVG Images are transparent. 417 frame->view()->setTransparent(true); // SVG Images are transparent.
418 418
419 m_page = page.release(); 419 m_page = page.release();
420 420
421 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), "imag e/svg+xml", "UTF-8", KURL(), ForceSynchronousLoad))); 421 ResourceRequest request = ResourceRequest(blankURL());
422 request.initializeForMainResource(frame->isMainFrame());
423 loader.load(FrameLoadRequest(0, request, SubstituteData(data(), "image/s vg+xml", "UTF-8", KURL(), ForceSynchronousLoad)));
422 // Set the intrinsic size before a container size is available. 424 // Set the intrinsic size before a container size is available.
423 m_intrinsicSize = containerSize(); 425 m_intrinsicSize = containerSize();
424 } 426 }
425 427
426 return m_page; 428 return m_page;
427 } 429 }
428 430
429 String SVGImage::filenameExtension() const 431 String SVGImage::filenameExtension() const
430 { 432 {
431 return "svg"; 433 return "svg";
432 } 434 }
433 435
434 } 436 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698