Title: [170344] trunk/Source/WebKit2
- Revision
- 170344
- Author
- [email protected]
- Date
- 2014-06-23 21:12:58 -0700 (Mon, 23 Jun 2014)
Log Message
[iOS][WK2] REGRESSION (r169324): Page jumps to top when you type into a text field
https://bugs.webkit.org/show_bug.cgi?id=134219
<rdar://problem/17279113>
Reviewed by Benjamin Poulain.
Fixes an issue where typing into a text field may cause a noticeable jump to the top of
the page.
Currently when updating the visual content rectangles we always constrain the scroll offset
(s_x, s_y) such that 0 <= s_x <= "content width" - "visible width" and 0 <= s_y <= "content height" - "visible height".
However the UIProcess may want to scroll the page by an offset outside of this range to
create a visually pleasing result. In particular, on iOS we may scroll the page slightly
outside of this range (e.g. s_y > 0 = "content height" - "visible height") when a form
control is focused so as to be consistent with platform convention.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Temporarily disable content edge constraint when
updating scroll offset.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (170343 => 170344)
--- trunk/Source/WebKit2/ChangeLog 2014-06-24 02:24:12 UTC (rev 170343)
+++ trunk/Source/WebKit2/ChangeLog 2014-06-24 04:12:58 UTC (rev 170344)
@@ -1,3 +1,25 @@
+2014-06-23 Daniel Bates <[email protected]>
+
+ [iOS][WK2] REGRESSION (r169324): Page jumps to top when you type into a text field
+ https://bugs.webkit.org/show_bug.cgi?id=134219
+ <rdar://problem/17279113>
+
+ Reviewed by Benjamin Poulain.
+
+ Fixes an issue where typing into a text field may cause a noticeable jump to the top of
+ the page.
+
+ Currently when updating the visual content rectangles we always constrain the scroll offset
+ (s_x, s_y) such that 0 <= s_x <= "content width" - "visible width" and 0 <= s_y <= "content height" - "visible height".
+ However the UIProcess may want to scroll the page by an offset outside of this range to
+ create a visually pleasing result. In particular, on iOS we may scroll the page slightly
+ outside of this range (e.g. s_y > 0 = "content height" - "visible height") when a form
+ control is focused so as to be consistent with platform convention.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::updateVisibleContentRects): Temporarily disable content edge constraint when
+ updating scroll offset.
+
2014-06-23 Dan Bernstein <[email protected]>
<rdar://problem/17413374> [iOS] Application cache size per origin is not limited
Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (170343 => 170344)
--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-06-24 02:24:12 UTC (rev 170343)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm 2014-06-24 04:12:58 UTC (rev 170344)
@@ -2421,7 +2421,9 @@
if (!visibleContentRectUpdateInfo.isChangingObscuredInsetsInteractively())
frameView.setCustomSizeForResizeEvent(expandedIntSize(visibleContentRectUpdateInfo.unobscuredRectInScrollViewCoordinates().size()));
+ frameView.setConstrainsScrollingToContentEdge(false);
frameView.setScrollOffset(scrollPosition);
+ frameView.setConstrainsScrollingToContentEdge(true);
}
void WebPage::willStartUserTriggeredZooming()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes