Changeset 157909 in webkit
- Timestamp:
- Oct 23, 2013 8:40:10 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r157904 r157909 1 2013-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Integrate css3-images image-orientation with existing EXIF support 4 https://bugs.webkit.org/show_bug.cgi?id=91566 5 6 Reviewed by Beth Dakin. 7 8 * fast/css/image-orientation/image-orientation-expected.txt: Fixed wrong description. 9 * fast/css/image-orientation/image-orientation.html: Remove a space. 10 1 11 2013-10-23 Roger Fong <roger_fong@apple.com> 2 12 -
trunk/LayoutTests/fast/css/image-orientation/image-orientation-expected.txt
r122895 r157909 1 Apply image- resolution property and check computed style.1 Apply image-orientation property and check computed style. 2 2 3 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 4 4 5 5 6 PASS p.style.cssText is "image-orientation: -360deg; 6 PASS p.style.cssText is "image-orientation: -360deg;" 7 7 PASS getComputedStyle(p).imageOrientation is "0deg" 8 PASS p.style.cssText is "image-orientation: -315deg; 8 PASS p.style.cssText is "image-orientation: -315deg;" 9 9 PASS getComputedStyle(p).imageOrientation is "0deg" 10 PASS p.style.cssText is "image-orientation: 0deg; 10 PASS p.style.cssText is "image-orientation: 0deg;" 11 11 PASS getComputedStyle(p).imageOrientation is "0deg" 12 PASS p.style.cssText is "image-orientation: 315deg; 12 PASS p.style.cssText is "image-orientation: 315deg;" 13 13 PASS getComputedStyle(p).imageOrientation is "0deg" 14 PASS p.style.cssText is "image-orientation: 360deg; 14 PASS p.style.cssText is "image-orientation: 360deg;" 15 15 PASS getComputedStyle(p).imageOrientation is "0deg" 16 PASS p.style.cssText is "image-orientation: -270deg; 16 PASS p.style.cssText is "image-orientation: -270deg;" 17 17 PASS getComputedStyle(p).imageOrientation is "90deg" 18 PASS p.style.cssText is "image-orientation: -225deg; 18 PASS p.style.cssText is "image-orientation: -225deg;" 19 19 PASS getComputedStyle(p).imageOrientation is "90deg" 20 PASS p.style.cssText is "image-orientation: 45deg; 20 PASS p.style.cssText is "image-orientation: 45deg;" 21 21 PASS getComputedStyle(p).imageOrientation is "90deg" 22 PASS p.style.cssText is "image-orientation: 90deg; 22 PASS p.style.cssText is "image-orientation: 90deg;" 23 23 PASS getComputedStyle(p).imageOrientation is "90deg" 24 PASS p.style.cssText is "image-orientation: -180deg; 24 PASS p.style.cssText is "image-orientation: -180deg;" 25 25 PASS getComputedStyle(p).imageOrientation is "180deg" 26 PASS p.style.cssText is "image-orientation: -135deg; 26 PASS p.style.cssText is "image-orientation: -135deg;" 27 27 PASS getComputedStyle(p).imageOrientation is "180deg" 28 PASS p.style.cssText is "image-orientation: 135deg; 28 PASS p.style.cssText is "image-orientation: 135deg;" 29 29 PASS getComputedStyle(p).imageOrientation is "180deg" 30 PASS p.style.cssText is "image-orientation: -180deg; 30 PASS p.style.cssText is "image-orientation: -180deg;" 31 31 PASS getComputedStyle(p).imageOrientation is "180deg" 32 PASS p.style.cssText is "image-orientation: -90deg; 32 PASS p.style.cssText is "image-orientation: -90deg;" 33 33 PASS getComputedStyle(p).imageOrientation is "270deg" 34 PASS p.style.cssText is "image-orientation: -45deg; 34 PASS p.style.cssText is "image-orientation: -45deg;" 35 35 PASS getComputedStyle(p).imageOrientation is "270deg" 36 PASS p.style.cssText is "image-orientation: 225deg; 36 PASS p.style.cssText is "image-orientation: 225deg;" 37 37 PASS getComputedStyle(p).imageOrientation is "270deg" 38 PASS p.style.cssText is "image-orientation: 270deg; 38 PASS p.style.cssText is "image-orientation: 270deg;" 39 39 PASS getComputedStyle(p).imageOrientation is "270deg" 40 40 PASS successfullyParsed is true -
trunk/LayoutTests/fast/css/image-orientation/image-orientation.html
r155410 r157909 6 6 <body> 7 7 <script> 8 description('Apply image- resolution property and check computed style.');8 description('Apply image-orientation property and check computed style.'); 9 9 10 10 var expectations = { … … 20 20 p.style.imageOrientation = ''; 21 21 p.style.imageOrientation = test; 22 shouldBe('p.style.cssText', '"image-orientation: ' + test + '; 22 shouldBe('p.style.cssText', '"image-orientation: ' + test + ';"'); 23 23 shouldBe('getComputedStyle(p).imageOrientation', '"' + expected + '"'); 24 24 }); -
trunk/Source/WebCore/ChangeLog
r157908 r157909 1 2013-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Integrate css3-images image-orientation with existing EXIF support 4 https://bugs.webkit.org/show_bug.cgi?id=91566 5 6 Reviewed by Beth Dakin. 7 8 Original patch by David Barr(davidbarr@chromium.org). 9 10 This patch passes an information of image orientation into existing EXIF support functions 11 (draw() functions of image classes mainly). We need to let the functions to know the information 12 in order to meet the image-orientation requirement. 13 14 Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation 15 The css3-images module specification is at last call. 16 17 Test: fast/css/image-orientation/image-orientation.html 18 Image orientation test is to check if incorrect rotation value can be fixed with correct orientation. 19 20 * loader/cache/CachedImage.cpp: 21 (WebCore::CachedImage::imageSizeForRenderer): 22 * page/DragController.cpp: 23 (WebCore::DragController::doImageDrag): 24 * page/Frame.cpp: 25 (WebCore::Frame::nodeImage): 26 * platform/graphics/BitmapImage.cpp: 27 (WebCore::BitmapImage::updateSize): 28 (WebCore::BitmapImage::sizeRespectingOrientation): 29 (WebCore::BitmapImage::drawPattern): 30 * platform/graphics/BitmapImage.h: 31 * platform/graphics/CrossfadeGeneratedImage.cpp: 32 (WebCore::CrossfadeGeneratedImage::draw): 33 * platform/graphics/CrossfadeGeneratedImage.h: 34 * platform/graphics/GeneratedImage.h: 35 * platform/graphics/GradientImage.cpp: 36 (WebCore::GradientImage::draw): 37 * platform/graphics/GradientImage.h: 38 * platform/graphics/Image.cpp: 39 (WebCore::Image::draw): 40 (WebCore::Image::drawTiled): 41 * platform/graphics/Image.h: 42 * platform/graphics/blackberry/ImageBlackBerry.cpp: 43 * platform/graphics/cairo/BitmapImageCairo.cpp: 44 (WebCore::BitmapImage::draw): 45 * platform/graphics/cg/BitmapImageCG.cpp: 46 * platform/graphics/cg/PDFDocumentImage.cpp: 47 (WebCore::PDFDocumentImage::draw): 48 * platform/graphics/cg/PDFDocumentImage.h: 49 * platform/graphics/win/ImageCGWin.cpp: 50 (WebCore::BitmapImage::getHBITMAPOfSize): 51 (WebCore::BitmapImage::drawFrameMatchingSourceSize): 52 * platform/graphics/wince/ImageBufferWinCE.cpp: 53 (WebCore::BufferedImage::draw): 54 * platform/graphics/wince/ImageWinCE.cpp: 55 (WebCore::BitmapImage::draw): 56 * platform/mac/DragImageMac.mm: 57 (WebCore::createDragImageFromImage): 58 * rendering/RenderEmbeddedObject.cpp: 59 (WebCore::RenderEmbeddedObject::paintSnapshotImage): 60 * rendering/RenderImage.cpp: 61 (WebCore::RenderImage::styleDidChange): 62 * rendering/RenderSnapshottedPlugIn.cpp: 63 (WebCore::RenderSnapshottedPlugIn::paintSnapshot): 64 * rendering/style/RenderStyle.cpp: 65 (WebCore::RenderStyle::changeRequiresLayout): 66 * svg/graphics/SVGImage.cpp: 67 (WebCore::SVGImage::drawForContainer): 68 (WebCore::SVGImage::nativeImageForCurrentFrame): 69 (WebCore::SVGImage::draw): 70 * svg/graphics/SVGImage.h: 71 * svg/graphics/SVGImageForContainer.cpp: 72 (WebCore::SVGImageForContainer::draw): 73 * svg/graphics/SVGImageForContainer.h: 74 1 75 2013-10-23 Andreas Kling <akling@apple.com> 2 76 -
trunk/Source/WebCore/loader/cache/CachedImage.cpp
r156918 r157909 261 261 LayoutSize imageSize; 262 262 263 #if ENABLE(CSS_IMAGE_ORIENTATION) 264 if (!renderer) 265 return IntSize(); 266 267 ImageOrientationDescription orientationDescription(renderer->shouldRespectImageOrientation()); 268 orientationDescription.setImageOrientationEnum(renderer->style()->imageOrientation()); 269 270 if (m_image->isBitmapImage() 271 && (orientationDescription.respectImageOrientation() == RespectImageOrientation && orientationDescription.imageOrientation() != DefaultImageOrientation)) 272 imageSize = static_cast<BitmapImage*>(m_image.get())->sizeRespectingOrientation(orientationDescription); 273 #else 263 274 if (m_image->isBitmapImage() && (renderer && renderer->shouldRespectImageOrientation() == RespectImageOrientation)) 264 275 imageSize = static_cast<BitmapImage*>(m_image.get())->sizeRespectingOrientation(); 276 #endif 277 265 278 #if ENABLE(SVG) 266 279 else if (m_image->isSVGImage() && sizeType == UsedSize) { -
trunk/Source/WebCore/page/DragController.cpp
r157058 r157909 855 855 IntPoint origin; 856 856 857 if (!element.renderer()) 858 return; 859 860 ImageOrientationDescription orientationDescription(element.renderer()->shouldRespectImageOrientation()); 861 #if ENABLE(CSS_IMAGE_ORIENTATION) 862 orientationDescription.setImageOrientationEnum(element.renderer()->style()->imageOrientation()); 863 #endif 864 857 865 Image* image = getImage(element); 858 866 if (image && image->size().height() * image->size().width() <= MaxOriginalImageArea 859 && (dragImage = createDragImageFromImage(image, element.renderer() ? ImageOrientationDescription(element.renderer()->shouldRespectImageOrientation()): ImageOrientationDescription()))) {867 && (dragImage = createDragImageFromImage(image, element.renderer() ? orientationDescription : ImageOrientationDescription()))) { 860 868 IntSize originalSize = rect.size(); 861 869 origin = rect.location(); -
trunk/Source/WebCore/page/Frame.cpp
r157373 r157909 1034 1034 1035 1035 RefPtr<Image> image = buffer->copyImage(); 1036 return createDragImageFromImage(image.get(), ImageOrientationDescription(renderer->shouldRespectImageOrientation())); 1036 1037 ImageOrientationDescription orientationDescription(renderer->shouldRespectImageOrientation()); 1038 #if ENABLE(CSS_IMAGE_ORIENTATION) 1039 orientationDescription.setImageOrientationEnum(renderer->style()->imageOrientation()); 1040 #endif 1041 return createDragImageFromImage(image.get(), orientationDescription); 1037 1042 } 1038 1043 -
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
r157337 r157909 181 181 } 182 182 183 void BitmapImage::updateSize() const 184 { 185 if (!m_sizeAvailable || m_haveSize) 186 return; 187 188 m_size = m_source.size(); 189 m_sizeRespectingOrientation = m_source.size(ImageOrientationDescription(RespectImageOrientation)); 183 void BitmapImage::updateSize(ImageOrientationDescription description) const 184 { 185 if (!m_sizeAvailable || (m_haveSize 186 #if ENABLE(CSS_IMAGE_ORIENTATION) 187 && description.imageOrientation() == static_cast<ImageOrientationEnum>(m_imageOrientation) 188 && description.respectImageOrientation() == static_cast<RespectImageOrientationEnum>(m_shouldRespectImageOrientation) 189 #endif 190 )) 191 return; 192 193 m_size = m_source.size(description); 194 m_sizeRespectingOrientation = m_source.size(ImageOrientationDescription(RespectImageOrientation, description.imageOrientation())); 195 m_imageOrientation = static_cast<unsigned>(description.imageOrientation()); 196 m_shouldRespectImageOrientation = static_cast<unsigned>(description.respectImageOrientation()); 190 197 m_haveSize = true; 191 198 didDecodeProperties(); … … 198 205 } 199 206 200 IntSize BitmapImage::sizeRespectingOrientation( ) const201 { 202 updateSize( );207 IntSize BitmapImage::sizeRespectingOrientation(ImageOrientationDescription description) const 208 { 209 updateSize(description); 203 210 return m_sizeRespectingOrientation; 204 211 } … … 519 526 setImageObserver(0); 520 527 521 draw(buffer->context(), tileRect, tileRect, styleColorSpace, op, blendMode );528 draw(buffer->context(), tileRect, tileRect, styleColorSpace, op, blendMode, ImageOrientationDescription()); 522 529 523 530 setImageObserver(observer); -
trunk/Source/WebCore/platform/graphics/BitmapImage.h
r157337 r157909 122 122 123 123 virtual IntSize size() const OVERRIDE; 124 IntSize sizeRespectingOrientation( ) const;124 IntSize sizeRespectingOrientation(ImageOrientationDescription = ImageOrientationDescription()) const; 125 125 IntSize currentFrameSize() const; 126 126 virtual bool getHotSpot(IntPoint&) const OVERRIDE; … … 173 173 174 174 private: 175 void updateSize( ) const;175 void updateSize(ImageOrientationDescription = ImageOrientationDescription()) const; 176 176 177 177 protected: … … 188 188 virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator) OVERRIDE; 189 189 #endif 190 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) OVERRIDE;191 #if USE(CG) || USE(CAIRO) || PLATFORM(BLACKBERRY)192 190 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE; 193 #endif194 191 195 192 #if USE(WINGDI) … … 269 266 mutable IntSize m_size; // The size to use for the overall image (will just be the size of the first image). 270 267 mutable IntSize m_sizeRespectingOrientation; 268 mutable unsigned m_imageOrientation : 4; // ImageOrientationEnum 269 mutable unsigned m_shouldRespectImageOrientation : 1; // RespectImageOrientationEnum 271 270 272 271 size_t m_currentFrame; // The index of the current frame of animation. -
trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
r157045 r157909 86 86 } 87 87 88 void CrossfadeGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode )88 void CrossfadeGeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode, ImageOrientationDescription) 89 89 { 90 90 GraphicsContextStateSaver stateSaver(*context); -
trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
r155721 r157909 52 52 53 53 protected: 54 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode ) OVERRIDE;54 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE; 55 55 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& dstRect, BlendMode) OVERRIDE; 56 56 -
trunk/Source/WebCore/platform/graphics/GeneratedImage.h
r155721 r157909 51 51 52 52 protected: 53 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode ) OVERRIDE = 0;53 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE = 0; 54 54 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, 55 55 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode) OVERRIDE = 0; -
trunk/Source/WebCore/platform/graphics/GradientImage.cpp
r156391 r157909 33 33 namespace WebCore { 34 34 35 void GradientImage::draw(GraphicsContext* destContext, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode )35 void GradientImage::draw(GraphicsContext* destContext, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) 36 36 { 37 37 GraphicsContextStateSaver stateSaver(*destContext); -
trunk/Source/WebCore/platform/graphics/GradientImage.h
r156226 r157909 46 46 47 47 protected: 48 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode ) OVERRIDE;48 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE; 49 49 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, 50 50 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect, BlendMode) OVERRIDE; -
trunk/Source/WebCore/platform/graphics/Image.cpp
r156391 r157909 91 91 } 92 92 93 void Image::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode, ImageOrientationDescription )93 void Image::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode, ImageOrientationDescription description) 94 94 { 95 draw(ctx, dstRect, srcRect, styleColorSpace, op, blendMode );95 draw(ctx, dstRect, srcRect, styleColorSpace, op, blendMode, description); 96 96 } 97 97 … … 127 127 visibleSrcRect.setWidth(destRect.width() / scale.width()); 128 128 visibleSrcRect.setHeight(destRect.height() / scale.height()); 129 draw(ctxt, destRect, visibleSrcRect, styleColorSpace, op, blendMode );129 draw(ctxt, destRect, visibleSrcRect, styleColorSpace, op, blendMode, ImageOrientationDescription()); 130 130 return; 131 131 } -
trunk/Source/WebCore/platform/graphics/Image.h
r156795 r157909 196 196 virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator) { } 197 197 #endif 198 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode) = 0;199 198 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription); 200 199 void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize, ColorSpace styleColorSpace, -
trunk/Source/WebCore/platform/graphics/blackberry/ImageBlackBerry.cpp
r154088 r157909 120 120 } 121 121 122 void BitmapImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode)123 {124 draw(context, dstRect, srcRect, styleColorSpace, op, blendMode, ImageOrientationDescription());125 126 122 void BitmapImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op, BlendMode, ImageOrientationDescription description) 127 123 { -
trunk/Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp
r157337 r157909 62 62 } 63 63 64 void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode)65 {66 draw(context, dst, src, styleColorSpace, op, blendMode, ImageOrientationDescription());67 }68 69 64 void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const FloatRect& src, ColorSpace styleColorSpace, CompositeOperator op, 70 65 BlendMode blendMode, ImageOrientationDescription description) … … 99 94 #endif 100 95 101 ImageOrientation orientation;96 ImageOrientation frameOrientation(description.imageOrientation()); 102 97 if (description.respectImageOrientation() == RespectImageOrientation) 103 orientation = frameOrientationAtIndex(m_currentFrame);98 frameOrientation = frameOrientationAtIndex(m_currentFrame); 104 99 105 100 FloatRect dstRect = dst; 106 101 107 if ( orientation != DefaultImageOrientation) {102 if (frameOrientation != DefaultImageOrientation) { 108 103 // ImageOrientation expects the origin to be at (0, 0). 109 104 context->translate(dstRect.x(), dstRect.y()); 110 105 dstRect.setLocation(FloatPoint()); 111 context->concatCTM( orientation.transformFromDefault(dstRect.size()));112 if ( orientation.usesWidthAsHeight()) {106 context->concatCTM(frameOrientation.transformFromDefault(dstRect.size())); 107 if (frameOrientation.usesWidthAsHeight()) { 113 108 // The destination rectangle will have it's width and height already reversed for the orientation of 114 109 // the image, as it was needed for page layout, so we need to reverse it back here. -
trunk/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp
r157337 r157909 161 161 } 162 162 163 void BitmapImage::draw(GraphicsContext* ctx, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator op, BlendMode blendMode)164 {165 draw(ctx, dstRect, srcRect, styleColorSpace, op, blendMode, ImageOrientationDescription());166 }167 168 163 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription description) 169 164 { -
trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
r155665 r157909 177 177 } 178 178 179 void PDFDocumentImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op, BlendMode )179 void PDFDocumentImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op, BlendMode, ImageOrientationDescription) 180 180 { 181 181 if (!m_document || !m_hasPage) -
trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
r155665 r157909 71 71 virtual IntSize size() const OVERRIDE; 72 72 73 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode ) OVERRIDE;73 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE; 74 74 75 75 // FIXME: Implement this to be less conservative. -
trunk/Source/WebCore/platform/graphics/win/ImageCGWin.cpp
r155570 r157909 79 79 drawFrameMatchingSourceSize(&gc, FloatRect(0.0f, 0.0f, bmpInfo.bmWidth, bmpInfo.bmHeight), *size, ColorSpaceDeviceRGB, CompositeCopy); 80 80 else 81 draw(&gc, FloatRect(0.0f, 0.0f, bmpInfo.bmWidth, bmpInfo.bmHeight), FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), ColorSpaceDeviceRGB, CompositeCopy, BlendModeNormal );81 draw(&gc, FloatRect(0.0f, 0.0f, bmpInfo.bmWidth, bmpInfo.bmHeight), FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), ColorSpaceDeviceRGB, CompositeCopy, BlendModeNormal, ImageOrientationDescription()); 82 82 83 83 // Do cleanup … … 95 95 size_t currentFrame = m_currentFrame; 96 96 m_currentFrame = i; 97 draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, srcSize.width(), srcSize.height()), styleColorSpace, compositeOp, BlendModeNormal );97 draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, srcSize.width(), srcSize.height()), styleColorSpace, compositeOp, BlendModeNormal, ImageOrientationDescription()); 98 98 m_currentFrame = currentFrame; 99 99 return; … … 103 103 // No image of the correct size was found, fallback to drawing the current frame 104 104 IntSize imageSize = BitmapImage::size(); 105 draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), styleColorSpace, compositeOp, BlendModeNormal );105 draw(ctxt, dstRect, FloatRect(0.0f, 0.0f, imageSize.width(), imageSize.height()), styleColorSpace, compositeOp, BlendModeNormal, ImageOrientationDescription()); 106 106 } 107 107 -
trunk/Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
r154088 r157909 42 42 virtual void destroyDecodedData(bool destroyAll = true) {} 43 43 virtual unsigned decodedSize() const { return 0; } 44 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode );44 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription); 45 45 virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, 46 46 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect); … … 49 49 }; 50 50 51 void BufferedImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode )51 void BufferedImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) 52 52 { 53 53 IntRect intDstRect = enclosingIntRect(dstRect); -
trunk/Source/WebCore/platform/graphics/wince/ImageWinCE.cpp
r147837 r157909 109 109 } 110 110 111 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRectIn, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode )111 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRectIn, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) 112 112 { 113 113 if (!m_source.initialized()) -
trunk/Source/WebCore/platform/mac/DragImageMac.mm
r156860 r157909 88 88 ImageOrientation orientation; 89 89 BitmapImage* bitmapImage = static_cast<BitmapImage *>(image); 90 IntSize sizeRespectingOrientation = bitmapImage->sizeRespectingOrientation( );90 IntSize sizeRespectingOrientation = bitmapImage->sizeRespectingOrientation(description); 91 91 92 92 if (description.respectImageOrientation() == RespectImageOrientation) -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r157535 r157909 207 207 208 208 bool useLowQualityScaling = shouldPaintAtLowQuality(context, image, image, alignedRect.size()); 209 context->drawImage(image, style()->colorSpace(), alignedRect, CompositeSourceOver, ImageOrientationDescription(shouldRespectImageOrientation()), useLowQualityScaling); 209 ImageOrientationDescription orientationDescription(shouldRespectImageOrientation()); 210 #if ENABLE(CSS_IMAGE_ORIENTATION) 211 orientationDescription.setImageOrientationEnum(style()->imageOrientation()); 212 #endif 213 context->drawImage(image, style()->colorSpace(), alignedRect, CompositeSourceOver, orientationDescription, useLowQualityScaling); 210 214 } 211 215 -
trunk/Source/WebCore/rendering/RenderImage.cpp
r157665 r157909 161 161 m_needsToSetSizeForAltText = false; 162 162 } 163 #if ENABLE(CSS_IMAGE_ORIENTATION) 164 if (diff == StyleDifferenceLayout && oldStyle->imageOrientation() != style()->imageOrientation()) 165 return imageDimensionsChanged(true /* imageSizeChanged */); 166 #endif 167 163 168 #if ENABLE(CSS_IMAGE_RESOLUTION) 164 169 if (diff == StyleDifferenceLayout -
trunk/Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp
r155806 r157909 140 140 bool useLowQualityScaling = shouldPaintAtLowQuality(context, image, image, alignedRect.size()); 141 141 142 ImageOrientationDescription orientationDescription ;142 ImageOrientationDescription orientationDescription(shouldRespectImageOrientation()); 143 143 #if ENABLE(CSS_IMAGE_ORIENTATION) 144 144 orientationDescription.setImageOrientationEnum(style()->imageOrientation()); -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r157823 r157909 553 553 || rareInheritedData->m_lineBoxContain != other->rareInheritedData->m_lineBoxContain 554 554 || rareInheritedData->m_lineGrid != other->rareInheritedData->m_lineGrid 555 #if ENABLE(CSS_IMAGE_ORIENTATION) 556 || rareInheritedData->m_imageOrientation != other->rareInheritedData->m_imageOrientation 557 #endif 555 558 #if ENABLE(CSS_IMAGE_RESOLUTION) 556 559 || rareInheritedData->m_imageResolutionSource != other->rareInheritedData->m_imageResolutionSource -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r156978 r157909 158 158 scaledSrc.setSize(adjustedSrcSize); 159 159 160 draw(context, dstRect, scaledSrc, colorSpace, compositeOp, blendMode );160 draw(context, dstRect, scaledSrc, colorSpace, compositeOp, blendMode, ImageOrientationDescription()); 161 161 162 162 setImageObserver(observer); … … 175 175 return 0; 176 176 177 draw(buffer->context(), rect(), rect(), ColorSpaceDeviceRGB, CompositeSourceOver, BlendModeNormal );177 draw(buffer->context(), rect(), rect(), ColorSpaceDeviceRGB, CompositeSourceOver, BlendModeNormal, ImageOrientationDescription()); 178 178 179 179 // FIXME: WK(Bug 113657): We should use DontCopyBackingStore here. … … 217 217 } 218 218 219 void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode )219 void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) 220 220 { 221 221 if (!m_page) -
trunk/Source/WebCore/svg/graphics/SVGImage.h
r155721 r157909 92 92 93 93 SVGImage(ImageObserver*); 94 virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode ) OVERRIDE;94 virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, ColorSpace styleColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE; 95 95 void drawForContainer(GraphicsContext*, const FloatSize, float, const FloatRect&, const FloatRect&, ColorSpace, CompositeOperator, BlendMode); 96 96 void drawPatternForContainer(GraphicsContext*, const FloatSize, float, const FloatRect&, const AffineTransform&, const FloatPoint&, ColorSpace, -
trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
r154875 r157909 38 38 39 39 void SVGImageForContainer::draw(GraphicsContext* context, const FloatRect& dstRect, 40 const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode blendMode )40 const FloatRect& srcRect, ColorSpace colorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription) 41 41 { 42 42 m_image->drawForContainer(context, m_containerSize, m_zoom, dstRect, srcRect, colorSpace, compositeOp, blendMode); -
trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h
r155721 r157909 56 56 } 57 57 58 virtual void draw(GraphicsContext*, const FloatRect&, const FloatRect&, ColorSpace, CompositeOperator, BlendMode ) OVERRIDE;58 virtual void draw(GraphicsContext*, const FloatRect&, const FloatRect&, ColorSpace, CompositeOperator, BlendMode, ImageOrientationDescription) OVERRIDE; 59 59 60 60 virtual void drawPattern(GraphicsContext*, const FloatRect&, const AffineTransform&, const FloatPoint&, ColorSpace, CompositeOperator, const FloatRect&, BlendMode) OVERRIDE; -
trunk/Source/WebKit/ChangeLog
r157464 r157909 1 2013-10-23 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Integrate css3-images image-orientation with existing EXIF support 4 https://bugs.webkit.org/show_bug.cgi?id=91566 5 6 Reviewed by Beth Dakin. 7 8 * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Update export symbols for draw functions. 9 1 10 2013-10-15 Andy Estes <aestes@apple.com> 2 11 -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r157702 r157909 373 373 symbolWithPointer(?getFirstCGImageRefOfSize@BitmapImage@WebCore@@UAEPAUCGImage@@ABVIntSize@2@@Z, ?getFirstCGImageRefOfSize@BitmapImage@WebCore@@UEAAPEAUCGImage@@AEBVIntSize@2@@Z) 374 374 symbolWithPointer(?getCGImageArray@BitmapImage@WebCore@@UAE?AV?$RetainPtr@PBU__CFArray@@@WTF@@XZ, ?getCGImageArray@BitmapImage@WebCore@@UEAA?AV?$RetainPtr@PEBU__CFArray@@@WTF@@XZ) 375 symbolWithPointer(?draw@BitmapImage@WebCore@@MAEXPAVGraphicsContext@2@ABVFloatRect@2@1W4ColorSpace@2@W4CompositeOperator@2@W4BlendMode@2@@Z, ?draw@BitmapImage@WebCore@@MEAAXPEAVGraphicsContext@2@AEBVFloatRect@2@1W4ColorSpace@2@W4CompositeOperator@2@W4BlendMode@2@@Z)376 375 #elif USE(CAIRO) 377 376 symbolWithPointer(?nativeImageForCurrentFrame@BitmapImage@WebCore@@UAE?AV?$PassRefPtr@U_cairo_surface@@@WTF@@XZ, ?nativeImageForCurrentFrame@BitmapImage@WebCore@@UEAA?AV?$PassRefPtr@U_cairo_surface@@@WTF@@XZ) 378 377 symbolWithPointer(?draw@BitmapImage@WebCore@@MAEXPAVGraphicsContext@2@ABVFloatRect@2@1W4ColorSpace@2@W4CompositeOperator@2@W4BlendMode@2@UImageOrientationDescription@2@@Z, ?draw@BitmapImage@WebCore@@MEAAXPEAVGraphicsContext@2@AEBVFloatRect@2@1W4ColorSpace@2@W4CompositeOperator@2@W4BlendMode@2@UImageOrientationDescription@2@@Z) 379 symbolWithPointer(?draw@BitmapImage@WebCore@@MAEXPAVGraphicsContext@2@ABVFloatRect@2@1W4ColorSpace@2@W4CompositeOperator@2@W4BlendMode@2@@Z, ?draw@BitmapImage@WebCore@@MEAAXPEAVGraphicsContext@2@AEBVFloatRect@2@1W4ColorSpace@2@W4CompositeOperator@2@W4BlendMode@2@@Z)380 378 #endif 381 379 symbolWithPointer(?getHBITMAP@BitmapImage@WebCore@@UAE_NPAUHBITMAP__@@@Z, ?getHBITMAP@BitmapImage@WebCore@@UEAA_NPEAUHBITMAP__@@@Z)
Note: See TracChangeset
for help on using the changeset viewer.