⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 187329 in webkit


Ignore:
Timestamp:
Jul 24, 2015, 12:54:56 AM (11 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r187274. rdar://problem/21905756

Location:
branches/safari-601.1-branch/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-601.1-branch/Source/WebCore/ChangeLog

    r187328 r187329  
     12015-07-24  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r187274. rdar://problem/21905756
     4
     5    2015-07-23  Timothy Horton  <timothy_horton@apple.com>
     6
     7            [iOS] Frame snapshots don't factor in page scale
     8            https://bugs.webkit.org/show_bug.cgi?id=147239
     9            <rdar://problem/21905756>
     10
     11            Reviewed by Simon Fraser.
     12
     13            * page/FrameSnapshotting.cpp:
     14            (WebCore::snapshotFrameRect):
     15            Apply page scale when determining the backing store size and setting up the context.
     16
     17            * page/TextIndicator.cpp:
     18            (WebCore::TextIndicator::createWithSelectionInFrame):
     19            Don't assume snapshotFrameRect gave us an image with scale=deviceScale, because it
     20            will factor in the pageScale too.
     21
     22            * platform/graphics/ImageBuffer.h:
     23            (WebCore::ImageBuffer::resolutionScale):
     24            Expose resolutionScale.
     25
     26            * rendering/RenderLayerCompositor.cpp:
     27            (WebCore::RenderLayerCompositor::addToOverlapMap):
     28            This has been true for a long time.
     29
    1302015-07-24  Matthew Hanson  <matthew_hanson@apple.com>
    231
  • branches/safari-601.1-branch/Source/WebCore/page/FrameSnapshotting.cpp

    r187063 r187329  
    4040#include "Page.h"
    4141#include "RenderObject.h"
     42#include "Settings.h"
    4243
    4344namespace WebCore {
     
    9495    frame.view()->setPaintBehavior(paintBehavior);
    9596
    96     std::unique_ptr<ImageBuffer> buffer = ImageBuffer::create(imageRect.size(), frame.page()->deviceScaleFactor(), ColorSpaceDeviceRGB);
     97    float scaleFactor = frame.page()->deviceScaleFactor();
     98
     99    if (frame.settings().delegatesPageScaling())
     100        scaleFactor *= frame.page()->pageScaleFactor();
     101
     102    std::unique_ptr<ImageBuffer> buffer = ImageBuffer::create(imageRect.size(), scaleFactor, ColorSpaceDeviceRGB);
    97103    if (!buffer)
    98104        return nullptr;
  • branches/safari-601.1-branch/Source/WebCore/page/TextIndicator.cpp

    r187070 r187329  
    164164    data.textBoundingRectInRootViewCoordinates = textBoundingRectInRootViewCoordinates;
    165165    data.textRectsInBoundingRectCoordinates = textRectsInBoundingRectCoordinates;
    166     data.contentImageScaleFactor = frame.page()->deviceScaleFactor();
     166    data.contentImageScaleFactor = indicatorBuffer->resolutionScale();
    167167    data.contentImage = indicatorBitmap;
    168168    data.contentImageWithHighlight = indicatorBitmapWithHighlight;
  • branches/safari-601.1-branch/Source/WebCore/platform/graphics/ImageBuffer.h

    r185731 r187329  
    9393    const IntSize& logicalSize() const { return m_logicalSize; }
    9494
     95    float resolutionScale() const { return m_resolutionScale; }
     96
    9597    WEBCORE_EXPORT GraphicsContext* context() const;
    9698
  • branches/safari-601.1-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r187328 r187329  
    12341234
    12351235    // On iOS, pageScaleFactor() is not applied by RenderView, so we should not scale here.
    1236     // FIXME: Set Settings::delegatesPageScaling to true for iOS.
    1237 #if !PLATFORM(IOS)
    12381236    const Settings& settings = m_renderView.frameView().frame().settings();
    12391237    if (!settings.delegatesPageScaling())
    12401238        clipRect.scale(pageScaleFactor());
    1241 #endif
    12421239    clipRect.intersect(extent.bounds);
    12431240    overlapMap.add(clipRect);
Note: See TracChangeset for help on using the changeset viewer.