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

Unified Diff: Source/core/rendering/svg/RenderSVGRoot.cpp

Issue 22955006: Chrome::client() should return a ChromeClient reference. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGRoot.cpp
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp
index 3e63935b13d1cc7bfd47d01161016b5e70a647fc..47c86deaeba8572b234d5f57f70299056a4f39b7 100644
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp
@@ -113,19 +113,10 @@ bool RenderSVGRoot::isEmbeddedThroughSVGImage() const
if (!node())
return false;
- Frame* frame = node()->document()->frame();
- if (!frame)
- return false;
-
// Test whether we're embedded through an img.
- if (!frame->page())
- return false;
-
- ChromeClient* chromeClient = frame->page()->chrome().client();
- if (!chromeClient || !chromeClient->isSVGImageChromeClient())
- return false;
-
- return true;
+ if (Page* page = node()->document()->page())
+ return page->chrome().client().isSVGImageChromeClient();
+ return false;
}
bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698