Changeset 57969 in webkit
- Timestamp:
- Apr 21, 2010 5:22:57 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57967 r57969 1 2010-04-21 Avi Drissman <avi@chromium.org> 2 3 Reviewed by Simon Fraser. 4 5 JPG images fail to print in Chromium 6 https://bugs.webkit.org/show_bug.cgi?id=37796 7 8 Image sources of JPG data with final=false fail to draw into PDF contexts even if later updated (<rdar://problem/7874035>). Therefore, destroy and re-create the image source when the final data arrives. 9 10 * platform/graphics/cg/ImageSourceCG.cpp: 11 (WebCore::ImageSource::setData): 12 1 13 2010-04-21 Marcus Bulach <bulach@chromium.org> 2 14 -
trunk/WebCore/platform/graphics/cg/ImageSourceCG.cpp
r55169 r57969 120 120 void ImageSource::setData(SharedBuffer* data, bool allDataReceived) 121 121 { 122 #if PLATFORM(MAC) 122 123 if (!m_decoder) 123 m_decoder = CGImageSourceCreateIncremental(NULL); 124 #if PLATFORM(MAC) 124 m_decoder = CGImageSourceCreateIncremental(0); 125 125 // On Mac the NSData inside the SharedBuffer can be secretly appended to without the SharedBuffer's knowledge. We use SharedBuffer's ability 126 126 // to wrap itself inside CFData to get around this, ensuring that ImageIO is really looking at the SharedBuffer. … … 128 128 CGImageSourceUpdateData(m_decoder, cfData.get(), allDataReceived); 129 129 #else 130 if (!m_decoder) { 131 m_decoder = CGImageSourceCreateIncremental(0); 132 } else if (allDataReceived) { 133 // 10.6 bug workaround: image sources with final=false fail to draw into PDF contexts, so re-create image source 134 // when data is complete. <rdar://problem/7874035> (<http://openradar.appspot.com/7874035>) 135 CFRelease(m_decoder); 136 m_decoder = CGImageSourceCreateIncremental(0); 137 } 130 138 // Create a CGDataProvider to wrap the SharedBuffer. 131 139 data->ref();
Note: See TracChangeset
for help on using the changeset viewer.