Changeset 194404 in webkit
- Timestamp:
- Dec 23, 2015, 4:34:59 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/overflow/overflow-hidden-scroll-into-view-expected.html (added)
-
LayoutTests/fast/overflow/overflow-hidden-scroll-into-view.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/RenderBox.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r194403 r194404 1 2015-12-22 Simon Fraser <simon.fraser@apple.com> 2 3 Minor cleanup in RenderBox::canBeProgramaticallyScrolled() 4 https://bugs.webkit.org/show_bug.cgi?id=152515 5 6 Reviewed by Tim Horton. 7 8 Test that programmatic scrolling works inside overflow:hidden. 9 10 * fast/overflow/overflow-hidden-scroll-into-view-expected.html: Added. 11 * fast/overflow/overflow-hidden-scroll-into-view.html: Added. 12 1 13 2015-12-23 Ryan Haddad <ryanhaddad@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r194399 r194404 1 2015-12-22 Simon Fraser <simon.fraser@apple.com> 2 3 Minor cleanup in RenderBox::canBeProgramaticallyScrolled() 4 https://bugs.webkit.org/show_bug.cgi?id=152515 5 6 Reviewed by Tim Horton. 7 8 Remove the scrollsOverflow() check in RenderBox::canBeProgramaticallyScrolled(), 9 since if hasScrollableOverflow is true, scrollsOverflow() must also be true. 10 11 Factor clientWidth/Height vs. scrollWidth/Height checks into separate functions, 12 and call them from two places. 13 14 Added a test which is not affected by this particular change, but will verify 15 that a later change doesn't break anything. 16 17 Test: fast/overflow/overflow-hidden-scroll-into-view.html 18 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::canBeScrolledAndHasScrollableArea): 21 (WebCore::RenderBox::canBeProgramaticallyScrolled): 22 * rendering/RenderBox.h: 23 (WebCore::RenderBox::hasHorizontalOverflow): 24 (WebCore::RenderBox::hasVerticalOverflow): 25 (WebCore::RenderBox::hasScrollableOverflowX): 26 (WebCore::RenderBox::hasScrollableOverflowY): 27 1 28 2015-12-23 Pranjal Jumde <pjumde@apple.com> 2 29 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r194030 r194404 868 868 bool RenderBox::canBeScrolledAndHasScrollableArea() const 869 869 { 870 return canBeProgramaticallyScrolled() && ( scrollHeight() != roundToInt(clientHeight()) || scrollWidth() != roundToInt(clientWidth()));870 return canBeProgramaticallyScrolled() && (hasHorizontalOverflow() || hasVerticalOverflow()); 871 871 } 872 872 … … 884 884 return false; 885 885 886 bool hasScrollableOverflow = hasScrollableOverflowX() || hasScrollableOverflowY(); 887 if (scrollsOverflow() && hasScrollableOverflow) 886 if (hasScrollableOverflowX() || hasScrollableOverflowY()) 888 887 return true; 889 888 -
trunk/Source/WebCore/rendering/RenderBox.h
r192413 r194404 470 470 bool hasVerticalScrollbarWithAutoBehavior() const; 471 471 bool hasHorizontalScrollbarWithAutoBehavior() const; 472 472 473 bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY(); } 473 474 bool scrollsOverflowX() const { return hasOverflowClip() && (style().overflowX() == OSCROLL || hasHorizontalScrollbarWithAutoBehavior()); } 474 475 bool scrollsOverflowY() const { return hasOverflowClip() && (style().overflowY() == OSCROLL || hasVerticalScrollbarWithAutoBehavior()); } 475 bool hasScrollableOverflowX() const { return scrollsOverflowX() && scrollWidth() != roundToInt(clientWidth()); } 476 bool hasScrollableOverflowY() const { return scrollsOverflowY() && scrollHeight() != roundToInt(clientHeight()); } 476 477 bool hasHorizontalOverflow() const { return scrollWidth() != roundToInt(clientWidth()); } 478 bool hasVerticalOverflow() const { return scrollHeight() != roundToInt(clientHeight()); } 479 480 bool hasScrollableOverflowX() const { return scrollsOverflowX() && hasHorizontalOverflow(); } 481 bool hasScrollableOverflowY() const { return scrollsOverflowY() && hasVerticalOverflow(); } 477 482 478 483 bool usesCompositedScrolling() const;
Note:
See TracChangeset
for help on using the changeset viewer.