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

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

Issue 2121973002: Fallback to 300x150 instead of 0x0 size for SVG inside content() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp ('k') | 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars. 549 frame->view()->setCanHaveScrollbars(false); // SVG Images will always sy nthesize a viewBox, if it's not available, and thus never see scrollbars.
550 frame->view()->setTransparent(true); // SVG Images are transparent. 550 frame->view()->setTransparent(true); // SVG Images are transparent.
551 551
552 m_page = page; 552 m_page = page;
553 553
554 TRACE_EVENT0("blink", "SVGImage::dataChanged::load"); 554 TRACE_EVENT0("blink", "SVGImage::dataChanged::load");
555 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), Atomi cString("image/svg+xml"), 555 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), Atomi cString("image/svg+xml"),
556 AtomicString("UTF-8"), KURL(), ForceSynchronousLoad))); 556 AtomicString("UTF-8"), KURL(), ForceSynchronousLoad)));
557 557
558 // Set the concrete object size before a container size is available. 558 // Set the concrete object size before a container size is available.
559 m_intrinsicSize = roundedIntSize(concreteObjectSize(FloatSize(300, 150)) ); 559 m_intrinsicSize = roundedIntSize(concreteObjectSize(FloatSize(LayoutRepl aced::defaultWidth, LayoutReplaced::defaultHeight)));
560 } 560 }
561 561
562 return m_page; 562 return m_page;
563 } 563 }
564 564
565 String SVGImage::filenameExtension() const 565 String SVGImage::filenameExtension() const
566 { 566 {
567 return "svg"; 567 return "svg";
568 } 568 }
569 569
570 } // namespace blink 570 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698