Source/WebCore:
* page/ChromeClient.h:
(WebCore::ChromeClient::updateViewportConstrainedLayers):
Source/WebKit/ios:
* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
* WebCoreSupport/WebFixedPositionContent.mm:
* WebCoreSupport/WebFixedPositionContentInternal.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166512
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-03-31 Anders Carlsson <andersca@apple.com>
+
+ Fix iOS build.
+
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::updateViewportConstrainedLayers):
+
2014-03-31 Jer Noble <jer.noble@apple.com>
[MSE][Mac] Support lease-renewal.
virtual bool fetchCustomFixedPositionLayoutRect(IntRect&) { return false; }
- // FIXME: Use std::unique_ptr instead of OwnPtr.
- virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, OwnPtr<ViewportConstraints>>&, HashMap<PlatformLayer*, PlatformLayer*>&) { }
+ virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>>&, HashMap<PlatformLayer*, PlatformLayer*>&) { }
virtual void addOrUpdateScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const IntSize& scrollSize, bool allowHorizontalScrollbar, bool allowVerticalScrollbar) = 0;
virtual void removeScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer) = 0;
+2014-03-31 Anders Carlsson <andersca@apple.com>
+
+ Fix iOS build.
+
+ * WebCoreSupport/WebChromeClientIOS.h:
+ * WebCoreSupport/WebChromeClientIOS.mm:
+ * WebCoreSupport/WebFixedPositionContent.mm:
+ * WebCoreSupport/WebFixedPositionContentInternal.h:
+
2014-03-30 Dan Bernstein <mitz@apple.com>
Tried to fix the iOS build.
virtual void didFlushCompositingLayers() override;
- virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, OwnPtr<WebCore::ViewportConstraints> >&, HashMap<PlatformLayer*, PlatformLayer*>&) override;
+ virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<WebCore::ViewportConstraints>>&, HashMap<PlatformLayer*, PlatformLayer*>&) override;
virtual bool fetchCustomFixedPositionLayoutRect(WebCore::IntRect&) override;
virtual void addOrUpdateScrollingLayer(WebCore::Node*, PlatformLayer*, PlatformLayer*, const WebCore::IntSize&, bool allowHorizontalScrollbar, bool allowVerticalScrollbar) override;
return false;
}
-void WebChromeClientIOS::updateViewportConstrainedLayers(HashMap<PlatformLayer*, OwnPtr<ViewportConstraints> >& layerMap, HashMap<PlatformLayer*, PlatformLayer*>& stickyContainers)
+void WebChromeClientIOS::updateViewportConstrainedLayers(HashMap<PlatformLayer*, std::unique_ptr<ViewportConstraints>>& layerMap, HashMap<PlatformLayer*, PlatformLayer*>& stickyContainers)
{
[[webView() _fixedPositionContent] setViewportConstrainedLayers:layerMap stickyContainerMap:stickyContainers];
}
: m_enclosingAcceleratedScrollLayer(nil)
{ }
CALayer* m_enclosingAcceleratedScrollLayer; // May be nil.
- OwnPtr<ViewportConstraints> m_viewportConstraints;
+ std::unique_ptr<ViewportConstraints> m_viewportConstraints;
};
-typedef HashMap<RetainPtr<CALayer>, OwnPtr<ViewportConstrainedLayerData> > LayerInfoMap;
+typedef HashMap<RetainPtr<CALayer>, std::unique_ptr<ViewportConstrainedLayerData>> LayerInfoMap;
struct WebFixedPositionContentData {
public:
});
}
-- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, OwnPtr<WebCore::ViewportConstraints> >&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers
+- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers
{
MutexLocker lock(WebFixedPositionContentDataLock());
_private->m_viewportConstrainedLayers.clear();
- HashMap<CALayer *, OwnPtr<ViewportConstraints> >::iterator end = layerMap.end();
- for (HashMap<CALayer *, OwnPtr<ViewportConstraints> >::iterator it = layerMap.begin(); it != end; ++it) {
- CALayer* layer = it->key;
- OwnPtr<ViewportConstrainedLayerData> layerData = adoptPtr(new ViewportConstrainedLayerData);
+ for (auto& layerAndConstraints : layerMap) {
+ CALayer* layer = layerAndConstraints.key;
+ auto layerData = std::make_unique<ViewportConstrainedLayerData>();
layerData->m_enclosingAcceleratedScrollLayer = stickyContainers.get(layer);
- layerData->m_viewportConstraints = it->value.release();
+ layerData->m_viewportConstraints = std::move(layerAndConstraints.value);
- _private->m_viewportConstrainedLayers.set(layer, layerData.release());
+ _private->m_viewportConstrainedLayers.set(layer, std::move(layerData));
}
}
#import <Foundation/Foundation.h>
#import <wtf/HashMap.h>
-#import <wtf/OwnPtr.h>
@class CALayer;
@interface WebFixedPositionContent(WebKitInternal)
// Called from inside WebKit.
-- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, OwnPtr<WebCore::ViewportConstraints> >&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers;
+- (void)setViewportConstrainedLayers:(WTF::HashMap<CALayer *, std::unique_ptr<WebCore::ViewportConstraints>>&)layerMap stickyContainerMap:(WTF::HashMap<CALayer*, CALayer*>&)stickyContainers;
@end