Changeset 211541 in webkit
- Timestamp:
- Feb 1, 2017 5:12:53 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r211536 r211541 1 2017-02-01 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keyboard is visible 4 https://bugs.webkit.org/show_bug.cgi?id=167710 5 rdar://problem/30100286 6 7 Reviewed by Wenson Hsieh. 8 9 * fast/visual-viewport/ios/bottom-bar-with-keyboard-expected.txt: Added. 10 * fast/visual-viewport/ios/bottom-bar-with-keyboard.html: Added. 11 1 12 2017-02-01 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r211540 r211541 1 2017-02-01 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keyboard is visible 4 https://bugs.webkit.org/show_bug.cgi?id=167710 5 rdar://problem/30100286 6 7 Reviewed by Wenson Hsieh. 8 9 Add a bit of logging to show when RLC decides to not composite a fixed element which 10 is out of bounds. 11 12 Test: fast/visual-viewport/ios/bottom-bar-with-keyboard.html 13 14 * rendering/RenderLayerCompositor.cpp: 15 (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 16 1 17 2017-02-01 Eric Carlson <eric.carlson@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r211387 r211541 2752 2752 if (viewportConstrainedNotCompositedReason) 2753 2753 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompositedForBoundsOutOfView; 2754 LOG_WITH_STREAM(Compositing, stream << "Layer " << &layer << " bounds " << layerBounds << " outside visible rect " << viewBounds); 2754 2755 return false; 2755 2756 } -
trunk/Source/WebKit2/ChangeLog
r211538 r211541 1 2017-02-01 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] With visual viewports, a fixed bottom bar can be clipped out when the keyboard is visible 4 https://bugs.webkit.org/show_bug.cgi?id=167710 5 rdar://problem/30100286 6 7 Reviewed by Wenson Hsieh. 8 9 The unobscuredRectInContentCoordinates passed to -didUpdateVisibleRect:... could project outside 10 of the bounds of the document, which is OK when rubber-banding, but not when we're in a stable state, 11 because that can cause fixed elements to get pushed outside the doc. This happened when the keyboard 12 triggered bottom content insets on the scroll view. 13 14 Fix by computing a rectangle which is the "allowed" bounds of fixed content, which is permitted 15 to extend outside the document bounds only when rubber-banding, and intersect unobscuredRectInContentCoordinates 16 with that rectangle. 17 18 * UIProcess/API/Cocoa/WKWebView.mm: 19 (-[WKWebView _contentBoundsExtendedForRubberbandingWithScale:]): 20 (-[WKWebView _updateContentRectsWithState:]): 21 1 22 2017-02-01 Enrica Casucci <enrica@apple.com> 2 23 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r211476 r211541 2088 2088 } 2089 2089 2090 - (CGRect)_contentBoundsExtendedForRubberbandingWithScale:(CGFloat)scaleFactor 2091 { 2092 CGPoint contentOffset = [_scrollView contentOffset]; 2093 CGPoint boundedOffset = contentOffsetBoundedInValidRange(_scrollView.get(), contentOffset); 2094 2095 CGFloat horiontalRubberbandAmountInContentCoordinates = (contentOffset.x - boundedOffset.x) / scaleFactor; 2096 CGFloat verticalRubberbandAmountInContentCoordinates = (contentOffset.y - boundedOffset.y) / scaleFactor; 2097 2098 CGRect extendedBounds = [_contentView bounds]; 2099 2100 if (horiontalRubberbandAmountInContentCoordinates < 0) { 2101 extendedBounds.origin.x += horiontalRubberbandAmountInContentCoordinates; 2102 extendedBounds.size.width -= horiontalRubberbandAmountInContentCoordinates; 2103 } else if (horiontalRubberbandAmountInContentCoordinates > 0) 2104 extendedBounds.size.width += horiontalRubberbandAmountInContentCoordinates; 2105 2106 if (verticalRubberbandAmountInContentCoordinates < 0) { 2107 extendedBounds.origin.y += verticalRubberbandAmountInContentCoordinates; 2108 extendedBounds.size.height -= verticalRubberbandAmountInContentCoordinates; 2109 } else if (verticalRubberbandAmountInContentCoordinates > 0) 2110 extendedBounds.size.height += verticalRubberbandAmountInContentCoordinates; 2111 2112 return extendedBounds; 2113 } 2114 2090 2115 - (void)_updateContentRectsWithState:(BOOL)inStableState 2091 2116 { … … 2114 2139 computedContentInsetUnadjustedForKeyboard.bottom -= _totalScrollViewBottomInsetAdjustmentForKeyboard; 2115 2140 2141 CGFloat scaleFactor = contentZoomScale(self); 2142 2116 2143 CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, computedContentInsetUnadjustedForKeyboard); 2117 2144 CGRect unobscuredRectInContentCoordinates = _frozenUnobscuredContentRect ? _frozenUnobscuredContentRect.value() : [self convertRect:unobscuredRect toView:_contentView.get()]; 2118 2119 CGFloat scaleFactor = contentZoomScale(self); 2145 unobscuredRectInContentCoordinates = CGRectIntersection(unobscuredRectInContentCoordinates, [self _contentBoundsExtendedForRubberbandingWithScale:scaleFactor]); 2120 2146 2121 2147 #if ENABLE(CSS_SCROLL_SNAP) && ENABLE(ASYNC_SCROLLING)
Note: See TracChangeset
for help on using the changeset viewer.