Reviewed by Maciej.
[WebKit-https.git] / WebKit / WebView / WebFrame.m
index d6279d6e14e91f31327306c4768a4e17a0c778a0..f8ea2af6447c3203d56b1690f4d77c41762e463d 100644 (file)
@@ -1480,6 +1480,15 @@ static inline WebDataSource *dataSource(WebDocumentLoader *loader)
     [documentView setDataSource:[[self _frameLoader] dataSource]];
 }
 
+- (void)_forceLayout
+{
+    NSView <WebDocumentView> *view = [[self frameView] documentView];
+    if ([view isKindOfClass:[WebHTMLView class]])
+        [(WebHTMLView *)view setNeedsToApplyStyles:YES];
+    [view setNeedsLayout:YES];
+    [view layout];
+}
+
 - (void)_updateHistoryForCommit
 {
     WebFrameLoadType type = [[self _frameLoader] loadType];
@@ -1861,4 +1870,16 @@ static inline WebDataSource *dataSource(WebDocumentLoader *loader)
                                           proxy:proxy];
 }
 
+- (void)_setDocumentViewFromPageCache:(NSDictionary *)pageCache
+{
+    NSView <WebDocumentView> *cachedView = [pageCache objectForKey:WebPageCacheDocumentViewKey];
+    ASSERT(cachedView != nil);
+    [[self frameView] _setDocumentView:cachedView];
+}
+
+- (void)_setCopiesOnScroll
+{
+    [[[[self frameView] _scrollView] contentView] setCopiesOnScroll:YES];
+}
+
 @end