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

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

Issue 1500573003: Drop dead code path in SVGImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 static SVGSVGElement* svgRootElement(Page* page) 127 static SVGSVGElement* svgRootElement(Page* page)
128 { 128 {
129 if (!page) 129 if (!page)
130 return nullptr; 130 return nullptr;
131 LocalFrame* frame = toLocalFrame(page->mainFrame()); 131 LocalFrame* frame = toLocalFrame(page->mainFrame());
132 return frame->document()->accessSVGExtensions().rootElement(); 132 return frame->document()->accessSVGExtensions().rootElement();
133 } 133 }
134 134
135 void SVGImage::setContainerSize(const IntSize& size) 135 void SVGImage::setContainerSize(const IntSize& size)
136 { 136 {
137 if (!usesContainerSize())
138 return;
139
140 SVGSVGElement* rootElement = svgRootElement(m_page.get()); 137 SVGSVGElement* rootElement = svgRootElement(m_page.get());
141 if (!rootElement) 138 if (!rootElement)
142 return; 139 return;
143 140
144 FrameView* view = frameView(); 141 FrameView* view = frameView();
145 view->resize(this->containerSize()); 142 view->resize(this->containerSize());
146 143
147 LayoutSVGRoot* layoutObject = toLayoutSVGRoot(rootElement->layoutObject()); 144 LayoutSVGRoot* layoutObject = toLayoutSVGRoot(rootElement->layoutObject());
148 if (!layoutObject) 145 if (!layoutObject)
149 return; 146 return;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 504
508 return m_page; 505 return m_page;
509 } 506 }
510 507
511 String SVGImage::filenameExtension() const 508 String SVGImage::filenameExtension() const
512 { 509 {
513 return "svg"; 510 return "svg";
514 } 511 }
515 512
516 } 513 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698