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

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

Issue 14787005: Simply FrameLoaderStateMachine and FrameLoader::transitionToCommitted(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge to trunk for landing Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/ProgressTracker.cpp ('k') | no next file » | 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 m_page->settings()->setMediaEnabled(false); 339 m_page->settings()->setMediaEnabled(false);
340 m_page->settings()->setScriptEnabled(false); 340 m_page->settings()->setScriptEnabled(false);
341 m_page->settings()->setPluginsEnabled(false); 341 m_page->settings()->setPluginsEnabled(false);
342 342
343 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderCli ent); 343 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderCli ent);
344 frame->setView(FrameView::create(frame.get())); 344 frame->setView(FrameView::create(frame.get()));
345 frame->init(); 345 frame->init();
346 FrameLoader* loader = frame->loader(); 346 FrameLoader* loader = frame->loader();
347 loader->forceSandboxFlags(SandboxAll); 347 loader->forceSandboxFlags(SandboxAll);
348 348
349 frame->view()->setScrollbarsSuppressed(true);
349 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars. 350 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars.
350 frame->view()->setTransparent(true); // SVG Images are transparent. 351 frame->view()->setTransparent(true); // SVG Images are transparent.
351 352
352 ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have be en created by frame->init(). 353 ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have be en created by frame->init().
353 loader->activeDocumentLoader()->writer()->setMIMEType("image/svg+xml"); 354 loader->activeDocumentLoader()->writer()->setMIMEType("image/svg+xml");
354 loader->activeDocumentLoader()->writer()->begin(KURL()); // create the e mpty document 355 loader->activeDocumentLoader()->writer()->begin(KURL()); // create the e mpty document
355 loader->activeDocumentLoader()->writer()->addData(data()->data(), data() ->size()); 356 loader->activeDocumentLoader()->writer()->addData(data()->data(), data() ->size());
356 loader->activeDocumentLoader()->writer()->end(); 357 loader->activeDocumentLoader()->writer()->end();
357 358
358 // Set the intrinsic size before a container size is available. 359 // Set the intrinsic size before a container size is available.
(...skipping 12 matching lines...) Expand all
371 { 372 {
372 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou rceImage); 373 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou rceImage);
373 Image::reportMemoryUsage(memoryObjectInfo); 374 Image::reportMemoryUsage(memoryObjectInfo);
374 info.addMember(m_chromeClient, "chromeClient"); 375 info.addMember(m_chromeClient, "chromeClient");
375 info.addMember(m_page, "page"); 376 info.addMember(m_page, "page");
376 } 377 }
377 378
378 } 379 }
379 380
380 #endif // ENABLE(SVG) 381 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « Source/core/loader/ProgressTracker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698