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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/core/svg/SVGAElement.cpp » ('j') | 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 isPercentageIntrinsicSize = true; 106 isPercentageIntrinsicSize = true;
107 intrinsicSize = FloatSize(intrinsicWidthAttribute.percent(), intrinsicHe ightAttribute.percent()); 107 intrinsicSize = FloatSize(intrinsicWidthAttribute.percent(), intrinsicHe ightAttribute.percent());
108 } 108 }
109 } 109 }
110 110
111 bool RenderSVGRoot::isEmbeddedThroughSVGImage() const 111 bool RenderSVGRoot::isEmbeddedThroughSVGImage() const
112 { 112 {
113 if (!node()) 113 if (!node())
114 return false; 114 return false;
115 115
116 Frame* frame = node()->document()->frame();
117 if (!frame)
118 return false;
119
120 // Test whether we're embedded through an img. 116 // Test whether we're embedded through an img.
121 if (!frame->page()) 117 if (Page* page = node()->document()->page())
122 return false; 118 return page->chrome().client().isSVGImageChromeClient();
123 119 return false;
124 ChromeClient* chromeClient = frame->page()->chrome().client();
125 if (!chromeClient || !chromeClient->isSVGImageChromeClient())
126 return false;
127
128 return true;
129 } 120 }
130 121
131 bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const 122 bool RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument() const
132 { 123 {
133 if (!node()) 124 if (!node())
134 return false; 125 return false;
135 126
136 Frame* frame = node()->document()->frame(); 127 Frame* frame = node()->document()->frame();
137 if (!frame) 128 if (!frame)
138 return false; 129 return false;
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 { 473 {
483 RenderObject* svgRoot = resource->parent(); 474 RenderObject* svgRoot = resource->parent();
484 while (svgRoot && !svgRoot->isSVGRoot()) 475 while (svgRoot && !svgRoot->isSVGRoot())
485 svgRoot = svgRoot->parent(); 476 svgRoot = svgRoot->parent();
486 if (!svgRoot) 477 if (!svgRoot)
487 return; 478 return;
488 toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource ); 479 toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource );
489 } 480 }
490 481
491 } 482 }
OLDNEW
« 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