Changeset 224241 in webkit
- Timestamp:
- Oct 31, 2017 1:27:18 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r224240 r224241 1 2017-10-31 Ali Juma <ajuma@chromium.org> 2 3 Layout viewport rect is too wide after window resize 4 https://bugs.webkit.org/show_bug.cgi?id=175235 5 6 Reviewed by Dave Hyatt. 7 8 * fast/dom/Window/window-resize-update-scrollbars-expected.txt: Added. 9 * fast/dom/Window/window-resize-update-scrollbars.html: Added. 10 * platform/ios/TestExpectations: 11 1 12 2017-10-31 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/LayoutTests/platform/ios/TestExpectations
r224214 r224241 1659 1659 # iOS does not support window resizing or window.resizeTo(). 1660 1660 fast/css-grid-layout/flex-content-sized-columns-resize.html [ Skip ] 1661 fast/dom/Window/window-resize-update-scrollbars.html [ Skip ] 1661 1662 fast/dynamic/window-resize-scrollbars-test.html [ Skip ] 1662 1663 fast/images/animated-gif-window-resizing.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r224238 r224241 1 2017-10-31 Ali Juma <ajuma@chromium.org> 2 3 Layout viewport rect is too wide after window resize 4 https://bugs.webkit.org/show_bug.cgi?id=175235 5 6 Reviewed by Dave Hyatt. 7 8 After a window resize, ScrollView::updateScrollbars adds/removes scrollbars and triggers 9 layout. Each addition or removal triggers another pass, but at most 2 additional passes 10 are allowed. If a scrollbar is added or removed in the final allowed pass, layout is 11 left in an inconsistent state wrt the presence of scrollbars. 12 13 To avoid unnecessary passes, don't remove both scrollbars when only one needs to be 14 removed. This saves the extra pass needed to add the scrollbar back. 15 16 Test: fast/dom/Window/window-resize-update-scrollbars.html 17 18 * platform/ScrollView.cpp: 19 (WebCore::ScrollView::updateScrollbars): 20 1 21 2017-10-31 Wenson Hsieh <wenson_hsieh@apple.com> 2 22 -
trunk/Source/WebCore/platform/ScrollView.cpp
r223728 r224241 608 608 bool needAnotherPass = false; 609 609 if (!hasOverlayScrollbars) { 610 // If we ever turn one scrollbar off, always turn the other one off too.Never ever610 // If we ever turn one scrollbar off, do not turn the other one on. Never ever 611 611 // try to both gain/lose a scrollbar in the same pass. 612 612 if (!m_updateScrollbarsPass && docSize.width() <= fullVisibleSize.width() && docSize.height() <= fullVisibleSize.height()) { … … 616 616 newHasVerticalScrollbar = false; 617 617 } 618 if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn ) {618 if (!newHasHorizontalScrollbar && hasHorizontalScrollbar && vScroll != ScrollbarAlwaysOn &&!hasVerticalScrollbar) { 619 619 newHasVerticalScrollbar = false; 620 620 needAnotherPass = true; 621 621 } 622 if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn ) {622 if (!newHasVerticalScrollbar && hasVerticalScrollbar && hScroll != ScrollbarAlwaysOn && !hasHorizontalScrollbar) { 623 623 newHasHorizontalScrollbar = false; 624 624 needAnotherPass = true;
Note: See TracChangeset
for help on using the changeset viewer.