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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/svg/SVGUseElement.cpp ('k') | Source/core/svg/graphics/filters/SVGFEImage.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) 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (!usesContainerSize()) 136 if (!usesContainerSize())
137 return; 137 return;
138 138
139 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 139 SVGSVGElement* rootElement = svgRootElement(m_page.get());
140 if (!rootElement) 140 if (!rootElement)
141 return; 141 return;
142 142
143 FrameView* view = frameView(); 143 FrameView* view = frameView();
144 view->resize(this->containerSize()); 144 view->resize(this->containerSize());
145 145
146 LayoutSVGRoot* renderer = toLayoutSVGRoot(rootElement->renderer()); 146 LayoutSVGRoot* renderer = toLayoutSVGRoot(rootElement->layoutObject());
147 if (!renderer) 147 if (!renderer)
148 return; 148 return;
149 renderer->setContainerSize(size); 149 renderer->setContainerSize(size);
150 } 150 }
151 151
152 IntSize SVGImage::containerSize() const 152 IntSize SVGImage::containerSize() const
153 { 153 {
154 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 154 SVGSVGElement* rootElement = svgRootElement(m_page.get());
155 if (!rootElement) 155 if (!rootElement)
156 return IntSize(); 156 return IntSize();
157 157
158 LayoutSVGRoot* renderer = toLayoutSVGRoot(rootElement->renderer()); 158 LayoutSVGRoot* renderer = toLayoutSVGRoot(rootElement->layoutObject());
159 if (!renderer) 159 if (!renderer)
160 return IntSize(); 160 return IntSize();
161 161
162 // If a container size is available it has precedence. 162 // If a container size is available it has precedence.
163 IntSize containerSize = renderer->containerSize(); 163 IntSize containerSize = renderer->containerSize();
164 if (!containerSize.isEmpty()) 164 if (!containerSize.isEmpty())
165 return containerSize; 165 return containerSize;
166 166
167 // Assure that a container size is always given for a non-identity zoom leve l. 167 // Assure that a container size is always given for a non-identity zoom leve l.
168 ASSERT(renderer->style()->effectiveZoom() == 1); 168 ASSERT(renderer->style()->effectiveZoom() == 1);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // animations if preceded by calls to resetAnimation or stopAnimation 324 // animations if preceded by calls to resetAnimation or stopAnimation
325 // respectively. 325 // respectively.
326 startAnimation(); 326 startAnimation();
327 } 327 }
328 328
329 LayoutBox* SVGImage::embeddedContentBox() const 329 LayoutBox* SVGImage::embeddedContentBox() const
330 { 330 {
331 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 331 SVGSVGElement* rootElement = svgRootElement(m_page.get());
332 if (!rootElement) 332 if (!rootElement)
333 return 0; 333 return 0;
334 return toLayoutBox(rootElement->renderer()); 334 return toLayoutBox(rootElement->layoutObject());
335 } 335 }
336 336
337 FrameView* SVGImage::frameView() const 337 FrameView* SVGImage::frameView() const
338 { 338 {
339 if (!m_page) 339 if (!m_page)
340 return 0; 340 return 0;
341 341
342 return toLocalFrame(m_page->mainFrame())->view(); 342 return toLocalFrame(m_page->mainFrame())->view();
343 } 343 }
344 344
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 return m_page; 461 return m_page;
462 } 462 }
463 463
464 String SVGImage::filenameExtension() const 464 String SVGImage::filenameExtension() const
465 { 465 {
466 return "svg"; 466 return "svg";
467 } 467 }
468 468
469 } 469 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/graphics/filters/SVGFEImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698