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

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

Issue 132233010: [SVG] SVGAnimatedRect migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebsaed Created 6 years, 11 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/SVGZoomEvent.cpp ('k') | Source/core/svg/properties/NewSVGAnimatedProperty.h » ('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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 Frame* frame = m_page->mainFrame(); 320 Frame* frame = m_page->mainFrame();
321 SVGSVGElement* rootElement = toSVGDocument(frame->document())->rootElement() ; 321 SVGSVGElement* rootElement = toSVGDocument(frame->document())->rootElement() ;
322 if (!rootElement) 322 if (!rootElement)
323 return; 323 return;
324 324
325 intrinsicWidth = rootElement->intrinsicWidth(); 325 intrinsicWidth = rootElement->intrinsicWidth();
326 intrinsicHeight = rootElement->intrinsicHeight(); 326 intrinsicHeight = rootElement->intrinsicHeight();
327 if (rootElement->preserveAspectRatioCurrentValue().align() == SVGPreserveAsp ectRatio::SVG_PRESERVEASPECTRATIO_NONE) 327 if (rootElement->preserveAspectRatioCurrentValue().align() == SVGPreserveAsp ectRatio::SVG_PRESERVEASPECTRATIO_NONE)
328 return; 328 return;
329 329
330 intrinsicRatio = rootElement->viewBoxCurrentValue().size(); 330 intrinsicRatio = rootElement->viewBox()->currentValue()->value().size();
331 if (intrinsicRatio.isEmpty() && intrinsicWidth.isFixed() && intrinsicHeight. isFixed()) 331 if (intrinsicRatio.isEmpty() && intrinsicWidth.isFixed() && intrinsicHeight. isFixed())
332 intrinsicRatio = FloatSize(floatValueForLength(intrinsicWidth, 0), float ValueForLength(intrinsicHeight, 0)); 332 intrinsicRatio = FloatSize(floatValueForLength(intrinsicWidth, 0), float ValueForLength(intrinsicHeight, 0));
333 } 333 }
334 334
335 // FIXME: support catchUpIfNecessary. 335 // FIXME: support catchUpIfNecessary.
336 void SVGImage::startAnimation(bool /* catchUpIfNecessary */) 336 void SVGImage::startAnimation(bool /* catchUpIfNecessary */)
337 { 337 {
338 if (!m_page) 338 if (!m_page)
339 return; 339 return;
340 Frame* frame = m_page->mainFrame(); 340 Frame* frame = m_page->mainFrame();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 return m_page; 407 return m_page;
408 } 408 }
409 409
410 String SVGImage::filenameExtension() const 410 String SVGImage::filenameExtension() const
411 { 411 {
412 return "svg"; 412 return "svg";
413 } 413 }
414 414
415 } 415 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGZoomEvent.cpp ('k') | Source/core/svg/properties/NewSVGAnimatedProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698