Integrate css3-images image-orientation with existing EXIF support
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Oct 2013 03:40:10 +0000 (03:40 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Oct 2013 03:40:10 +0000 (03:40 +0000)
commit1682531ea414f7b1c0613ef90a3247b19be0ea71
treeacf54a158f984d359b0824cfc2fd5298c925c190
parenta29188a42bef1296f33494d72500fa23c7a59dcd
Integrate css3-images image-orientation with existing EXIF support
https://bugs.webkit.org/show_bug.cgi?id=91566

Reviewed by Beth Dakin.

Source/WebCore:

Original patch by David Barr(davidbarr@chromium.org).

This patch passes an information of image orientation into existing EXIF support functions
(draw() functions of image classes mainly). We need to let the functions to know the information
in order to meet the image-orientation requirement.

Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation
The css3-images module specification is at last call.

Test: fast/css/image-orientation/image-orientation.html
Image orientation test is to check if incorrect rotation value can be fixed with correct orientation.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* page/Frame.cpp:
(WebCore::Frame::nodeImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::updateSize):
(WebCore::BitmapImage::sizeRespectingOrientation):
(WebCore::BitmapImage::drawPattern):
* platform/graphics/BitmapImage.h:
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::draw):
* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::draw):
* platform/graphics/GradientImage.h:
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
* platform/graphics/blackberry/ImageBlackBerry.cpp:
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cg/BitmapImageCG.cpp:
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::draw):
* platform/graphics/cg/PDFDocumentImage.h:
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize):
(WebCore::BitmapImage::drawFrameMatchingSourceSize):
* platform/graphics/wince/ImageBufferWinCE.cpp:
(WebCore::BufferedImage::draw):
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::draw):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::nativeImageForCurrentFrame):
(WebCore::SVGImage::draw):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::draw):
* svg/graphics/SVGImageForContainer.h:

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Update export symbols for draw functions.

LayoutTests:

* fast/css/image-orientation/image-orientation-expected.txt: Fixed wrong description.
* fast/css/image-orientation/image-orientation.html: Remove a space.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
35 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/image-orientation/image-orientation-expected.txt
LayoutTests/fast/css/image-orientation/image-orientation.html
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
Source/WebCore/platform/graphics/GeneratedImage.h
Source/WebCore/platform/graphics/GradientImage.cpp
Source/WebCore/platform/graphics/GradientImage.h
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/Image.h
Source/WebCore/platform/graphics/blackberry/ImageBlackBerry.cpp
Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp
Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
Source/WebCore/platform/graphics/cg/PDFDocumentImage.h
Source/WebCore/platform/graphics/win/ImageCGWin.cpp
Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
Source/WebCore/platform/graphics/wince/ImageWinCE.cpp
Source/WebCore/platform/mac/DragImageMac.mm
Source/WebCore/rendering/RenderEmbeddedObject.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderSnapshottedPlugIn.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/svg/graphics/SVGImage.h
Source/WebCore/svg/graphics/SVGImageForContainer.cpp
Source/WebCore/svg/graphics/SVGImageForContainer.h
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in