Reviewed by Maciej.
Fixed <rdar://
5283861> (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 <rdar://
5283861> (problems scrolling in gmail message content area)
* WebView.cpp:
(WebView::keyDown):
bubble scrolling from a key event
LayoutTests:
Reviewed by Maciej.
Added test for <rdar://
5283861> (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
+2008-01-02 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Maciej.
+
+ Added test for <rdar://5283861> (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 <aroben@apple.com>
* platform/win/Skipped: Added some more failures.
--- /dev/null
+top
+
+bottom
+PASSED test 1
+PASSED test 2
--- /dev/null
+<html>\r
+<head>\r
+<script>\r
+function test() \r
+{\r
+ if (!window.layoutTestController)\r
+ return;\r
+\r
+ if (window.layoutTestController)\r
+ layoutTestController.dumpAsText();\r
+\r
+ // 1st test: iframes scrolled to top, top level document scrolled to bottom\r
+ // pageup in innermost iframe should scroll top level document up\r
+ window[0][0].scrollTo(0,0);\r
+ window[0].scrollTo(0,0);\r
+ window.scrollTo(0, document.body.offsetHeight);\r
+ var oldScrollTop = document.body.scrollTop;\r
+ var focus1 = window[0][0].document.getElementById("focus1");\r
+ focus1.focus(); \r
+ eventSender.keyDown("pageUp");\r
+ var test1Passed = false;\r
+ if (document.body.scrollTop < oldScrollTop)\r
+ test1Passed = true;\r
+\r
+ // 2nd test: iframes scrolled to bottom, top level document scrolled to top\r
+ // pagedown in innermost iframe should scroll top level document down\r
+ window[0][0].scrollTo(0,window[0][0].document.body.offsetHeight);\r
+ window[0].scrollTo(0,window[0].document.body.offsetHeight);\r
+ window.scrollTo(0, 0);\r
+ oldScrollTop = document.body.scrollTop\r
+ var focus2 = window[0][0].document.getElementById("focus2");\r
+ focus2.focus();\r
+ eventSender.keyDown("pageDown");\r
+ var test2Passed = false;\r
+ if (document.body.scrollTop > oldScrollTop)\r
+ test2Passed = true;\r
+\r
+ printResults(test1Passed, test2Passed);\r
+}\r
+\r
+function printResults(test1Passed, test2Passed) \r
+{\r
+ var console = document.createElement("div");\r
+ if (test1Passed)\r
+ console.innerHTML = "PASSED test 1";\r
+ else\r
+ console.innerHTML = "FAILED test 1";\r
+ console.innerHTML += "<br>";\r
+ if (test2Passed)\r
+ console.innerHTML += "PASSED test 2";\r
+ else\r
+ console.innerHTML += "FAILED test 2";\r
+\r
+ document.body.appendChild(console);\r
+ \r
+}\r
+</script>\r
+</head>\r
+<body onload="window.resizeTo(500,587); test();">\r
+<div id="testDiv">\r
+top\r
+<br>\r
+<div style="height:200px"></div>\r
+<iframe id="frame" width="450px" height="235px" src="./resources/iframe-scroll-page-up-down-1.html"></iframe>\r
+<div style="height:200px"></div>\r
+bottom\r
+</div>\r
+</body>\r
+</html>\r
--- /dev/null
+<html>\r
+<body>\r
+top\r
+<br>\r
+<div style="height:100px"></div>\r
+<iframe width="400px" height="100px" src="./iframe-scroll-page-up-down-2.html"></iframe>\r
+<div style="height:100px"></div>\r
+bottom\r
+</body>\r
+</html>\r
--- /dev/null
+<html>\r
+<body contenteditable=true onclick="alert('clicked');">\r
+<input id="focus1" value="focus here and page up">\r
+<br>\r
+2<br>\r
+3<br>\r
+4<br>\r
+5<br>\r
+6<br>\r
+7<br>\r
+8<br>\r
+9<br>\r
+<input id="focus2" value="focus here and page down">\r
+</body>\r
+</html>\r
+2008-01-02 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Maciej.
+
+ Fixed <rdar://5283861> (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 <ap@webkit.org>
Fixed a typo (pointed out in review, but I somehow missed it at first).
/*
- * 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
// (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;
/*
- * 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
(*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()
+2008-01-02 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Maciej.
+
+ Fixed <rdar://5283861> (problems scrolling in gmail message content area)
+
+ * WebView.cpp:
+ (WebView::keyDown):
+ bubble scrolling from a key event
+
2008-01-01 Matt Lilek <webkit@mattlilek.com>
Attempt to fix the Windows bots until the bots
/*
- * 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
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)