[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:15:04 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 47883960aec3fb7ae7fc654c52461afe95804276
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 9 00:32:26 2010 +0000

    2010-02-08  Charlie Reis  <creis at chromium.org>
    
            Reviewed by Darin Adler.
    
            onbeforeunload not called at window close + frame or iframe focused
            https://bugs.webkit.org/show_bug.cgi?id=27481
    
            Chromium and WebKit on Windows will now fire beforeunload handlers
            even if an inner frame is focused.
    
            Layout tests aren't able to test this bug, since it requires closing
            the actual browser window, not calling window.close().  Instead,
            test with WebCore/manual-tests/onbeforeunload-focused-iframe.html.
    
            * manual-tests/onbeforeunload-focused-iframe.html: Added.
            * manual-tests/resources/focused-iframe.html: Added.
    2010-02-08  Charlie Reis  <creis at chromium.org>
    
            Reviewed by Darin Adler.
    
            onbeforeunload not called at window close + frame or iframe focused
            https://bugs.webkit.org/show_bug.cgi?id=27481
            http://code.google.com/p/chromium/issues/detail?id=32615
            http://code.google.com/p/chromium/issues/detail?id=17157
    
            Chromium and WebKit on Windows will now fire beforeunload handlers
            even if an inner frame is focused.
    
            Layout tests aren't able to test this bug, since it requires closing
            the actual browser window, not calling window.close().  Instead,
            test with WebCore/manual-tests/onbeforeunload-focused-iframe.html.
    
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::dispatchBeforeUnloadEvent):
    2010-02-08  Charlie Reis  <creis at chromium.org>
    
            Reviewed by Darin Adler.
    
            onbeforeunload not called at window close + frame or iframe focused
            https://bugs.webkit.org/show_bug.cgi?id=27481
    
            Chromium and WebKit on Windows will now fire beforeunload handlers
            even if an inner frame is focused.
    
            Layout tests aren't able to test this bug, since it requires closing
            the actual browser window, not calling window.close().  Instead,
            test with WebCore/manual-tests/onbeforeunload-focused-iframe.html.
    
            * WebView.cpp:
            (WebView::shouldClose):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54519 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 59a0e97..e5a5b0e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-02-08  Charlie Reis  <creis at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        onbeforeunload not called at window close + frame or iframe focused
+        https://bugs.webkit.org/show_bug.cgi?id=27481
+        
+        Chromium and WebKit on Windows will now fire beforeunload handlers
+        even if an inner frame is focused.  
+
+        Layout tests aren't able to test this bug, since it requires closing
+        the actual browser window, not calling window.close().  Instead,
+        test with WebCore/manual-tests/onbeforeunload-focused-iframe.html.
+
+        * manual-tests/onbeforeunload-focused-iframe.html: Added.
+        * manual-tests/resources/focused-iframe.html: Added.
+
 2010-02-08  Alexey Proskuryakov  <ap at apple.com>
 
         Addressing review feedback.
diff --git a/WebCore/manual-tests/onbeforeunload-focused-iframe.html b/WebCore/manual-tests/onbeforeunload-focused-iframe.html
new file mode 100644
index 0000000..9ef0dfa
--- /dev/null
+++ b/WebCore/manual-tests/onbeforeunload-focused-iframe.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+        "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+</head>
+<BODY onbeforeunload="return 'onBeforeUnloadHandler return string is displayed here.';">
+<p><b>BUG ID:</b> <a href="https://bugs.webkit.org/show_bug.cgi?id=27481">27481</a> onbeforeunload not called at window close + frame or iframe focused</p>
+
+<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
+<ol>
+    <li>Close this browser window while the inner frame has focus.
+</ol>
+</p>
+
+<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
+After the close button is clicked, you should see a dialog that reads:</p>
+<pre>Are you sure you want to navigate away from this page?
+
+onBeforeUnloadHandler return string is displayed here.
+
+Press OK to continue or Cancel to stay on the current page.</pre>
+
+<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
+No dialog (as described above) when closing the browser window.
+</p>
+
+<BODY onbeforeunload="return 'onBeforeUnloadHandler return string is displayed here.';">
+<iframe src="resources/focused-iframe.html"></iframe>
+<p>Close this browser window.</p>
+</body>
+</html>
diff --git a/WebCore/manual-tests/resources/focused-iframe.html b/WebCore/manual-tests/resources/focused-iframe.html
new file mode 100644
index 0000000..50b49a5
--- /dev/null
+++ b/WebCore/manual-tests/resources/focused-iframe.html
@@ -0,0 +1,12 @@
+<html>
+<body onload="load()">
+    This frame should get the focus.
+    <input id="box"></input>
+    <script>
+        function load()
+        {
+            document.getElementById("box").focus();
+        }
+    </script>
+</body>
+</html>
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 8289607..f87bae5 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,22 @@
+2010-02-08  Charlie Reis  <creis at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        onbeforeunload not called at window close + frame or iframe focused
+        https://bugs.webkit.org/show_bug.cgi?id=27481
+        http://code.google.com/p/chromium/issues/detail?id=32615
+        http://code.google.com/p/chromium/issues/detail?id=17157
+
+        Chromium and WebKit on Windows will now fire beforeunload handlers
+        even if an inner frame is focused.
+
+        Layout tests aren't able to test this bug, since it requires closing
+        the actual browser window, not calling window.close().  Instead,
+        test with WebCore/manual-tests/onbeforeunload-focused-iframe.html.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::dispatchBeforeUnloadEvent):
+
 2010-02-08  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index dafdb8e..5a98bc2 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -1182,7 +1182,7 @@ bool WebViewImpl::dispatchBeforeUnloadEvent()
     // FIXME: This should really cause a recursive depth-first walk of all
     // frames in the tree, calling each frame's onbeforeunload.  At the moment,
     // we're consistent with Safari 3.1, not IE/FF.
-    Frame* frame = m_page->focusController()->focusedOrMainFrame();
+    Frame* frame = m_page->mainFrame();
     if (!frame)
         return true;
 
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 09f8d7e..8d6ecdf 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,20 @@
+2010-02-08  Charlie Reis  <creis at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        onbeforeunload not called at window close + frame or iframe focused
+        https://bugs.webkit.org/show_bug.cgi?id=27481
+        
+        Chromium and WebKit on Windows will now fire beforeunload handlers
+        even if an inner frame is focused.  
+
+        Layout tests aren't able to test this bug, since it requires closing
+        the actual browser window, not calling window.close().  Instead,
+        test with WebCore/manual-tests/onbeforeunload-focused-iframe.html.
+
+        * WebView.cpp:
+        (WebView::shouldClose):
+
 2010-02-08  Brent Fulgham  <bfulgham at webkit.org>
 
         Reviewed by Adam Roben.
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 6144532..c8aec2f 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -5060,7 +5060,7 @@ HRESULT STDMETHODCALLTYPE WebView::shouldClose(
     }
 
     *result = TRUE;
-    if (Frame* frame = m_page->focusController()->focusedOrMainFrame())
+    if (Frame* frame = m_page->mainFrame())
         *result = frame->shouldClose() ? TRUE : FALSE;
     return S_OK;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list