Ignore:
Timestamp:
Oct 23, 2013, 8:40:10 PM (12 years ago)
Author:
[email protected]
Message:

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([email protected]).

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r157665 r157909  
    161161        m_needsToSetSizeForAltText = false;
    162162    }
     163#if ENABLE(CSS_IMAGE_ORIENTATION)
     164    if (diff == StyleDifferenceLayout && oldStyle->imageOrientation() != style()->imageOrientation())
     165        return imageDimensionsChanged(true /* imageSizeChanged */);
     166#endif
     167
    163168#if ENABLE(CSS_IMAGE_RESOLUTION)
    164169    if (diff == StyleDifferenceLayout
Note: See TracChangeset for help on using the changeset viewer.