Ignore:
Timestamp:
Nov 7, 2013, 7:55:30 PM (12 years ago)
Author:
[email protected]
Message:

REGRESSION (r154375): Image is oriented incorrectly
https://bugs.webkit.org/show_bug.cgi?id=123831

Reviewed by Antonio Gomes.

r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
value by default.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):

File:
1 edited

Legend:

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

    r158163 r158900  
    392392                imageOffset = LayoutSize(leftBorder + leftPad + centerX + borderWidth, topBorder + topPad + centerY + borderWidth);
    393393
    394                 ImageOrientationDescription orientationDescription;
     394                ImageOrientationDescription orientationDescription(shouldRespectImageOrientation());
    395395#if ENABLE(CSS_IMAGE_ORIENTATION)
    396396                orientationDescription.setImageOrientationEnum(style().imageOrientation());
    397                 orientationDescription.setRespectImageOrientation(shouldRespectImageOrientation());
    398397#endif
    399398                context->drawImage(image.get(), style().colorSpace(), pixelSnappedIntRect(LayoutRect(paintOffset + imageOffset, imageSize)), CompositeSourceOver, orientationDescription);
     
    524523    Image* image = m_imageResource->image().get();
    525524    bool useLowQualityScaling = shouldPaintAtLowQuality(context, image, image, alignedRect.size());
    526     ImageOrientationDescription orientationDescription;
     525    ImageOrientationDescription orientationDescription(shouldRespectImageOrientation());
    527526#if ENABLE(CSS_IMAGE_ORIENTATION)
    528527    orientationDescription.setImageOrientationEnum(style().imageOrientation());
    529     orientationDescription.setRespectImageOrientation(shouldRespectImageOrientation());
    530528#endif
    531529    context->drawImage(m_imageResource->image(alignedRect.width(), alignedRect.height()).get(), style().colorSpace(), alignedRect, compositeOperator, orientationDescription, useLowQualityScaling);
Note: See TracChangeset for help on using the changeset viewer.