From 2fc9a1d0dd96a9baa793ebdb8d25f5db2f0d3d73 Mon Sep 17 00:00:00 2001 From: "alice.liu@apple.com" Date: Wed, 2 Jan 2008 22:58:50 +0000 Subject: [PATCH] WebCore: Reviewed by Maciej. Fixed (problems scrolling in gmail message content area) * platform/ScrollView.h: * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::scroll): Changed return value to bool to reflect success of scroll attempt WebKit/win: Reviewed by Maciej. Fixed (problems scrolling in gmail message content area) * WebView.cpp: (WebView::keyDown): bubble scrolling from a key event LayoutTests: Reviewed by Maciej. Added test for (problems scrolling in gmail message content area) * fast/frames/iframe-scroll-page-up-down-expected.txt: Added. * fast/frames/iframe-scroll-page-up-down.html: Added. * fast/frames/resources/iframe-scroll-page-up-down-1.html: Added. * fast/frames/resources/iframe-scroll-page-up-down-2.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29094 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 11 +++ .../iframe-scroll-page-up-down-expected.txt | 5 ++ .../frames/iframe-scroll-page-up-down.html | 69 +++++++++++++++++++ .../iframe-scroll-page-up-down-1.html | 10 +++ .../iframe-scroll-page-up-down-2.html | 15 ++++ WebCore/ChangeLog | 11 +++ WebCore/platform/ScrollView.h | 4 +- WebCore/platform/win/ScrollViewWin.cpp | 8 +-- WebKit/win/ChangeLog | 10 +++ WebKit/win/WebView.cpp | 14 ++-- 10 files changed, 147 insertions(+), 10 deletions(-) create mode 100644 LayoutTests/fast/frames/iframe-scroll-page-up-down-expected.txt create mode 100644 LayoutTests/fast/frames/iframe-scroll-page-up-down.html create mode 100644 LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-1.html create mode 100644 LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-2.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 2ce96753294f..d5b7949dbe57 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,14 @@ +2008-01-02 Alice Liu + + Reviewed by Maciej. + + Added test for (problems scrolling in gmail message content area) + + * fast/frames/iframe-scroll-page-up-down-expected.txt: Added. + * fast/frames/iframe-scroll-page-up-down.html: Added. + * fast/frames/resources/iframe-scroll-page-up-down-1.html: Added. + * fast/frames/resources/iframe-scroll-page-up-down-2.html: Added. + 2008-01-02 Adam Roben * platform/win/Skipped: Added some more failures. diff --git a/LayoutTests/fast/frames/iframe-scroll-page-up-down-expected.txt b/LayoutTests/fast/frames/iframe-scroll-page-up-down-expected.txt new file mode 100644 index 000000000000..0a7666410092 --- /dev/null +++ b/LayoutTests/fast/frames/iframe-scroll-page-up-down-expected.txt @@ -0,0 +1,5 @@ +top + +bottom +PASSED test 1 +PASSED test 2 diff --git a/LayoutTests/fast/frames/iframe-scroll-page-up-down.html b/LayoutTests/fast/frames/iframe-scroll-page-up-down.html new file mode 100644 index 000000000000..c4cbc583a8fb --- /dev/null +++ b/LayoutTests/fast/frames/iframe-scroll-page-up-down.html @@ -0,0 +1,69 @@ + + + + + +
+top +
+
+ +
+bottom +
+ + diff --git a/LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-1.html b/LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-1.html new file mode 100644 index 000000000000..f42e56746fd6 --- /dev/null +++ b/LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-1.html @@ -0,0 +1,10 @@ + + +top +
+
+ +
+bottom + + diff --git a/LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-2.html b/LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-2.html new file mode 100644 index 000000000000..007cb788e8e5 --- /dev/null +++ b/LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-2.html @@ -0,0 +1,15 @@ + + + +
+2
+3
+4
+5
+6
+7
+8
+9
+ + + diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 3c2fdd1545ff..1e3b58d98bba 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2008-01-02 Alice Liu + + Reviewed by Maciej. + + Fixed (problems scrolling in gmail message content area) + + * platform/ScrollView.h: + * platform/win/ScrollViewWin.cpp: + (WebCore::ScrollView::scroll): + Changed return value to bool to reflect success of scroll attempt + 2008-01-02 Alexey Proskuryakov Fixed a typo (pointed out in review, but I somehow missed it at first). diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h index 6cb7976eeca4..58db6e9ae14e 100644 --- a/WebCore/platform/ScrollView.h +++ b/WebCore/platform/ScrollView.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2004, 2006, 2007, 2008 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -110,7 +110,7 @@ namespace WebCore { // (like Windows), we need this method in order to do the scroll ourselves. void wheelEvent(PlatformWheelEvent&); - void scroll(ScrollDirection, ScrollGranularity); + bool scroll(ScrollDirection, ScrollGranularity); #if PLATFORM(MAC) NSView* getDocumentView() const; diff --git a/WebCore/platform/win/ScrollViewWin.cpp b/WebCore/platform/win/ScrollViewWin.cpp index 69853763cb68..893696dab905 100644 --- a/WebCore/platform/win/ScrollViewWin.cpp +++ b/WebCore/platform/win/ScrollViewWin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -689,12 +689,12 @@ void ScrollView::geometryChanged() const (*current)->geometryChanged(); } -void ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity) +bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity granularity) { if ((direction == ScrollUp || direction == ScrollDown) && m_data->m_vBar) - m_data->m_vBar->scroll(direction, granularity); + return m_data->m_vBar->scroll(direction, granularity); else if (m_data->m_hBar) - m_data->m_hBar->scroll(direction, granularity); + return m_data->m_hBar->scroll(direction, granularity); } IntRect ScrollView::windowResizerRect() diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog index f5b630c79c0c..a0ac371553c7 100644 --- a/WebKit/win/ChangeLog +++ b/WebKit/win/ChangeLog @@ -1,3 +1,13 @@ +2008-01-02 Alice Liu + + Reviewed by Maciej. + + Fixed (problems scrolling in gmail message content area) + + * WebView.cpp: + (WebView::keyDown): + bubble scrolling from a key event + 2008-01-01 Matt Lilek Attempt to fix the Windows bots until the bots diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp index e4235030c35d..e04eae191e8a 100644 --- a/WebKit/win/WebView.cpp +++ b/WebKit/win/WebView.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1476,9 +1476,15 @@ bool WebView::keyDown(WPARAM virtualKeyCode, LPARAM keyData, bool systemKeyDown) return false; } - if (!frame->eventHandler()->scrollOverflow(direction, granularity)) - frame->view()->scroll(direction, granularity); - return true; + if (!frame->eventHandler()->scrollOverflow(direction, granularity)) { + handled = frame->view()->scroll(direction, granularity); + Frame* parent = frame->tree()->parent(); + while(!handled && parent) { + handled = parent->view()->scroll(direction, granularity); + parent = parent->tree()->parent(); + } + } + return handled; } bool WebView::keyPress(WPARAM charCode, LPARAM keyData, bool systemKeyDown) -- 2.36.0