Changeset 217296 in webkit


Ignore:
Timestamp:
May 23, 2017, 1:44:10 PM (8 years ago)
Author:
Simon Fraser
Message:

Snapshotting via -renderInContext: should do synchronous image decodes
https://bugs.webkit.org/show_bug.cgi?id=172485
rdar://problem/32276146

Reviewed by Tim Horton.

Source/WebCore:

When UIWebView clients snapshot the view via -renderInContext: on the UIView's layer,
WebKit should do synchronous image decodes so that the images show in the snapshot.

Fix by plumbing through a "snapshotting" paint behavior flag from two source locations:
WebSimpleLayer, used by compositing layers, and LegacyTileLayer, used for the WK1 tile cache.
On WebSimpleLayer the flag propagates through PlatformCALayer to GraphicsLayer, and on LegacyTileLayer
it sets some state on the WAKWindow, which is detected by -[WebFrame _paintBehaviorForDestinationContext:].
In both cases, the flag becomes PaintBehaviorSnapshotting which is passed down through painting
in PaintInfo.paintBehavior.

Fix code that was checking paintBehavior on the FrameView to just looking at PaintInfo.paintBehavior,
which required passing PaintInfo along in RenderImage::paintIntoRect().

We can't just use the PaintBehaviorFlattenCompositingLayers flag, because that triggers
a flattening paint of compositing layers, and we don't want that behavior for -renderInContext:,
since CoreAnimation calls -renderInContext: on each of our layers and we need to avoid double-painting.
So PaintBehaviorSnapshotting is now added to the call sites that also set PaintBehaviorFlattenCompositingLayers
in most cases.

Tested by SnapshotViaRenderInContext API test.

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):

  • page/FrameView.cpp:

(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::paintContentsForSnapshot):

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::paintContents):

  • page/PageOverlayController.h:
  • page/mac/ServicesOverlayController.h:
  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::paintContents):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::paintGraphicsLayerContents):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/GraphicsLayerClient.h:

(WebCore::GraphicsLayerClient::paintContents):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/PlatformCALayerClient.h:
  • platform/graphics/ca/TileCoverageMap.cpp:

(WebCore::TileCoverageMap::platformCALayerPaintContents):

  • platform/graphics/ca/TileCoverageMap.h:
  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::platformCALayerPaintContents):

  • platform/graphics/ca/TileGrid.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(PlatformCALayer::drawLayerContents):

  • platform/graphics/mac/WebLayer.mm:

(-[WebLayer drawInContext:]):
(-[WebSimpleLayer renderInContext:]):
(-[WebSimpleLayer drawInContext:]):

  • platform/ios/LegacyTileCache.h: Use initializers.
  • platform/ios/LegacyTileCache.mm:

(WebCore::LegacyTileCache::LegacyTileCache):
(WebCore::LegacyTileCache::drawWindowContent):
(WebCore::LegacyTileCache::drawLayer):

  • platform/ios/LegacyTileLayer.h:
  • platform/ios/LegacyTileLayer.mm:

(-[LegacyTileHostLayer renderInContext:]):
(-[LegacyTileLayer renderInContext:]):
(-[LegacyTileLayer drawInContext:]):
(+[LegacyTileLayer layerBeingPainted]): Deleted. There were no callers.

  • platform/ios/wak/WAKView.mm:

(-[WAKView _drawRect:context:lockFocus:]): bool -> BOOL

  • platform/ios/wak/WAKWindow.h:
  • platform/ios/wak/WAKWindow.mm:

(-[WAKWindow setIsInSnapshottingPaint:]):
(-[WAKWindow isInSnapshottingPaint]):

  • rendering/PaintPhase.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintMaskImages):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

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

  • rendering/RenderImage.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintForegroundForFragments):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintContents):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::paintContents):

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::paintReplaced):

Source/WebKit/mac:

Remove the _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap: SPI that no longer
has any callers.

  • Plugins/WebBaseNetscapePluginView.h:
  • Plugins/WebBaseNetscapePluginView.mm:

(-[WebBaseNetscapePluginView inFlatteningPaint]): Deleted.

  • WebView/WebFrame.mm:

(-[WebFrame _paintBehaviorForDestinationContext:]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame _shouldFlattenCompositingLayers:]): Deleted.

  • WebView/WebHTMLView.mm:

(imageFromRect):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:]): Deleted.
(-[WebView _includesFlattenedCompositingLayersWhenDrawingToBitmap]): Deleted.

  • WebView/WebViewData.h:
  • WebView/WebViewPrivate.h:

Source/WebKit2:

Pass the PaintBehaviorSnapshotting flag in functions that do snapshotting.

  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::drawInContext):

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::imageForRect):

  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:

(WebKit::InjectedBundleRangeHandle::renderedImage):

Tools:

New API test.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/ios/SnapshotViaRenderInContext.mm: Added.

(-[RenderInContextWebViewDelegate webViewDidFinishLoad:]):
(-[RenderInContextWebViewDelegate webView:didFailLoadWithError:]):
(TestWebKitAPI::getPixelIndex):
(TestWebKitAPI::TEST):

Location:
trunk
Files:
1 added
61 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r217293 r217296  
     12017-05-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Snapshotting via -renderInContext: should do synchronous image decodes
     4        https://bugs.webkit.org/show_bug.cgi?id=172485
     5        rdar://problem/32276146
     6
     7        Reviewed by Tim Horton.
     8
     9        When UIWebView clients snapshot the view via -renderInContext: on the UIView's layer,
     10        WebKit should do synchronous image decodes so that the images show in the snapshot.
     11
     12        Fix by plumbing through a "snapshotting" paint behavior flag from two source locations:
     13        WebSimpleLayer, used by compositing layers, and LegacyTileLayer, used for the WK1 tile cache.
     14        On WebSimpleLayer the flag propagates through PlatformCALayer to GraphicsLayer, and on LegacyTileLayer
     15        it sets some state on the WAKWindow, which is detected by -[WebFrame _paintBehaviorForDestinationContext:].
     16        In both cases, the flag becomes PaintBehaviorSnapshotting which is passed down through painting
     17        in PaintInfo.paintBehavior.
     18
     19        Fix code that was checking paintBehavior on the FrameView to just looking at PaintInfo.paintBehavior,
     20        which required passing PaintInfo along in RenderImage::paintIntoRect().
     21
     22        We can't just use the PaintBehaviorFlattenCompositingLayers flag, because that triggers
     23        a flattening paint of compositing layers, and we don't want that behavior for -renderInContext:,
     24        since CoreAnimation calls -renderInContext: on each of our layers and we need to avoid double-painting.
     25        So PaintBehaviorSnapshotting is now added to the call sites that also set PaintBehaviorFlattenCompositingLayers
     26        in most cases.
     27
     28        Tested by SnapshotViaRenderInContext API test.
     29
     30        * html/shadow/MediaControlElements.cpp:
     31        (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
     32        * page/FrameView.cpp:
     33        (WebCore::FrameView::willPaintContents):
     34        (WebCore::FrameView::paintContentsForSnapshot):
     35        * page/PageOverlayController.cpp:
     36        (WebCore::PageOverlayController::paintContents):
     37        * page/PageOverlayController.h:
     38        * page/mac/ServicesOverlayController.h:
     39        * page/mac/ServicesOverlayController.mm:
     40        (WebCore::ServicesOverlayController::Highlight::paintContents):
     41        * platform/graphics/GraphicsLayer.cpp:
     42        (WebCore::GraphicsLayer::paintGraphicsLayerContents):
     43        * platform/graphics/GraphicsLayer.h:
     44        * platform/graphics/GraphicsLayerClient.h:
     45        (WebCore::GraphicsLayerClient::paintContents):
     46        * platform/graphics/ca/GraphicsLayerCA.cpp:
     47        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
     48        (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
     49        * platform/graphics/ca/GraphicsLayerCA.h:
     50        * platform/graphics/ca/PlatformCALayer.h:
     51        * platform/graphics/ca/PlatformCALayerClient.h:
     52        * platform/graphics/ca/TileCoverageMap.cpp:
     53        (WebCore::TileCoverageMap::platformCALayerPaintContents):
     54        * platform/graphics/ca/TileCoverageMap.h:
     55        * platform/graphics/ca/TileGrid.cpp:
     56        (WebCore::TileGrid::platformCALayerPaintContents):
     57        * platform/graphics/ca/TileGrid.h:
     58        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
     59        (PlatformCALayer::drawLayerContents):
     60        * platform/graphics/mac/WebLayer.mm:
     61        (-[WebLayer drawInContext:]):
     62        (-[WebSimpleLayer renderInContext:]):
     63        (-[WebSimpleLayer drawInContext:]):
     64        * platform/ios/LegacyTileCache.h: Use initializers.
     65        * platform/ios/LegacyTileCache.mm:
     66        (WebCore::LegacyTileCache::LegacyTileCache):
     67        (WebCore::LegacyTileCache::drawWindowContent):
     68        (WebCore::LegacyTileCache::drawLayer):
     69        * platform/ios/LegacyTileLayer.h:
     70        * platform/ios/LegacyTileLayer.mm:
     71        (-[LegacyTileHostLayer renderInContext:]):
     72        (-[LegacyTileLayer renderInContext:]):
     73        (-[LegacyTileLayer drawInContext:]):
     74        (+[LegacyTileLayer layerBeingPainted]): Deleted. There were no callers.
     75        * platform/ios/wak/WAKView.mm:
     76        (-[WAKView _drawRect:context:lockFocus:]): bool -> BOOL
     77        * platform/ios/wak/WAKWindow.h:
     78        * platform/ios/wak/WAKWindow.mm:
     79        (-[WAKWindow setIsInSnapshottingPaint:]):
     80        (-[WAKWindow isInSnapshottingPaint]):
     81        * rendering/PaintPhase.h:
     82        * rendering/RenderBox.cpp:
     83        (WebCore::RenderBox::paintMaskImages):
     84        * rendering/RenderBoxModelObject.cpp:
     85        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
     86        * rendering/RenderImage.cpp:
     87        (WebCore::RenderImage::paintReplaced):
     88        (WebCore::RenderImage::paintIntoRect):
     89        * rendering/RenderImage.h:
     90        * rendering/RenderLayer.cpp:
     91        (WebCore::RenderLayer::paintLayerContents):
     92        (WebCore::RenderLayer::paintForegroundForFragments):
     93        * rendering/RenderLayerBacking.cpp:
     94        (WebCore::RenderLayerBacking::paintContents):
     95        * rendering/RenderLayerBacking.h:
     96        * rendering/RenderLayerCompositor.cpp:
     97        (WebCore::RenderLayerCompositor::paintContents):
     98        * rendering/RenderLayerCompositor.h:
     99        * rendering/RenderVideo.cpp:
     100        (WebCore::RenderVideo::paintReplaced):
     101
    11022017-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
    2103
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r216902 r217296  
    14031403        return nullptr;
    14041404
    1405     layer->paint(buffer->context(), paintingRect, LayoutSize(), PaintBehaviorFlattenCompositingLayers, nullptr, RenderLayer::PaintLayerPaintingCompositingAllPhases);
     1405    layer->paint(buffer->context(), paintingRect, LayoutSize(), PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting, nullptr, RenderLayer::PaintLayerPaintingCompositingAllPhases);
    14061406
    14071407    return ImageBuffer::sinkIntoImage(WTFMove(buffer));
  • trunk/Source/WebCore/page/FrameView.cpp

    r217293 r217296  
    43904390        if (parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers)
    43914391            m_paintBehavior |= PaintBehaviorFlattenCompositingLayers;
     4392           
     4393        if (parentView->paintBehavior() & PaintBehaviorSnapshotting)
     4394            m_paintBehavior |= PaintBehaviorSnapshotting;
    43924395    }
    43934396
    43944397    if (document->printing())
    4395         m_paintBehavior |= PaintBehaviorFlattenCompositingLayers;
     4398        m_paintBehavior |= (PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting);
    43964399
    43974400    paintingState.isFlatteningPaintOfRootFrame = (m_paintBehavior & PaintBehaviorFlattenCompositingLayers) && !frame().ownerElement();
     
    45204523    // Cache paint behavior and set a new behavior appropriate for snapshots.
    45214524    PaintBehavior oldBehavior = paintBehavior();
    4522     setPaintBehavior(oldBehavior | PaintBehaviorFlattenCompositingLayers);
     4525    setPaintBehavior(oldBehavior | (PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting));
    45234526
    45244527    // If the snapshot should exclude selection, then we'll clear the current selection
  • trunk/Source/WebCore/page/PageOverlayController.cpp

    r212228 r217296  
    361361}
    362362
    363 void PageOverlayController::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect)
     363void PageOverlayController::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect, GraphicsLayerPaintFlags)
    364364{
    365365    for (auto& overlayAndGraphicsLayer : m_overlayGraphicsLayers) {
  • trunk/Source/WebCore/page/PageOverlayController.h

    r211683 r217296  
    8989    // GraphicsLayerClient
    9090    void notifyFlushRequired(const GraphicsLayer*) override;
    91     void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clipRect) override;
     91    void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clipRect, GraphicsLayerPaintFlags) override;
    9292    float deviceScaleFactor() const override;
    9393    bool shouldSkipLayerInDump(const GraphicsLayer*, LayerTreeAsTextBehavior) const override;
  • trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp

    r216902 r217296  
    8686
    8787private:
    88     void paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip) override
     88    void paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintFlags) override
    8989    {
    9090        GraphicsContextStateSaver stateSaver(context);
  • trunk/Source/WebCore/page/mac/ServicesOverlayController.h

    r215152 r217296  
    8383        // GraphicsLayerClient
    8484        void notifyFlushRequired(const GraphicsLayer*) override;
    85         void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& inClip) override;
     85        void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& inClip, GraphicsLayerPaintFlags) override;
    8686        float deviceScaleFactor() const override;
    8787
  • trunk/Source/WebCore/page/mac/ServicesOverlayController.mm

    r215160 r217296  
    130130}
    131131
    132 void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const FloatRect&)
     132void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const FloatRect&, GraphicsLayerPaintFlags)
    133133{
    134134    if (!DataDetectorsLibrary())
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r213466 r217296  
    418418}
    419419
    420 void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const FloatRect& clip)
     420void GraphicsLayer::paintGraphicsLayerContents(GraphicsContext& context, const FloatRect& clip, GraphicsLayerPaintFlags flags)
    421421{
    422422    FloatSize offset = offsetFromRenderer();
     
    426426    clipRect.move(offset);
    427427
    428     m_client.paintContents(this, context, m_paintingPhase, clipRect);
     428    m_client.paintContents(this, context, m_paintingPhase, clipRect, flags);
    429429}
    430430
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r215469 r217296  
    443443    // Transitions are identified by a special animation name that cannot clash with a keyframe identifier.
    444444    static String animationNameForTransition(AnimatedPropertyID);
    445    
     445
    446446    // Return true if the animation is handled by the compositing system. If this returns
    447447    // false, the animation will be run by CSSAnimationController.
     
    453453    WEBCORE_EXPORT virtual void suspendAnimations(double time);
    454454    WEBCORE_EXPORT virtual void resumeAnimations();
    455    
     455
    456456    // Layer contents
    457457    virtual void setContentsToImage(Image*) { }
     
    466466
    467467    // Callback from the underlying graphics system to draw layer contents.
    468     void paintGraphicsLayerContents(GraphicsContext&, const FloatRect& clip);
    469    
     468    void paintGraphicsLayerContents(GraphicsContext&, const FloatRect& clip, GraphicsLayerPaintFlags = GraphicsLayerPaintFlags::None);
     469
    470470    // For hosting this GraphicsLayer in a native layer hierarchy.
    471471    virtual PlatformLayer* platformLayer() const { return 0; }
    472    
     472
    473473    enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, CompositingCoordinatesBottomUp };
    474474
  • trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h

    r211949 r217296  
    2424 */
    2525
    26 #ifndef GraphicsLayerClient_h
    27 #define GraphicsLayerClient_h
     26#pragma once
    2827
    2928#include "IntSize.h"
     
    7776typedef unsigned LayerTreeAsTextBehavior;
    7877
     78enum class GraphicsLayerPaintFlags { None, Snapshotting };
     79   
    7980class GraphicsLayerClient {
    8081public:
     
    9495    virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) { }
    9596
    96     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& /* inClip */) { }
     97    virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& /* inClip */, GraphicsLayerPaintFlags) { }
    9798    virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
    9899
     
    140141} // namespace WebCore
    141142
    142 #endif // GraphicsLayerClient_h
  • trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp

    r212535 r217296  
    221221    virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime) { }
    222222    virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesBottomUp; }
    223     virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&) { }
     223    virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&, GraphicsLayerPaintFlags) { }
    224224    virtual bool platformCALayerShowDebugBorders() const { return false; }
    225225    virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const { return false; }
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r216702 r217296  
    15641564}
    15651565
    1566 void GraphicsLayerCA::platformCALayerPaintContents(PlatformCALayer*, GraphicsContext& context, const FloatRect& clip)
     1566void GraphicsLayerCA::platformCALayerPaintContents(PlatformCALayer*, GraphicsContext& context, const FloatRect& clip, GraphicsLayerPaintFlags flags)
    15671567{
    15681568    m_hasEverPainted = true;
     
    15801580
    15811581    TraceScope tracingScope(PaintLayerStart, PaintLayerEnd);
    1582     paintGraphicsLayerContents(context, clip);
     1582    paintGraphicsLayerContents(context, clip, flags);
    15831583}
    15841584
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

    r216702 r217296  
    188188    WEBCORE_EXPORT void platformCALayerAnimationEnded(const String& animationKey) override;
    189189    CompositingCoordinatesOrientation platformCALayerContentsOrientation() const override { return contentsOrientation(); }
    190     WEBCORE_EXPORT void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect& clip) override;
     190    WEBCORE_EXPORT void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect& clip, GraphicsLayerPaintFlags) override;
    191191    bool platformCALayerShowDebugBorders() const override { return isShowingDebugBorder(); }
    192192    WEBCORE_EXPORT bool platformCALayerShowRepaintCounter(PlatformCALayer*) const override;
  • trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h

    r216448 r217296  
    278278    // Functions allows us to share implementation across WebTiledLayer and WebLayer
    279279    static RepaintRectList collectRectsToPaint(CGContextRef, PlatformCALayer*);
    280     static void drawLayerContents(CGContextRef, PlatformCALayer*, RepaintRectList& dirtyRects);
     280    static void drawLayerContents(CGContextRef, PlatformCALayer*, RepaintRectList& dirtyRects, GraphicsLayerPaintFlags);
    281281    static void drawRepaintIndicator(CGContextRef, PlatformCALayer*, int repaintCount, CGColorRef customBackgroundColor);
    282282    static CGRect frameForLayer(const PlatformLayer*);
  • trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h

    r197541 r217296  
    2424 */
    2525
    26 #ifndef PlatformCALayerClient_h
    27 #define PlatformCALayerClient_h
     26#pragma once
    2827
    2928#include "GraphicsLayer.h"
     
    4544    virtual void platformCALayerAnimationEnded(const String& /*animationKey*/) { }
    4645    virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesTopDown; }
    47     virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect& inClip) = 0;
     46    virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect& inClip, GraphicsLayerPaintFlags) = 0;
    4847    virtual bool platformCALayerShowDebugBorders() const { return false; }
    4948    virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const { return false; }
     
    7372}
    7473
    75 #endif // PlatformCALayerClient_h
  • trunk/Source/WebCore/platform/graphics/ca/TileCoverageMap.cpp

    r216448 r217296  
    153153}
    154154
    155 void TileCoverageMap::platformCALayerPaintContents(PlatformCALayer* platformCALayer, GraphicsContext& context, const FloatRect&)
     155void TileCoverageMap::platformCALayerPaintContents(PlatformCALayer* platformCALayer, GraphicsContext& context, const FloatRect&, GraphicsLayerPaintFlags)
    156156{
    157157    ASSERT_UNUSED(platformCALayer, platformCALayer == m_layer.ptr());
  • trunk/Source/WebCore/platform/graphics/ca/TileCoverageMap.h

    r208213 r217296  
    6262    bool platformCALayerContentsOpaque() const override { return true; }
    6363    bool platformCALayerDrawsContent() const override { return true; }
    64     void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&) override;
     64    void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&, GraphicsLayerPaintFlags) override;
    6565    float platformCALayerDeviceScaleFactor() const override;
    6666
  • trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp

    r216448 r217296  
    713713}
    714714
    715 void TileGrid::platformCALayerPaintContents(PlatformCALayer* platformCALayer, GraphicsContext& context, const FloatRect&)
     715void TileGrid::platformCALayerPaintContents(PlatformCALayer* platformCALayer, GraphicsContext& context, const FloatRect&, GraphicsLayerPaintFlags flags)
    716716{
    717717#if PLATFORM(IOS)
     
    728728
    729729        PlatformCALayer::RepaintRectList dirtyRects = PlatformCALayer::collectRectsToPaint(context.platformContext(), platformCALayer);
    730         PlatformCALayer::drawLayerContents(context.platformContext(), &m_controller.rootLayer(), dirtyRects);
     730        PlatformCALayer::drawLayerContents(context.platformContext(), &m_controller.rootLayer(), dirtyRects, flags);
    731731    }
    732732
  • trunk/Source/WebCore/platform/graphics/ca/TileGrid.h

    r206830 r217296  
    145145
    146146    // PlatformCALayerClient
    147     void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&) override;
     147    void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&, GraphicsLayerPaintFlags) override;
    148148    bool platformCALayerShowDebugBorders() const override;
    149149    bool platformCALayerShowRepaintCounter(PlatformCALayer*) const override;
  • trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm

    r216448 r217296  
    11131113}
    11141114
    1115 void PlatformCALayer::drawLayerContents(CGContextRef context, WebCore::PlatformCALayer* platformCALayer, RepaintRectList& dirtyRects)
     1115void PlatformCALayer::drawLayerContents(CGContextRef context, WebCore::PlatformCALayer* platformCALayer, RepaintRectList& dirtyRects, GraphicsLayerPaintFlags flags)
    11161116{
    11171117    WebCore::PlatformCALayerClient* layerContents = platformCALayer->owner();
     
    11601160            graphicsContext.clip(rect);
    11611161           
    1162             layerContents->platformCALayerPaintContents(platformCALayer, graphicsContext, rect);
     1162            layerContents->platformCALayerPaintContents(platformCALayer, graphicsContext, rect, flags);
    11631163        }
    11641164       
  • trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp

    r216702 r217296  
    110110}
    111111
    112 void PlatformCALayer::drawLayerContents(CGContextRef context, WebCore::PlatformCALayer* platformCALayer, RepaintRectList&)
     112void PlatformCALayer::drawLayerContents(CGContextRef context, WebCore::PlatformCALayer* platformCALayer, RepaintRectList&, GraphicsLayerPaintFlags)
    113113{
    114114    intern(platformCALayer)->displayCallback(platformCALayer->platformLayer(), context);
  • trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp

    r206830 r217296  
    105105    CGRect clipBounds = CGContextGetClipBoundingBox(context);
    106106    IntRect clip(enclosingIntRect(clipBounds));
    107     client->platformCALayerPaintContents(owner(), graphicsContext, clip);
     107    client->platformCALayerPaintContents(owner(), graphicsContext, clip, GraphicsLayerPaintFlags::None);
    108108
    109109    if (client->platformCALayerShowRepaintCounter(owner())
  • trunk/Source/WebCore/platform/graphics/ca/win/WebTiledBackingLayerWin.cpp

    r206830 r217296  
    9696    CGRect clipBounds = CGContextGetClipBoundingBox(context);
    9797    IntRect clip(enclosingIntRect(clipBounds));
    98     client->platformCALayerPaintContents(owner(), graphicsContext, clip);
     98    client->platformCALayerPaintContents(owner(), graphicsContext, clip, GraphicsLayerPaintFlags::None);
    9999
    100100    if (client->platformCALayerShowRepaintCounter(owner())) {
  • trunk/Source/WebCore/platform/graphics/mac/WebLayer.h

    r169960 r217296  
    3030
    3131#ifdef __OBJC__
    32 @interface WebSimpleLayer : CALayer
     32@interface WebSimpleLayer : CALayer {
     33    BOOL _isRenderingInContext;
     34}
     35@property (nonatomic, readonly) BOOL isRenderingInContext;
    3336@end
    3437
  • trunk/Source/WebCore/platform/graphics/mac/WebLayer.mm

    r211305 r217296  
    3131#import "PlatformCALayer.h"
    3232#import <QuartzCore/QuartzCore.h>
     33#import <wtf/SetForScope.h>
    3334
    3435#if PLATFORM(IOS)
     
    5758    if (layer) {
    5859        PlatformCALayer::RepaintRectList rectsToPaint = PlatformCALayer::collectRectsToPaint(context, layer);
    59         PlatformCALayer::drawLayerContents(context, layer, rectsToPaint);
     60        PlatformCALayer::drawLayerContents(context, layer, rectsToPaint, self.isRenderingInContext ? GraphicsLayerPaintFlags::Snapshotting : GraphicsLayerPaintFlags::None);
    6061    }
    6162}
     
    6465
    6566@implementation WebSimpleLayer
     67
     68@synthesize isRenderingInContext = _isRenderingInContext;
     69
     70- (void)renderInContext:(CGContextRef)context
     71{
     72    SetForScope<BOOL> change(_isRenderingInContext, YES);
     73    [super renderInContext:context];
     74}
    6675
    6776- (id<CAAction>)actionForKey:(NSString *)key
     
    129138
    130139        FloatRect clipBounds = CGContextGetClipBoundingBox(context);
    131         layer->owner()->platformCALayerPaintContents(layer, graphicsContext, clipBounds);
     140        layer->owner()->platformCALayerPaintContents(layer, graphicsContext, clipBounds, self.isRenderingInContext ? GraphicsLayerPaintFlags::Snapshotting : GraphicsLayerPaintFlags::None);
    132141    }
    133142}
  • trunk/Source/WebCore/platform/ios/LegacyTileCache.h

    r208985 r217296  
    134134    // Internal
    135135    void doLayoutTiles();
    136     void drawLayer(LegacyTileLayer*, CGContextRef);
     136   
     137    enum class DrawingFlags { None, Snapshotting };
     138    void drawLayer(LegacyTileLayer*, CGContextRef, DrawingFlags);
    137139    void prepareToDraw();
    138140    void finishedCreatingTiles(bool didCreateTiles, bool createMore);
     
    173175
    174176    void drawReplacementImage(LegacyTileLayer*, CGContextRef, CGImageRef);
    175     void drawWindowContent(LegacyTileLayer*, CGContextRef, CGRect dirtyRect);
    176 
    177     WAKWindow* m_window;
     177    void drawWindowContent(LegacyTileLayer*, CGContextRef, CGRect dirtyRect, DrawingFlags);
     178
     179    WAKWindow* m_window { nullptr };
    178180
    179181    RetainPtr<CGImageRef> m_contentReplacementImage;
    180182
    181     bool m_keepsZoomedOutTiles;
    182 
    183     bool m_hasPendingLayoutTiles;
    184     bool m_hasPendingUpdateTilingMode;
    185183    // Ensure there are no async calls on a dead tile cache.
    186184    RetainPtr<LegacyTileCacheTombstone> m_tombstone;
     
    188186    std::optional<FloatRect> m_overrideVisibleRect;
    189187
    190     TilingMode m_tilingMode;
    191     TilingDirection m_tilingDirection;
    192 
    193     IntSize m_tileSize;
    194     bool m_tilesOpaque;
    195 
    196     bool m_tileBordersVisible;
    197     bool m_tilePaintCountersVisible;
    198     bool m_acceleratedDrawingEnabled;
    199     bool m_isSpeculativeTileCreationEnabled;
    200 
    201     bool m_didCallWillStartScrollingOrZooming;
     188    IntSize m_tileSize { 512, 512 };
     189   
     190    TilingMode m_tilingMode { Normal };
     191    TilingDirection m_tilingDirection { TilingDirectionDown };
     192   
     193    bool m_keepsZoomedOutTiles { false };
     194    bool m_hasPendingLayoutTiles { false };
     195    bool m_hasPendingUpdateTilingMode { false };
     196    bool m_tilesOpaque { true };
     197    bool m_tileBordersVisible { false };
     198    bool m_tilePaintCountersVisible { false };
     199    bool m_acceleratedDrawingEnabled { false };
     200    bool m_isSpeculativeTileCreationEnabled { true };
     201    bool m_tileControllerShouldUseLowScaleTiles { false };
     202    bool m_didCallWillStartScrollingOrZooming { false };
     203   
    202204    std::unique_ptr<LegacyTileGrid> m_zoomedOutTileGrid;
    203205    std::unique_ptr<LegacyTileGrid> m_zoomedInTileGrid;
     
    207209    Vector<IntRect> m_savedDisplayRects;
    208210
    209     float m_currentScale;
    210 
    211     float m_pendingScale;
    212     float m_pendingZoomedOutScale;
     211    float m_currentScale { 1 };
     212
     213    float m_pendingScale { 0 };
     214    float m_pendingZoomedOutScale { 0 };
    213215
    214216    mutable Lock m_tileMutex;
    215217    mutable Lock m_savedDisplayRectMutex;
    216218    mutable Lock m_contentReplacementImageMutex;
    217 
    218     bool m_tileControllerShouldUseLowScaleTiles;
    219219};
    220220
  • trunk/Source/WebCore/platform/ios/LegacyTileCache.mm

    r215160 r217296  
    7171LegacyTileCache::LegacyTileCache(WAKWindow* window)
    7272    : m_window(window)
    73     , m_keepsZoomedOutTiles(false)
    74     , m_hasPendingLayoutTiles(false)
    75     , m_hasPendingUpdateTilingMode(false)
    7673    , m_tombstone(adoptNS([[LegacyTileCacheTombstone alloc] init]))
    77     , m_tilingMode(Normal)
    78     , m_tilingDirection(TilingDirectionDown)
    79     , m_tileSize(512, 512)
    80     , m_tilesOpaque(true)
    81     , m_tileBordersVisible(false)
    82     , m_tilePaintCountersVisible(false)
    83     , m_acceleratedDrawingEnabled(false)
    84     , m_isSpeculativeTileCreationEnabled(true)
    85     , m_didCallWillStartScrollingOrZooming(false)
    8674    , m_zoomedOutTileGrid(std::make_unique<LegacyTileGrid>(*this, m_tileSize))
    8775    , m_tileCreationTimer(*this, &LegacyTileCache::tileCreationTimerFired)
    88     , m_currentScale(1.f)
    89     , m_pendingScale(0)
    90     , m_pendingZoomedOutScale(0)
    91     , m_tileControllerShouldUseLowScaleTiles(false)
    9276{
    9377    [hostLayer() insertSublayer:m_zoomedOutTileGrid->tileHostLayer() atIndex:0];
     
    521505}
    522506
    523 void LegacyTileCache::drawWindowContent(LegacyTileLayer* layer, CGContextRef context, CGRect dirtyRect)
     507void LegacyTileCache::drawWindowContent(LegacyTileLayer* layer, CGContextRef context, CGRect dirtyRect, DrawingFlags drawingFlags)
    524508{
    525509    CGRect frame = [layer frame];
     
    527511    fontAntialiasingState.setup([WAKWindow hasLandscapeOrientation]);
    528512
     513    if (drawingFlags == DrawingFlags::Snapshotting)
     514        [m_window setIsInSnapshottingPaint:YES];
     515       
    529516    CGSRegionObj drawRegion = (CGSRegionObj)[layer regionBeingDrawn];
    530517    CGFloat contentsScale = [layer contentsScale];
     518   
    531519    if (drawRegion && shouldRepaintInPieces(dirtyRect, drawRegion, contentsScale)) {
    532520        // Use fine grained repaint rectangles to minimize the amount of painted pixels.
     
    551539
    552540    fontAntialiasingState.restore();
    553 }
    554 
    555 void LegacyTileCache::drawLayer(LegacyTileLayer* layer, CGContextRef context)
     541   
     542    if (drawingFlags == DrawingFlags::Snapshotting)
     543        [m_window setIsInSnapshottingPaint:NO];
     544}
     545
     546void LegacyTileCache::drawLayer(LegacyTileLayer* layer, CGContextRef context, DrawingFlags drawingFlags)
    556547{
    557548    // The web lock unlock observer runs after CA commit observer.
     
    572563        drawReplacementImage(layer, context, contentReplacementImage.get());
    573564    else
    574         drawWindowContent(layer, context, dirtyRect);
     565        drawWindowContent(layer, context, dirtyRect, drawingFlags);
    575566
    576567    ++layer.paintCount;
  • trunk/Source/WebCore/platform/ios/LegacyTileLayer.h

    r166529 r217296  
    2424 */
    2525
    26 #ifndef LegacyTileLayer_h
    27 #define LegacyTileLayer_h
     26#pragma once
    2827
    2928#if PLATFORM(IOS)
     
    3837    WebCore::LegacyTileGrid* _tileGrid;
    3938    unsigned _paintCount;
     39    BOOL _isRenderingInContext;
    4040}
    4141@property (nonatomic) unsigned paintCount;
    4242@property (nonatomic) WebCore::LegacyTileGrid* tileGrid;
    43 + (LegacyTileLayer *)layerBeingPainted;
     43@property (nonatomic, readonly) BOOL isRenderingInContext;
    4444@end
    4545
     
    5151
    5252#endif // PLATFORM(IOS)
    53 #endif // TileLayer_h
     53
  • trunk/Source/WebCore/platform/ios/LegacyTileLayer.mm

    r208985 r217296  
    3232#include "LegacyTileGrid.h"
    3333#include "WebCoreThread.h"
     34#include <wtf/SetForScope.h>
    3435
    3536using namespace WebCore;
     
    7273@synthesize paintCount = _paintCount;
    7374@synthesize tileGrid = _tileGrid;
    74 
    75 static LegacyTileLayer *layerBeingPainted;
     75@synthesize isRenderingInContext = _isRenderingInContext;
    7676
    7777- (void)setNeedsDisplayInRect:(CGRect)rect
     
    9494}
    9595
     96- (void)renderInContext:(CGContextRef)context
     97{
     98    SetForScope<BOOL> change(_isRenderingInContext, YES);
     99    [super renderInContext:context];
     100}
     101
    96102- (void)drawInContext:(CGContextRef)context
    97103{
     
    106112
    107113    if (_tileGrid)
    108         _tileGrid->tileCache().drawLayer(self, context);
     114        _tileGrid->tileCache().drawLayer(self, context, self.isRenderingInContext ? LegacyTileCache::DrawingFlags::Snapshotting : LegacyTileCache::DrawingFlags::None);
    109115}
    110116
     
    116122}
    117123
    118 + (LegacyTileLayer *)layerBeingPainted
    119 {
    120     return layerBeingPainted;
    121 }
    122 
    123124@end
    124125
  • trunk/Source/WebCore/platform/ios/wak/WAKView.mm

    r211878 r217296  
    506506}
    507507
    508 - (void)_drawRect:(NSRect)dirtyRect context:(CGContextRef)context lockFocus:(bool)lockFocus
     508- (void)_drawRect:(NSRect)dirtyRect context:(CGContextRef)context lockFocus:(BOOL)lockFocus
    509509{
    510510    if (_isHidden)
  • trunk/Source/WebCore/platform/ios/wak/WAKWindow.h

    r191484 r217296  
    8585
    8686    BOOL _visible;
     87    BOOL _isInSnapshottingPaint;
    8788    BOOL _useOrientationDependentFontAntialiasing;
    8889    BOOL _entireWindowVisibleForTesting;
     
    131132- (void)sendEventSynchronously:(WebEvent *)anEvent;
    132133- (void)sendMouseMoveEvent:(WebEvent *)anEvent contentChange:(WKContentChange *)aContentChange;
     134
     135- (void)setIsInSnapshottingPaint:(BOOL)isInSnapshottingPaint;
     136- (BOOL)isInSnapshottingPaint;
    133137
    134138// Thread safe way of providing the "usable" rect of the WAKWindow in the viewport/scrollview.
  • trunk/Source/WebCore/platform/ios/wak/WAKWindow.mm

    r191904 r217296  
    439439}
    440440
     441- (void)setIsInSnapshottingPaint:(BOOL)isInSnapshottingPaint
     442{
     443    _isInSnapshottingPaint = isInSnapshottingPaint;
     444}
     445
     446- (BOOL)isInSnapshottingPaint
     447{
     448    return _isInSnapshottingPaint;
     449}
     450
    441451- (void)setEntireWindowVisibleForTesting:(BOOL)entireWindowVisible
    442452{
  • trunk/Source/WebCore/rendering/PaintPhase.h

    r213614 r217296  
    5959    PaintBehaviorForceBlackText              = 1 << 2,
    6060    PaintBehaviorForceWhiteText              = 1 << 3,
    61     PaintBehaviorFlattenCompositingLayers    = 1 << 4,
    62     PaintBehaviorRenderingSVGMask            = 1 << 5,
    63     PaintBehaviorSkipRootBackground          = 1 << 6,
    64     PaintBehaviorRootBackgroundOnly          = 1 << 7,
    65     PaintBehaviorSelectionAndBackgroundsOnly = 1 << 8,
    66     PaintBehaviorExcludeSelection            = 1 << 9,
     61    PaintBehaviorRenderingSVGMask            = 1 << 4,
     62    PaintBehaviorSkipRootBackground          = 1 << 5,
     63    PaintBehaviorRootBackgroundOnly          = 1 << 6,
     64    PaintBehaviorSelectionAndBackgroundsOnly = 1 << 7,
     65    PaintBehaviorExcludeSelection            = 1 << 8,
     66    PaintBehaviorFlattenCompositingLayers    = 1 << 9, // Paint doesn't stop at compositing layer boundaries.
     67    PaintBehaviorSnapshotting                = 1 << 10, // Indicates snapshotting, e.g. force synchronous image decoding.
    6768};
    6869
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r214173 r217296  
    16131613    bool pushTransparencyLayer = false;
    16141614    bool compositedMask = hasLayer() && layer()->hasCompositedMask();
    1615     bool flattenCompositingLayers = view().frameView().paintBehavior() & PaintBehaviorFlattenCompositingLayers;
     1615    bool flattenCompositingLayers = paintInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers;
    16161616    CompositeOperator compositeOp = CompositeSourceOver;
    16171617
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r216135 r217296  
    883883
    884884            auto interpolation = chooseInterpolationQuality(context, *image, &bgLayer, geometry.tileSize());
    885             auto decodingMode = (view().frameView().paintBehavior() & PaintBehaviorFlattenCompositingLayers) ? DecodingMode::Synchronous : DecodingMode::Asynchronous;
     885            auto decodingMode = (paintInfo.paintBehavior & (PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting)) ? DecodingMode::Synchronous : DecodingMode::Asynchronous;
    886886            context.drawTiledImage(*image, geometry.destRect(), toLayoutPoint(geometry.relativePhase()), geometry.tileSize(), geometry.spaceSize(), ImagePaintingOptions(compositeOp, bgLayer.blendMode(), decodingMode, ImageOrientationDescription(), interpolation));
    887887        }
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r216728 r217296  
    476476        context.clip(contentBoxRect);
    477477
    478     paintIntoRect(context, snapRectToDevicePixels(replacedContentRect, deviceScaleFactor));
     478    paintIntoRect(paintInfo, snapRectToDevicePixels(replacedContentRect, deviceScaleFactor));
    479479   
    480480    if (cachedImage() && paintInfo.phase == PaintPhaseForeground) {
     
    560560}
    561561
    562 void RenderImage::paintIntoRect(GraphicsContext& context, const FloatRect& rect)
     562void RenderImage::paintIntoRect(PaintInfo& paintInfo, const FloatRect& rect)
    563563{
    564564    if (!imageResource().cachedImage() || imageResource().errorOccurred() || rect.width() <= 0 || rect.height() <= 0)
     
    574574    // FIXME: Document when image != img.get().
    575575    Image* image = imageResource().image().get();
    576     InterpolationQuality interpolation = image ? chooseInterpolationQuality(context, *image, image, LayoutSize(rect.size())) : InterpolationDefault;
     576    InterpolationQuality interpolation = image ? chooseInterpolationQuality(paintInfo.context(), *image, image, LayoutSize(rect.size())) : InterpolationDefault;
    577577
    578578#if USE(CG)
     
    585585
    586586    ImageOrientationDescription orientationDescription(shouldRespectImageOrientation(), style().imageOrientation());
    587     auto decodingMode = (view().frameView().paintBehavior() & PaintBehaviorFlattenCompositingLayers) ? DecodingMode::Synchronous : DecodingMode::Asynchronous;
    588     context.drawImage(*img, rect, ImagePaintingOptions(compositeOperator, BlendModeNormal, decodingMode, orientationDescription, interpolation));
     587
     588    auto decodingMode = (paintInfo.paintBehavior & (PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting)) ? DecodingMode::Synchronous : DecodingMode::Asynchronous;
     589    paintInfo.context().drawImage(*img, rect, ImagePaintingOptions(compositeOperator, BlendModeNormal, decodingMode, orientationDescription, interpolation));
    589590}
    590591
  • trunk/Source/WebCore/rendering/RenderImage.h

    r214173 r217296  
    8989    void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override;
    9090
    91     void paintIntoRect(GraphicsContext&, const FloatRect&);
     91    void paintIntoRect(PaintInfo&, const FloatRect&);
    9292    void paint(PaintInfo&, const LayoutPoint&) final;
    9393    void layout() override;
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r217084 r217296  
    43844384            paintBehavior |= PaintBehaviorRootBackgroundOnly;
    43854385
     4386        if (paintingInfo.paintBehavior & PaintBehaviorSnapshotting)
     4387            paintBehavior |= PaintBehaviorSnapshotting;
     4388
    43864389        if (paintingInfo.paintBehavior & PaintBehaviorExcludeSelection)
    43874390            paintBehavior |= PaintBehaviorExcludeSelection;
     
    47864789        localPaintBehavior |= PaintBehaviorExcludeSelection;
    47874790
     4791    if (localPaintingInfo.paintBehavior & PaintBehaviorSnapshotting)
     4792        localPaintBehavior |= PaintBehaviorSnapshotting;
     4793
    47884794    // Optimize clipping for the single fragment case.
    47894795    bool shouldClip = localPaintingInfo.clipToDirtyRect && layerFragments.size() == 1 && layerFragments[0].shouldPaintContent && !layerFragments[0].foregroundRect.isEmpty();
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r216688 r217296  
    25462546
    25472547// Up-call from compositing layer drawing callback.
    2548 void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase paintingPhase, const FloatRect& clip)
     2548void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase paintingPhase, const FloatRect& clip, GraphicsLayerPaintFlags flags)
    25492549{
    25502550#ifndef NDEBUG
     
    25692569
    25702570        // We have to use the same root as for hit testing, because both methods can compute and cache clipRects.
    2571         paintIntoLayer(graphicsLayer, context, dirtyRect, PaintBehaviorNormal, paintingPhase);
     2571        PaintBehavior behavior = PaintBehaviorNormal;
     2572        if (flags == GraphicsLayerPaintFlags::Snapshotting)
     2573            behavior |= PaintBehaviorSnapshotting;
     2574
     2575        paintIntoLayer(graphicsLayer, context, dirtyRect, behavior, paintingPhase);
    25722576
    25732577        InspectorInstrumentation::didPaint(renderer(), dirtyRect);
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r213466 r217296  
    198198    void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) override;
    199199
    200     void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clip) override;
     200    void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintFlags) override;
    201201
    202202    float deviceScaleFactor() const override;
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r216688 r217296  
    28642864}
    28652865
    2866 void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip)
     2866void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& context, GraphicsLayerPaintingPhase, const FloatRect& clip, GraphicsLayerPaintFlags)
    28672867{
    28682868    IntRect pixelSnappedRectForIntegralPositionedItems = snappedIntRect(LayoutRect(clip));
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r215759 r217296  
    333333    // GraphicsLayerClient implementation
    334334    void notifyFlushRequired(const GraphicsLayer*) override;
    335     void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&) override;
     335    void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&, GraphicsLayerPaintFlags) override;
    336336    void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const override;
    337337    bool isTrackingRepaints() const override;
  • trunk/Source/WebCore/rendering/RenderVideo.cpp

    r216766 r217296  
    199199
    200200    if (displayingPoster)
    201         paintIntoRect(context, rect);
     201        paintIntoRect(paintInfo, rect);
    202202    else if (!videoElement().isFullscreen() || !mediaPlayer->supportsAcceleratedRendering()) {
    203         if (view().frameView().paintBehavior() & PaintBehaviorFlattenCompositingLayers)
     203        if (paintInfo.paintBehavior & PaintBehaviorFlattenCompositingLayers)
    204204            mediaPlayer->paintCurrentFrameInContext(context, rect);
    205205        else
  • trunk/Source/WebKit/mac/ChangeLog

    r217293 r217296  
     12017-05-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Snapshotting via -renderInContext: should do synchronous image decodes
     4        https://bugs.webkit.org/show_bug.cgi?id=172485
     5        rdar://problem/32276146
     6
     7        Reviewed by Tim Horton.
     8
     9        Remove the _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap: SPI that no longer
     10        has any callers.
     11
     12        * Plugins/WebBaseNetscapePluginView.h:
     13        * Plugins/WebBaseNetscapePluginView.mm:
     14        (-[WebBaseNetscapePluginView inFlatteningPaint]): Deleted.
     15        * WebView/WebFrame.mm:
     16        (-[WebFrame _paintBehaviorForDestinationContext:]):
     17        (-[WebFrame _drawRect:contentsOnly:]):
     18        (-[WebFrame _shouldFlattenCompositingLayers:]): Deleted.
     19        * WebView/WebHTMLView.mm:
     20        (imageFromRect):
     21        * WebView/WebView.mm:
     22        (-[WebView _commonInitializationWithFrameName:groupName:]):
     23        (-[WebView _setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:]): Deleted.
     24        (-[WebView _includesFlattenedCompositingLayersWhenDrawingToBitmap]): Deleted.
     25        * WebView/WebViewData.h:
     26        * WebView/WebViewPrivate.h:
     27
    1282017-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
    229
  • trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.h

    r216816 r217296  
    113113- (void)removeWindowObservers;
    114114- (BOOL)shouldClipOutPlugin;
    115 - (BOOL)inFlatteningPaint;
    116115
    117116- (BOOL)supportsSnapshotting;
  • trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm

    r216816 r217296  
    437437    NSWindow *window = [self window];
    438438    return !window || [window isMiniaturized] || [NSApp isHidden] || ![self isDescendantOf:[[self window] contentView]] || [self isHiddenOrHasHiddenAncestor];
    439 }
    440 
    441 - (BOOL)inFlatteningPaint
    442 {
    443     auto* renderer = _element->renderer();
    444     if (!is<RenderEmbeddedObject>(renderer))
    445         return NO;
    446     return !!(downcast<RenderEmbeddedObject>(*renderer).view().frameView().paintBehavior() & PaintBehaviorFlattenCompositingLayers);
    447439}
    448440
  • trunk/Source/WebKit/mac/WebView/WebFrame.mm

    r216816 r217296  
    121121#import <WebCore/TextResourceDecoder.h>
    122122#import <WebCore/WAKScrollView.h>
     123#import <WebCore/WAKWindow.h>
    123124#import <WebCore/WKGraphics.h>
    124125#import <WebCore/WebCoreThreadRun.h>
     
    583584}
    584585
    585 - (BOOL)_shouldFlattenCompositingLayers:(CGContextRef)context
     586
     587- (PaintBehavior)_paintBehaviorForDestinationContext:(CGContextRef)context
    586588{
    587589#if !PLATFORM(IOS)
     
    589591    BOOL isPrinting = ![NSGraphicsContext currentContextDrawingToScreen];
    590592    if (isPrinting)
    591         return YES;
     593        return PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting;
    592594#endif
    593595
    594596    if (!WKCGContextIsBitmapContext(context))
    595         return NO;
     597        return 0;
    596598
    597599    // If we're drawing into a bitmap, we might be snapshotting, or drawing into a layer-backed view.
    598600    id documentView = [_private->webFrameView documentView];
    599     if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _web_isDrawingIntoLayer])
    600         return NO;
    601 
    602     return [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap];
     601    if ([documentView isKindOfClass:[WebHTMLView class]]) {
     602#if PLATFORM(IOS)
     603        if ([[documentView window] isInSnapshottingPaint])
     604            return PaintBehaviorSnapshotting;
     605#endif
     606        if ([(WebHTMLView *)documentView _web_isDrawingIntoLayer])
     607            return 0;
     608    }
     609   
     610    return PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting;
    603611}
    604612
     
    623631    FrameView* view = _private->coreFrame->view();
    624632   
    625     bool shouldFlatten = false;
     633    PaintBehavior oldBehavior = view->paintBehavior();
     634    PaintBehavior paintBehavior = oldBehavior;
     635   
    626636    if (Frame* parentFrame = _private->coreFrame->tree().parent()) {
    627637        // For subframes, we need to inherit the paint behavior from our parent
    628         FrameView* parentView = parentFrame ? parentFrame->view() : 0;
    629         if (parentView)
    630             shouldFlatten = parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
     638        if (FrameView* parentView = parentFrame ? parentFrame->view() : nullptr) {
     639            if (parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers)
     640                paintBehavior |= PaintBehaviorFlattenCompositingLayers;
     641               
     642            if (parentView->paintBehavior() & PaintBehaviorSnapshotting)
     643                paintBehavior |= PaintBehaviorSnapshotting;
     644        }
    631645    } else
    632         shouldFlatten = [self _shouldFlattenCompositingLayers:ctx];
    633 
    634     PaintBehavior oldBehavior = PaintBehaviorNormal;
    635     if (shouldFlatten) {
    636         oldBehavior = view->paintBehavior();
    637         view->setPaintBehavior(oldBehavior | PaintBehaviorFlattenCompositingLayers);
    638     }
    639    
     646        paintBehavior |= [self _paintBehaviorForDestinationContext:ctx];
     647       
     648    view->setPaintBehavior(paintBehavior);
     649
    640650    if (contentsOnly)
    641651        view->paintContents(context, enclosingIntRect(rect));
     
    643653        view->paint(context, enclosingIntRect(rect));
    644654
    645     if (shouldFlatten)
    646         view->setPaintBehavior(oldBehavior);
     655    view->setPaintBehavior(oldBehavior);
    647656}
    648657
  • trunk/Source/WebKit/mac/WebView/WebHTMLView.mm

    r216816 r217296  
    72987298   
    72997299    PaintBehavior oldPaintBehavior = frame->view()->paintBehavior();
    7300     frame->view()->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLayers);
    7301    
     7300    frame->view()->setPaintBehavior(oldPaintBehavior | PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting);
     7301
    73027302    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    73037303   
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r217273 r217296  
    13701370    _private->backgroundColor = CGColorRetain(cachedCGColor(Color::white));
    13711371#endif
    1372     _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = YES;
    13731372
    13741373#if PLATFORM(MAC)
     
    45034502
    45044503    return YES;
    4505 }
    4506 
    4507 - (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag
    4508 {
    4509     _private->includesFlattenedCompositingLayersWhenDrawingToBitmap = flag;
    4510 }
    4511 
    4512 - (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap
    4513 {
    4514     return _private->includesFlattenedCompositingLayersWhenDrawingToBitmap;
    45154504}
    45164505
  • trunk/Source/WebKit/mac/WebView/WebViewData.h

    r216816 r217296  
    308308    BOOL shouldUpdateWhileOffscreen;
    309309
    310     BOOL includesFlattenedCompositingLayersWhenDrawingToBitmap;
    311 
    312310    // When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates
    313311    // so that the NSView drawing is visually synchronized with CALayer updates.
  • trunk/Source/WebKit/mac/WebView/WebViewPrivate.h

    r215866 r217296  
    766766// Returns YES if NSView -displayRectIgnoringOpacity:inContext: will produce a faithful representation of the content.
    767767- (BOOL)_isSoftwareRenderable;
    768 // When drawing into a bitmap context, we normally flatten compositing layers (and distort 3D transforms).
    769 // Clients who are able to capture their own copy of the compositing layers need to be able to disable this.
    770 - (void)_setIncludesFlattenedCompositingLayersWhenDrawingToBitmap:(BOOL)flag;
    771 - (BOOL)_includesFlattenedCompositingLayersWhenDrawingToBitmap;
    772768
    773769- (void)setTracksRepaints:(BOOL)flag;
  • trunk/Source/WebKit/win/FullscreenVideoController.cpp

    r216702 r217296  
    188188    virtual void platformCALayerAnimationStarted(CFTimeInterval beginTime) { }
    189189    virtual GraphicsLayer::CompositingCoordinatesOrientation platformCALayerContentsOrientation() const { return GraphicsLayer::CompositingCoordinatesBottomUp; }
    190     virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&) { }
     190    virtual void platformCALayerPaintContents(PlatformCALayer*, GraphicsContext&, const FloatRect&, GraphicsLayerPaintFlags) { }
    191191    virtual bool platformCALayerShowDebugBorders() const { return false; }
    192192    virtual bool platformCALayerShowRepaintCounter(PlatformCALayer*) const { return false; }
  • trunk/Source/WebKit2/ChangeLog

    r217293 r217296  
     12017-05-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Snapshotting via -renderInContext: should do synchronous image decodes
     4        https://bugs.webkit.org/show_bug.cgi?id=172485
     5        rdar://problem/32276146
     6
     7        Reviewed by Tim Horton.
     8
     9        Pass the PaintBehaviorSnapshotting flag in functions that do snapshotting.
     10
     11        * Shared/mac/RemoteLayerBackingStore.mm:
     12        (WebKit::RemoteLayerBackingStore::drawInContext):
     13        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
     14        (WebKit::imageForRect):
     15        * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
     16        (WebKit::InjectedBundleRangeHandle::renderedImage):
     17
    1182017-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
    219
  • trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm

    r213940 r217296  
    341341    case PlatformCALayer::LayerTypeSimpleLayer:
    342342    case PlatformCALayer::LayerTypeTiledBackingTileLayer:
    343         m_layer->owner()->platformCALayerPaintContents(m_layer, context, dirtyBounds);
     343        m_layer->owner()->platformCALayerPaintContents(m_layer, context, dirtyBounds, GraphicsLayerPaintFlags::None);
    344344        break;
    345345    case PlatformCALayer::LayerTypeWebLayer:
    346346    case PlatformCALayer::LayerTypeBackdropLayer:
    347         PlatformCALayer::drawLayerContents(cgContext, m_layer, m_paintingRects);
     347        PlatformCALayer::drawLayerContents(cgContext, m_layer, m_paintingRects, GraphicsLayerPaintFlags::None);
    348348        break;
    349349    case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:
     
    351351        // FIXME: These have a more complicated layer hierarchy. We need to paint into
    352352        // a child layer in order to see the rendered results.
    353         PlatformCALayer::drawLayerContents(cgContext, m_layer, m_paintingRects);
     353        PlatformCALayer::drawLayerContents(cgContext, m_layer, m_paintingRects, GraphicsLayerPaintFlags::None);
    354354        break;
    355355    case PlatformCALayer::LayerTypeLayer:
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp

    r216185 r217296  
    170170        shouldPaintSelection = FrameView::ExcludeSelection;
    171171
    172     PaintBehavior paintBehavior = frameView->paintBehavior() | PaintBehaviorFlattenCompositingLayers;
     172    PaintBehavior paintBehavior = frameView->paintBehavior() | (PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting);
    173173    if (options & SnapshotOptionsForceBlackText)
    174174        paintBehavior |= PaintBehaviorForceBlackText;
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp

    r216810 r217296  
    144144
    145145    PaintBehavior oldPaintBehavior = frameView->paintBehavior();
    146     PaintBehavior paintBehavior = oldPaintBehavior | PaintBehaviorSelectionOnly | PaintBehaviorFlattenCompositingLayers;
     146    PaintBehavior paintBehavior = oldPaintBehavior | PaintBehaviorSelectionOnly | PaintBehaviorFlattenCompositingLayers | PaintBehaviorSnapshotting;
    147147    if (options & SnapshotOptionsForceBlackText)
    148148        paintBehavior |= PaintBehaviorForceBlackText;
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp

    r217214 r217296  
    269269}
    270270
    271 void CompositingCoordinator::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const FloatRect& clipRect)
     271void CompositingCoordinator::paintContents(const GraphicsLayer* graphicsLayer, GraphicsContext& graphicsContext, GraphicsLayerPaintingPhase, const FloatRect& clipRect, GraphicsLayerPaintFlags)
    272272{
    273273    m_client.paintLayerContents(graphicsLayer, graphicsContext, enclosingIntRect(clipRect));
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h

    r217214 r217296  
    100100    void notifyAnimationStarted(const WebCore::GraphicsLayer*, const String&, double time) override;
    101101    void notifyFlushRequired(const WebCore::GraphicsLayer*) override;
    102     void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect) override;
     102    void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect, WebCore::GraphicsLayerPaintFlags) override;
    103103    float deviceScaleFactor() const override;
    104104    float pageScaleFactor() const override;
  • trunk/Tools/ChangeLog

    r217293 r217296  
     12017-05-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Snapshotting via -renderInContext: should do synchronous image decodes
     4        https://bugs.webkit.org/show_bug.cgi?id=172485
     5        rdar://problem/32276146
     6
     7        Reviewed by Tim Horton.
     8
     9        New API test.
     10
     11        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
     12        * TestWebKitAPI/Tests/WebKit/ios/SnapshotViaRenderInContext.mm: Added.
     13        (-[RenderInContextWebViewDelegate webViewDidFinishLoad:]):
     14        (-[RenderInContextWebViewDelegate webView:didFailLoadWithError:]):
     15        (TestWebKitAPI::getPixelIndex):
     16        (TestWebKitAPI::TEST):
     17
    1182017-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
    219
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r217152 r217296  
    3434                0F2C20B81DCD545000542D9E /* Time.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2C20B71DCD544800542D9E /* Time.cpp */; };
    3535                0F3B94A71A77267400DE3272 /* WKWebViewEvaluateJavaScript.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F3B94A51A77266C00DE3272 /* WKWebViewEvaluateJavaScript.mm */; };
     36                0F4FFA9E1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F4FFA9D1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm */; };
    3637                1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; };
    3738                1A3524AE1D63A4FB0031729B /* Scope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3524AC1D63A4FB0031729B /* Scope.cpp */; };
     
    901902                0F2C20B71DCD544800542D9E /* Time.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Time.cpp; sourceTree = "<group>"; };
    902903                0F3B94A51A77266C00DE3272 /* WKWebViewEvaluateJavaScript.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewEvaluateJavaScript.mm; sourceTree = "<group>"; };
     904                0F4FFA9D1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SnapshotViaRenderInContext.mm; sourceTree = "<group>"; };
     905                0F4FFAA01ED3D0DE00F7111F /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
    903906                0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RedBlackTree.cpp; sourceTree = "<group>"; };
    904907                0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MetaAllocator.cpp; sourceTree = "<group>"; };
     
    18711874                        isa = PBXGroup;
    18721875                        children = (
     1876                                0F4FFAA01ED3D0DE00F7111F /* ImageIO.framework */,
    18731877                                634910DF1E9D3FF300880309 /* CoreLocation.framework */,
    18741878                                7A010BCA1D877C0500EDE72A /* CoreGraphics.framework */,
     
    25212525                                CDC8E49A1BC728FE00594FEC /* Resources */,
    25222526                                CDC8E4851BC5B19400594FEC /* AudioSessionCategoryIOS.mm */,
     2527                                0F4FFA9D1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm */,
    25232528                        );
    25242529                        path = ios;
     
    30463051                                CE3524F91B1441C40028A7C5 /* TextFieldDidBeginAndEndEditing.cpp in Sources */,
    30473052                                7CCE7EDD1A411A9200447C4C /* TimeRanges.cpp in Sources */,
     3053                                0F4FFA9E1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm in Sources */,
    30483054                                7CCE7ED31A411A7E00447C4C /* TypingStyleCrash.mm in Sources */,
    30493055                                7CCE7EDE1A411A9200447C4C /* URL.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.