| OLD | NEW |
| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 // SVG Images will always synthesize a viewBox, if it's not available, and | 677 // SVG Images will always synthesize a viewBox, if it's not available, and |
| 678 // thus never see scrollbars. | 678 // thus never see scrollbars. |
| 679 frame->View()->SetCanHaveScrollbars(false); | 679 frame->View()->SetCanHaveScrollbars(false); |
| 680 // SVG Images are transparent. | 680 // SVG Images are transparent. |
| 681 frame->View()->SetBaseBackgroundColor(Color::kTransparent); | 681 frame->View()->SetBaseBackgroundColor(Color::kTransparent); |
| 682 | 682 |
| 683 page_ = page; | 683 page_ = page; |
| 684 | 684 |
| 685 TRACE_EVENT0("blink", "SVGImage::dataChanged::load"); | 685 TRACE_EVENT0("blink", "SVGImage::dataChanged::load"); |
| 686 loader.Load(FrameLoadRequest( | 686 loader.Load(FrameLoadRequest( |
| 687 0, BlankURL(), | 687 0, ResourceRequest(BlankURL()), |
| 688 SubstituteData(Data(), AtomicString("image/svg+xml"), | 688 SubstituteData(Data(), AtomicString("image/svg+xml"), |
| 689 AtomicString("UTF-8"), KURL(), kForceSynchronousLoad))); | 689 AtomicString("UTF-8"), KURL(), kForceSynchronousLoad))); |
| 690 | 690 |
| 691 // Set the concrete object size before a container size is available. | 691 // Set the concrete object size before a container size is available. |
| 692 intrinsic_size_ = RoundedIntSize(ConcreteObjectSize(FloatSize( | 692 intrinsic_size_ = RoundedIntSize(ConcreteObjectSize(FloatSize( |
| 693 LayoutReplaced::kDefaultWidth, LayoutReplaced::kDefaultHeight))); | 693 LayoutReplaced::kDefaultWidth, LayoutReplaced::kDefaultHeight))); |
| 694 } | 694 } |
| 695 | 695 |
| 696 return page_ ? kSizeAvailable : kSizeUnavailable; | 696 return page_ ? kSizeAvailable : kSizeUnavailable; |
| 697 } | 697 } |
| 698 | 698 |
| 699 String SVGImage::FilenameExtension() const { | 699 String SVGImage::FilenameExtension() const { |
| 700 return "svg"; | 700 return "svg"; |
| 701 } | 701 } |
| 702 | 702 |
| 703 } // namespace blink | 703 } // namespace blink |
| OLD | NEW |