Commit ae563165 authored by jnd@chromium.org's avatar jnd@chromium.org

2010-12-02 Johnny Ding <jnd@chromium.org>

        Reviewed by Adam Barth.

        Set the right gesture status for URL redirections.
        https://bugs.webkit.org/show_bug.cgi?id=47817

        * fast/frames/location-redirect-user-gesture-expected.txt: Added.
        * fast/frames/location-redirect-user-gesture.html: Added.
        * fast/frames/meta-refresh-user-gesture-expected.txt: Added.
        * fast/frames/meta-refresh-user-gesture.html: Added.
        * fast/frames/resources/meta-refresh-target.html: Added.
        * platform/gtk/Skipped:
        * platform/win/Skipped:
2010-12-02  Johnny Ding  <jnd@chromium.org>

        Reviewed by Adam Barth.

        Set the right gesture status for URL redirections.
        https://bugs.webkit.org/show_bug.cgi?id=47817

        Tests: fast/frames/location-redirect-user-gesture.html
               fast/frames/meta-refresh-user-gesture.html

        * loader/NavigationScheduler.cpp:
        (WebCore::ScheduledNavigation::clearUserGesture):
        (WebCore::ScheduledRedirect::ScheduledRedirect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6f1cc129
2010-12-02 Johnny Ding <jnd@chromium.org>
Reviewed by Adam Barth.
Set the right gesture status for URL redirections.
https://bugs.webkit.org/show_bug.cgi?id=47817
* fast/frames/location-redirect-user-gesture-expected.txt: Added.
* fast/frames/location-redirect-user-gesture.html: Added.
* fast/frames/meta-refresh-user-gesture-expected.txt: Added.
* fast/frames/meta-refresh-user-gesture.html: Added.
* fast/frames/resources/meta-refresh-target.html: Added.
* platform/gtk/Skipped:
* platform/win/Skipped:
2010-12-02 Eric Seidel <eric@webkit.org>
Unreviewed.
Frame with user gesture "false" - in didStartProvisionalLoadForFrame
<html>
<head>
<script>
function runTests() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.dumpUserGestureInFrameLoadCallbacks();
layoutTestController.waitUntilDone();
}
setTimeout("location.href='data:text/html,<script>layoutTestController.notifyDone()</" + "script>'", 1000);
}
</script>
</head>
<body onload="runTests();">
Some WebKit ports send the user gesture to the embedders in didStartProvisionalLoad callback. The embedders use it to judge whether the navigation is user-initiated or not. In location change redirection, the user gesture status in didStartProvisionalLoad callback should be false. For more details, please refer to https://bugs.webkit.org/show_bug.cgi?id=47817.
</div>
</body>
</html>
Frame with user gesture "false" - in didStartProvisionalLoadForFrame
<html>
<head>
<meta http-equiv="refresh" content="2;./resources/meta-refresh-target.html">
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.dumpUserGestureInFrameLoadCallbacks();
layoutTestController.waitUntilDone();
}
</script>
</head>
<body>
Some WebKit ports send the user gesture to the embedders in didStartProvisionalLoad callback. The embedders use it to judge whether the navigation is user-initiated or not. In meta refresh redirection, the user gesture status in didStartProvisionalLoad callback should be false. For more details, please refer to https://bugs.webkit.org/show_bug.cgi?id=47817.
</body>
</html>
<html>
<head>
<script>
if (layoutTestController)
layoutTestController.notifyDone();
</script>
</head>
</html>
......@@ -5540,6 +5540,13 @@ fast/images/webp-image-decoding.html
# https://bugs.webkit.org/show_bug.cgi?id=47832
http/tests/inspector/console-xhr-logging.html
# The following tests requires the DRT's dumpUserGestureInFrameLoadCallbacks
# method. But that method is not implemented in gtk port since gtk port can't
# not get user gesture in frameload callbacks.
# The related bugs are https://bugs.webkit.org/show_bug.cgi?id=47849/47817.
fast/frames/location-redirect-user-gesture.html
fast/frames/meta-refresh-user-gesture.html
# This test passes locally, but does not pass on the bots. Perhaps
# it is an issue with the version of Cairo on the bots.
# https://bugs.webkit.org/show_bug.cgi?id=49052
......
......@@ -1072,3 +1072,10 @@ fast/images/webp-image-decoding.html
# Missing layoutTestController.findString() http://webkit.org/b/50234
editing/text-iterator/findString.html
# The following tests requires the DRT's dumpUserGestureInFrameLoadCallbacks
# method. But that method is not implemented in win port since win port can't
# not get user gesture in frameload callbacks.
# The relevant bugs are https://bugs.webkit.org/show_bug.cgi?id=47849/47817.
fast/frames/location-redirect-user-gesture.html
fast/frames/meta-refresh-user-gesture.html
2010-12-02 Johnny Ding <jnd@chromium.org>
Reviewed by Adam Barth.
Set the right gesture status for URL redirections.
https://bugs.webkit.org/show_bug.cgi?id=47817
Tests: fast/frames/location-redirect-user-gesture.html
fast/frames/meta-refresh-user-gesture.html
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledNavigation::clearUserGesture):
(WebCore::ScheduledRedirect::ScheduledRedirect):
2010-12-02 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
......@@ -77,6 +77,9 @@ public:
bool isLocationChange() const { return m_isLocationChange; }
bool wasUserGesture() const { return m_wasUserGesture; }
protected:
void clearUserGesture() { m_wasUserGesture = false; }
private:
double m_delay;
bool m_lockHistory;
......@@ -131,6 +134,7 @@ public:
ScheduledRedirect(double delay, const String& url, bool lockHistory, bool lockBackForwardList)
: ScheduledURLNavigation(delay, url, String(), lockHistory, lockBackForwardList, false, false)
{
clearUserGesture();
}
virtual bool shouldStartTimer(Frame* frame) { return frame->loader()->allAncestorsAreComplete(); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment