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

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

Issue 20789004: Disable accelerated compositing for SVGImage content layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « LayoutTests/svg/custom/svg-image-layers-crash-expected.txt ('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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // FIXME: If this SVG ends up loading itself, we might leak the world. 334 // FIXME: If this SVG ends up loading itself, we might leak the world.
335 // The Cache code does not know about CachedImages holding Frames and 335 // The Cache code does not know about CachedImages holding Frames and
336 // won't know to break the cycle. 336 // won't know to break the cycle.
337 // This will become an issue when SVGImage will be able to load other 337 // This will become an issue when SVGImage will be able to load other
338 // SVGImage objects, but we're safe now, because SVGImage can only be 338 // SVGImage objects, but we're safe now, because SVGImage can only be
339 // loaded by a top-level document. 339 // loaded by a top-level document.
340 m_page = adoptPtr(new Page(pageClients)); 340 m_page = adoptPtr(new Page(pageClients));
341 m_page->settings()->setMediaEnabled(false); 341 m_page->settings()->setMediaEnabled(false);
342 m_page->settings()->setScriptEnabled(false); 342 m_page->settings()->setScriptEnabled(false);
343 m_page->settings()->setPluginsEnabled(false); 343 m_page->settings()->setPluginsEnabled(false);
344 m_page->settings()->setAcceleratedCompositingEnabled(false);
344 345
345 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderCli ent); 346 RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderCli ent);
346 frame->setView(FrameView::create(frame.get())); 347 frame->setView(FrameView::create(frame.get()));
347 frame->init(); 348 frame->init();
348 FrameLoader* loader = frame->loader(); 349 FrameLoader* loader = frame->loader();
349 loader->forceSandboxFlags(SandboxAll); 350 loader->forceSandboxFlags(SandboxAll);
350 351
351 frame->view()->setScrollbarsSuppressed(true); 352 frame->view()->setScrollbarsSuppressed(true);
352 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars. 353 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars.
353 frame->view()->setTransparent(true); // SVG Images are transparent. 354 frame->view()->setTransparent(true); // SVG Images are transparent.
354 355
355 ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have be en created by frame->init(). 356 ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have be en created by frame->init().
356 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("i mage/svg+xml", "UTF-8"); 357 DocumentWriter* writer = loader->activeDocumentLoader()->beginWriting("i mage/svg+xml", "UTF-8");
357 writer->addData(data()->data(), data()->size()); 358 writer->addData(data()->data(), data()->size());
358 loader->activeDocumentLoader()->endWriting(writer); 359 loader->activeDocumentLoader()->endWriting(writer);
359 // Set the intrinsic size before a container size is available. 360 // Set the intrinsic size before a container size is available.
360 m_intrinsicSize = containerSize(); 361 m_intrinsicSize = containerSize();
361 } 362 }
362 363
363 return m_page; 364 return m_page;
364 } 365 }
365 366
366 String SVGImage::filenameExtension() const 367 String SVGImage::filenameExtension() const
367 { 368 {
368 return "svg"; 369 return "svg";
369 } 370 }
370 371
371 } 372 }
372 373
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/svg-image-layers-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698