<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170361] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170361">170361</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-06-24 07:38:17 -0700 (Tue, 24 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>WKWebView doesn't respect -[UIScrollView contentInset]
https://bugs.webkit.org/show_bug.cgi?id=134230
<rdar://problem/17429107>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
Call initWithFrame and pass the WKWebView along.
(-[WKWebView _adjustedContentOffset:]):
New helper method that takes a content offset as a CGPoint and offsets it by the computed content inset.
(-[WKWebView _computedContentInset]):
New helper method that returns the _obscuredInsets, or if it's zero, the scroll view's content inset.
(-[WKWebView _processDidExit]):
Use _computedContentInset.
(-[WKWebView _didCommitLayerTree:WebKit::]):
use _computedContentInset.
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
Use _computedContentInset.
(-[WKWebView _scrollToContentOffset:WebCore::]):
Use _computedContentInset.
(-[WKWebView _updateVisibleContentRects]):
If we have a custom content view, call web_computedContentInsetDidChange.
(-[WKWebView _setObscuredInsets:]):
Don't call web_setObscuredInsets: if we have a custom content view.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Add new methods.
* UIProcess/Cocoa/WKWebViewContentProvider.h:
Add new methods.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]):
Set the _webView and _scrollView ivars.
(-[WKPDFView _offsetForPageNumberIndicator]):
Get the computed content offset from the WKWebView.
(-[WKPDFView web_computedContentInsetDidChange]):
Update the page indicator.
(-[WKPDFView initWithFrame:]): Deleted.
(-[WKPDFView web_setObscuredInsets:]): Deleted.
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView setContentInset:]):
Call _updateVisibleContentRects.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWKWebViewContentProviderh">trunk/Source/WebKit2/UIProcess/Cocoa/WKWebViewContentProvider.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKPDFViewmm">trunk/Source/WebKit2/UIProcess/ios/WKPDFView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKScrollViewmm">trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170360 => 170361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-24 14:24:05 UTC (rev 170360)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-24 14:38:17 UTC (rev 170361)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2014-06-24 Anders Carlsson <andersca@apple.com>
+
+ WKWebView doesn't respect -[UIScrollView contentInset]
+ https://bugs.webkit.org/show_bug.cgi?id=134230
+ <rdar://problem/17429107>
+
+ Reviewed by Tim Horton.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
+ Call initWithFrame and pass the WKWebView along.
+
+ (-[WKWebView _adjustedContentOffset:]):
+ New helper method that takes a content offset as a CGPoint and offsets it by the computed content inset.
+
+ (-[WKWebView _computedContentInset]):
+ New helper method that returns the _obscuredInsets, or if it's zero, the scroll view's content inset.
+
+ (-[WKWebView _processDidExit]):
+ Use _computedContentInset.
+
+ (-[WKWebView _didCommitLayerTree:WebKit::]):
+ use _computedContentInset.
+
+ (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
+ Use _computedContentInset.
+
+ (-[WKWebView _scrollToContentOffset:WebCore::]):
+ Use _computedContentInset.
+
+ (-[WKWebView _updateVisibleContentRects]):
+ If we have a custom content view, call web_computedContentInsetDidChange.
+
+ (-[WKWebView _setObscuredInsets:]):
+ Don't call web_setObscuredInsets: if we have a custom content view.
+
+ * UIProcess/API/Cocoa/WKWebViewInternal.h:
+ Add new methods.
+
+ * UIProcess/Cocoa/WKWebViewContentProvider.h:
+ Add new methods.
+
+ * UIProcess/ios/WKPDFView.mm:
+ (-[WKPDFView web_initWithFrame:webView:]):
+ Set the _webView and _scrollView ivars.
+
+ (-[WKPDFView _offsetForPageNumberIndicator]):
+ Get the computed content offset from the WKWebView.
+
+ (-[WKPDFView web_computedContentInsetDidChange]):
+ Update the page indicator.
+
+ (-[WKPDFView initWithFrame:]): Deleted.
+ (-[WKPDFView web_setObscuredInsets:]): Deleted.
+
+ * UIProcess/ios/WKScrollView.mm:
+ (-[WKScrollView setContentInset:]):
+ Call _updateVisibleContentRects.
+
</ins><span class="cx"> 2014-06-23 Jaehun Lim <ljaehun.lim@samsung.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, fix build warning.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (170360 => 170361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-06-24 14:24:05 UTC (rev 170360)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-06-24 14:38:17 UTC (rev 170361)
</span><span class="lines">@@ -589,7 +589,7 @@
</span><span class="cx">
</span><span class="cx"> Class representationClass = [[_configuration _contentProviderRegistry] providerForMIMEType:mimeType];
</span><span class="cx"> ASSERT(representationClass);
</span><del>- _customContentView = adoptNS([[representationClass alloc] init]);
</del><ins>+ _customContentView = adoptNS([[representationClass alloc] web_initWithFrame:self.bounds webView:self]);
</ins><span class="cx"> _customContentFixedOverlayView = adoptNS([[UIView alloc] initWithFrame:self.bounds]);
</span><span class="cx"> [_customContentFixedOverlayView setUserInteractionEnabled:NO];
</span><span class="cx">
</span><span class="lines">@@ -598,8 +598,6 @@
</span><span class="cx"> [self addSubview:_customContentFixedOverlayView.get()];
</span><span class="cx">
</span><span class="cx"> [_customContentView web_setMinimumSize:self.bounds.size];
</span><del>- [_customContentView web_setScrollView:_scrollView.get()];
- [_customContentView web_setObscuredInsets:_obscuredInsets];
</del><span class="cx"> [_customContentView web_setFixedOverlayView:_customContentFixedOverlayView.get()];
</span><span class="cx"> } else if (_customContentView) {
</span><span class="cx"> [_customContentView removeFromSuperview];
</span><span class="lines">@@ -689,6 +687,25 @@
</span><span class="cx"> return _usesMinimalUI;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (CGPoint)_adjustedContentOffset:(CGPoint)point
+{
+ CGPoint result = point;
+ UIEdgeInsets contentInset = [self _computedContentInset];
+
+ result.x -= contentInset.left;
+ result.y -= contentInset.top;
+
+ return result;
+}
+
+- (UIEdgeInsets)_computedContentInset
+{
+ if (!UIEdgeInsetsEqualToEdgeInsets(_obscuredInsets, UIEdgeInsetsZero))
+ return _obscuredInsets;
+
+ return [_scrollView contentInset];
+}
+
</ins><span class="cx"> - (void)_processDidExit
</span><span class="cx"> {
</span><span class="cx"> if (!_customContentView && _isAnimatingResize) {
</span><span class="lines">@@ -702,7 +719,7 @@
</span><span class="cx"> }
</span><span class="cx"> [_contentView setFrame:self.bounds];
</span><span class="cx"> [_scrollView setBackgroundColor:[UIColor whiteColor]];
</span><del>- [_scrollView setContentOffset:CGPointMake(-_obscuredInsets.left, -_obscuredInsets.top)];
</del><ins>+ [_scrollView setContentOffset:[self _adjustedContentOffset:CGPointZero]];
</ins><span class="cx"> [_scrollView setZoomScale:1];
</span><span class="cx">
</span><span class="cx"> _viewportMetaTagWidth = -1;
</span><span class="lines">@@ -778,7 +795,7 @@
</span><span class="cx">
</span><span class="cx"> if (_needsResetViewStateAfterCommitLoadForMainFrame && layerTreeTransaction.transactionID() >= _firstPaintAfterCommitLoadTransactionID) {
</span><span class="cx"> _needsResetViewStateAfterCommitLoadForMainFrame = NO;
</span><del>- [_scrollView setContentOffset:CGPointMake(-_obscuredInsets.left, -_obscuredInsets.top)];
</del><ins>+ [_scrollView setContentOffset:[self _adjustedContentOffset:CGPointZero]];
</ins><span class="cx"> [self _updateVisibleContentRects];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -819,9 +836,7 @@
</span><span class="cx"> double scale = newScale / currentTargetScale;
</span><span class="cx"> _resizeAnimationTransformAdjustments = CATransform3DMakeScale(scale, scale, 0);
</span><span class="cx">
</span><del>- CGPoint newContentOffset = CGPointMake(newScrollPosition.x * newScale, newScrollPosition.y * newScale);
- newContentOffset.x -= _obscuredInsets.left;
- newContentOffset.y -= _obscuredInsets.top;
</del><ins>+ CGPoint newContentOffset = [self _adjustedContentOffset:CGPointMake(newScrollPosition.x * newScale, newScrollPosition.y * newScale)];
</ins><span class="cx"> CGPoint currentContentOffset = [_scrollView contentOffset];
</span><span class="cx">
</span><span class="cx"> _resizeAnimationTransformAdjustments.m41 = (currentContentOffset.x - newContentOffset.x) / animatingScaleTarget;
</span><span class="lines">@@ -942,8 +957,7 @@
</span><span class="cx"> CGFloat zoomScale = contentZoomScale(self);
</span><span class="cx"> scaledOffset.scale(zoomScale, zoomScale);
</span><span class="cx">
</span><del>- scaledOffset -= WebCore::FloatSize(_obscuredInsets.left, _obscuredInsets.top);
- [_scrollView setContentOffset:scaledOffset];
</del><ins>+ [_scrollView setContentOffset:[self _adjustedContentOffset:scaledOffset]];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (BOOL)_scrollToRect:(WebCore::FloatRect)targetRect origin:(WebCore::FloatPoint)origin minimumScrollDistance:(float)minimumScrollDistance
</span><span class="lines">@@ -1267,8 +1281,10 @@
</span><span class="cx">
</span><span class="cx"> - (void)_updateVisibleContentRects
</span><span class="cx"> {
</span><del>- if (![self usesStandardContentView])
- return;
</del><ins>+ if (![self usesStandardContentView]) {
+ [_customContentView web_computedContentInsetDidChange];
+ return
+ }
</ins><span class="cx">
</span><span class="cx"> if (_delayUpdateVisibleContentRects) {
</span><span class="cx"> _hadDelayedUpdateVisibleContentRects = YES;
</span><span class="lines">@@ -1284,7 +1300,7 @@
</span><span class="cx"> CGRect fullViewRect = self.bounds;
</span><span class="cx"> CGRect visibleRectInContentCoordinates = [self convertRect:fullViewRect toView:_contentView.get()];
</span><span class="cx">
</span><del>- CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, _obscuredInsets);
</del><ins>+ CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, [self _computedContentInset]);
</ins><span class="cx"> CGRect unobscuredRectInContentCoordinates = [self convertRect:unobscuredRect toView:_contentView.get()];
</span><span class="cx">
</span><span class="cx"> CGFloat scaleFactor = contentZoomScale(self);
</span><span class="lines">@@ -1923,7 +1939,6 @@
</span><span class="cx"> _obscuredInsets = obscuredInsets;
</span><span class="cx">
</span><span class="cx"> [self _updateVisibleContentRects];
</span><del>- [_customContentView web_setObscuredInsets:obscuredInsets];
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_setInterfaceOrientationOverride:(UIInterfaceOrientation)interfaceOrientation
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (170360 => 170361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2014-06-24 14:24:05 UTC (rev 170360)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2014-06-24 14:38:17 UTC (rev 170361)
</span><span class="lines">@@ -88,6 +88,11 @@
</span><span class="cx">
</span><span class="cx"> - (void)_willInvokeUIScrollViewDelegateCallback;
</span><span class="cx"> - (void)_didInvokeUIScrollViewDelegateCallback;
</span><ins>+
+- (void)_updateVisibleContentRects;
+
+@property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
+
</ins><span class="cx"> #endif
</span><span class="cx"> @end
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWKWebViewContentProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WKWebViewContentProvider.h (170360 => 170361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WKWebViewContentProvider.h        2014-06-24 14:24:05 UTC (rev 170360)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WKWebViewContentProvider.h        2014-06-24 14:38:17 UTC (rev 170361)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> @class NSData;
</span><span class="cx"> @class UIScrollView;
</span><span class="cx"> @class UIView;
</span><ins>+@class WKWebView;
</ins><span class="cx"> @protocol NSObject;
</span><span class="cx"> @protocol UIScrollViewDelegate;
</span><span class="cx"> struct CGSize;
</span><span class="lines">@@ -40,11 +41,11 @@
</span><span class="cx"> // FIXME: This should be API (and probably should not be a UIScrollViewDelegate).
</span><span class="cx"> @protocol WKWebViewContentProvider <NSObject, UIScrollViewDelegate>
</span><span class="cx">
</span><ins>+- (instancetype)web_initWithFrame:(CGRect) frame webView:(WKWebView *)webView;
</ins><span class="cx"> - (void)web_setContentProviderData:(NSData *)data suggestedFilename:(NSString *)filename;
</span><span class="cx"> - (void)web_setMinimumSize:(CGSize)size;
</span><del>-- (void)web_setScrollView:(UIScrollView *)scrollView;
-- (void)web_setObscuredInsets:(UIEdgeInsets)insets;
</del><span class="cx"> - (void)web_setOverlaidAccessoryViewsInset:(CGSize)inset;
</span><ins>+- (void)web_computedContentInsetDidChange;
</ins><span class="cx"> - (void)web_setFixedOverlayView:(UIView *)fixedOverlayView;
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKPDFViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKPDFView.mm (170360 => 170361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKPDFView.mm        2014-06-24 14:24:05 UTC (rev 170360)
+++ trunk/Source/WebKit2/UIProcess/ios/WKPDFView.mm        2014-06-24 14:38:17 UTC (rev 170361)
</span><span class="lines">@@ -29,7 +29,9 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">
</span><span class="cx"> #import "WKPDFPageNumberIndicator.h"
</span><ins>+#import "WKWebViewInternal.h"
</ins><span class="cx"> #import <CorePDF/UIPDFDocument.h>
</span><ins>+#import <CorePDF/UIPDFPage.h>
</ins><span class="cx"> #import <CorePDF/UIPDFPageView.h>
</span><span class="cx"> #import <WebCore/FloatRect.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="lines">@@ -60,18 +62,26 @@
</span><span class="cx">
</span><span class="cx"> CGSize _minimumSize;
</span><span class="cx"> CGSize _overlaidAccessoryViewsInset;
</span><del>- UIEdgeInsets _obscuredInsets;
</del><ins>+ WKWebView *_webView;
</ins><span class="cx"> UIScrollView *_scrollView;
</span><span class="cx"> UIView *_fixedOverlayView;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (instancetype)initWithFrame:(CGRect)frame
</del><ins>+- (instancetype)web_initWithFrame:(CGRect)frame webView:(WKWebView *)webView
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [super initWithFrame:frame]))
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> self.backgroundColor = [UIColor grayColor];
</span><span class="cx">
</span><ins>+ _webView = webView;
+
+ _scrollView = webView.scrollView;
+ [_scrollView setMinimumZoomScale:pdfMinimumZoomScale];
+ [_scrollView setMaximumZoomScale:pdfMaximumZoomScale];
+ [_scrollView setContentSize:_documentFrame.size];
+ [_scrollView setBackgroundColor:[UIColor grayColor]];
+
</ins><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -175,7 +185,8 @@
</span><span class="cx">
</span><span class="cx"> - (CGPoint)_offsetForPageNumberIndicator
</span><span class="cx"> {
</span><del>- return CGPointMake(_obscuredInsets.left, _obscuredInsets.top + _overlaidAccessoryViewsInset.height);
</del><ins>+ UIEdgeInsets contentInset = [_webView _computedContentInset];
+ return CGPointMake(contentInset.left, contentInset.top + _overlaidAccessoryViewsInset.height);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_updatePageNumberIndicator
</span><span class="lines">@@ -189,22 +200,17 @@
</span><span class="cx"> [_pageNumberIndicator moveToPoint:[self _offsetForPageNumberIndicator] animated:NO];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)web_setObscuredInsets:(UIEdgeInsets)insets
-{
- if (UIEdgeInsetsEqualToEdgeInsets(insets, _obscuredInsets))
- return;
-
- _obscuredInsets = insets;
-
- [self _updatePageNumberIndicator];
-}
-
</del><span class="cx"> - (void)web_setOverlaidAccessoryViewsInset:(CGSize)inset
</span><span class="cx"> {
</span><span class="cx"> _overlaidAccessoryViewsInset = inset;
</span><span class="cx"> [_pageNumberIndicator moveToPoint:[self _offsetForPageNumberIndicator] animated:YES];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)web_computedContentInsetDidChange
+{
+ [self _updatePageNumberIndicator];
+}
+
</ins><span class="cx"> - (void)web_setFixedOverlayView:(UIView *)fixedOverlayView
</span><span class="cx"> {
</span><span class="cx"> _fixedOverlayView = fixedOverlayView;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKScrollViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm (170360 => 170361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm        2014-06-24 14:24:05 UTC (rev 170360)
+++ trunk/Source/WebKit2/UIProcess/ios/WKScrollView.mm        2014-06-24 14:38:17 UTC (rev 170361)
</span><span class="lines">@@ -191,6 +191,13 @@
</span><span class="cx"> return [super _rubberBandOffsetForOffset:newOffset maxOffset:maxOffset minOffset:minOffset range:range outside:outside];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)setContentInset:(UIEdgeInsets)contentInset
+{
+ [super setContentInset:contentInset];
+
+ [_internalDelegate _updateVisibleContentRects];
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(IOS)
</span></span></pre>
</div>
</div>
</body>
</html>