From 64c83fd41ee3ad912a1182abad89669198a3632e Mon Sep 17 00:00:00 2001 From: "simon.fraser@apple.com" Date: Sun, 12 Apr 2015 20:18:01 +0000 Subject: [PATCH] Selects don't scroll at some aspect ratios https://bugs.webkit.org/show_bug.cgi?id=143649 rdar://problem/19365694 Reviewed by Darin Adler. Source/WebCore: Fix width/height flip in RenderListBox which caused us to fail to scroll when the list was wider than the scroll height. We're generally confused about RenderListBox scroll offsets (webkit.org/b/143648) but this fixes the immediate problem. Test: fast/forms/listbox-visible-size.html * rendering/RenderListBox.h: LayoutTests: * fast/forms/listbox-visible-size-expected.txt: Added. * fast/forms/listbox-visible-size.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182672 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 11 +++++++ .../fast/forms/listbox-visible-size-expected.txt | 5 +++ LayoutTests/fast/forms/listbox-visible-size.html | 36 ++++++++++++++++++++++ Source/WebCore/ChangeLog | 18 +++++++++++ Source/WebCore/rendering/RenderListBox.h | 2 +- 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 LayoutTests/fast/forms/listbox-visible-size-expected.txt create mode 100644 LayoutTests/fast/forms/listbox-visible-size.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 9d318f2..784da76 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,5 +1,16 @@ 2015-04-12 Simon Fraser + Selects don't scroll at some aspect ratios + https://bugs.webkit.org/show_bug.cgi?id=143649 + rdar://problem/19365694 + + Reviewed by Darin Adler. + + * fast/forms/listbox-visible-size-expected.txt: Added. + * fast/forms/listbox-visible-size.html: Added. + +2015-04-12 Simon Fraser + Too much repainting on scrolling with fixed backgrounds https://bugs.webkit.org/show_bug.cgi?id=143637 rdar://problem/20245243 diff --git a/LayoutTests/fast/forms/listbox-visible-size-expected.txt b/LayoutTests/fast/forms/listbox-visible-size-expected.txt new file mode 100644 index 0000000..02be829 --- /dev/null +++ b/LayoutTests/fast/forms/listbox-visible-size-expected.txt @@ -0,0 +1,5 @@ +PASS select.scrollTop is targetTop +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/forms/listbox-visible-size.html b/LayoutTests/fast/forms/listbox-visible-size.html new file mode 100644 index 0000000..b0e8e50 --- /dev/null +++ b/LayoutTests/fast/forms/listbox-visible-size.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index caf8e31..b283e9f 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,5 +1,23 @@ 2015-04-12 Simon Fraser + Selects don't scroll at some aspect ratios + https://bugs.webkit.org/show_bug.cgi?id=143649 + rdar://problem/19365694 + + Reviewed by Darin Adler. + + Fix width/height flip in RenderListBox which caused us to fail to scroll when + the list was wider than the scroll height. + + We're generally confused about RenderListBox scroll offsets (webkit.org/b/143648) + but this fixes the immediate problem. + + Test: fast/forms/listbox-visible-size.html + + * rendering/RenderListBox.h: + +2015-04-12 Simon Fraser + Too much repainting on scrolling with fixed backgrounds https://bugs.webkit.org/show_bug.cgi?id=143637 rdar://problem/20245243 diff --git a/Source/WebCore/rendering/RenderListBox.h b/Source/WebCore/rendering/RenderListBox.h index 0ffc2c9..5d5a0bd 100644 --- a/Source/WebCore/rendering/RenderListBox.h +++ b/Source/WebCore/rendering/RenderListBox.h @@ -123,7 +123,7 @@ private: virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, const IntPoint&) const override; virtual Scrollbar* verticalScrollbar() const override { return m_vBar.get(); } virtual IntSize contentsSize() const override; - virtual IntSize visibleSize() const override { return IntSize(height(), width()); } + virtual IntSize visibleSize() const override { return IntSize(width(), height()); } virtual IntPoint lastKnownMousePosition() const override; virtual bool isHandlingWheelEvent() const override; virtual bool shouldSuspendScrollAnimations() const override; -- 1.8.3.1