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

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

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: comments Created 4 years 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 if (getImageObserver()->shouldPauseAnimation(this)) { 477 if (getImageObserver()->shouldPauseAnimation(this)) {
478 stopAnimation(); 478 stopAnimation();
479 return; 479 return;
480 } 480 }
481 481
482 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG 482 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG
483 // images can't have any so we assert there's no script. 483 // images can't have any so we assert there's no script.
484 ScriptForbiddenScope forbidScript; 484 ScriptForbiddenScope forbidScript;
485 485
486 // The calls below may trigger GCs, so set up the required persistent 486 // The calls below may trigger GCs, so set up the required persistent
487 // reference on the ImageResource which owns this SVGImage. By transitivity, 487 // reference on the ImageResourceContent which owns this SVGImage. By
488 // that will keep the associated SVGImageChromeClient object alive. 488 // transitivity, that will keep the associated SVGImageChromeClient object
489 // alive.
489 Persistent<ImageObserver> protect(getImageObserver()); 490 Persistent<ImageObserver> protect(getImageObserver());
490 m_page->animator().serviceScriptedAnimations(monotonicAnimationStartTime); 491 m_page->animator().serviceScriptedAnimations(monotonicAnimationStartTime);
491 // Do *not* update the paint phase. It's critical to paint only when 492 // Do *not* update the paint phase. It's critical to paint only when
492 // actually generating painted output, not only for performance reasons, 493 // actually generating painted output, not only for performance reasons,
493 // but to preserve correct coherence of the cache of the output with 494 // but to preserve correct coherence of the cache of the output with
494 // the needsRepaint bits of the PaintLayers in the image. 495 // the needsRepaint bits of the PaintLayers in the image.
495 toLocalFrame(m_page->mainFrame()) 496 toLocalFrame(m_page->mainFrame())
496 ->view() 497 ->view()
497 ->updateAllLifecyclePhasesExceptPaint(); 498 ->updateAllLifecyclePhasesExceptPaint();
498 } 499 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 620 }
620 621
621 return m_page ? SizeAvailable : SizeUnavailable; 622 return m_page ? SizeAvailable : SizeUnavailable;
622 } 623 }
623 624
624 String SVGImage::filenameExtension() const { 625 String SVGImage::filenameExtension() const {
625 return "svg"; 626 return "svg";
626 } 627 }
627 628
628 } // namespace blink 629 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698