Title: [87260] trunk/Source
Revision
87260
Author
[email protected]
Date
2011-05-24 20:39:21 -0700 (Tue, 24 May 2011)

Log Message

2011-05-24  Adam Barth  <[email protected]>

        Reviewed by Eric Seidel.

        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
        https://bugs.webkit.org/show_bug.cgi?id=61395

        All the callers of the API are wrong.  They should call the more modern
        static member function of ScriptController instead.  I'll remove the
        FrameLoader function in a future patch.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::processingUserGesture):
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::click):
2011-05-24  Adam Barth  <[email protected]>

        Reviewed by Eric Seidel.

        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
        https://bugs.webkit.org/show_bug.cgi?id=61395

        * src/FrameLoaderClientImpl.cpp:
        (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):
        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::isProcessingUserGesture):
2011-05-24  Adam Barth  <[email protected]>

        Reviewed by Eric Seidel.

        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
        https://bugs.webkit.org/show_bug.cgi?id=61395

        * WebView/WebView.mm:
        (-[WebView _isProcessingUserGesture]):
2011-05-24  Adam Barth  <[email protected]>

        Reviewed by Eric Seidel.

        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
        https://bugs.webkit.org/show_bug.cgi?id=61395

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (drtPrintFrameUserGestureStatus):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (87259 => 87260)


--- trunk/Source/WebCore/ChangeLog	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebCore/ChangeLog	2011-05-25 03:39:21 UTC (rev 87260)
@@ -1,3 +1,19 @@
+2011-05-24  Adam Barth  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
+        https://bugs.webkit.org/show_bug.cgi?id=61395
+
+        All the callers of the API are wrong.  They should call the more modern
+        static member function of ScriptController instead.  I'll remove the
+        FrameLoader function in a future patch.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::processingUserGesture):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::click):
+
 2011-05-24  Gyuyoung Kim  <[email protected]>
 
         Unreviewed. Fix style error.

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (87259 => 87260)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2011-05-25 03:39:21 UTC (rev 87260)
@@ -2402,11 +2402,12 @@
 
 bool HTMLMediaElement::processingUserGesture() const
 {
+    // FIXME: We should call ScriptController::processingUserGesture() so
+    // we know what to do without a Frame.
     Frame* frame = document()->frame();
-    FrameLoader* loader = frame ? frame->loader() : 0;
-
-    // return 'true' for safety if we don't know the answer 
-    return loader ? loader->isProcessingUserGesture() : true;
+    if (!frame)
+        return true;
+    return frame->loader()->isProcessingUserGesture();
 }
 
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)

Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (87259 => 87260)


--- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp	2011-05-25 03:39:21 UTC (rev 87260)
@@ -130,7 +130,7 @@
 
 void RenderFileUploadControl::click()
 {
-    // Requires a user gesture to open the file dialog.
+    // FIXME: We should call ScriptController::processingUserGesture().
     if (!frame() || !frame()->loader()->isProcessingUserGesture())
         return;
     if (Chrome* chromePointer = chrome())

Modified: trunk/Source/WebKit/chromium/ChangeLog (87259 => 87260)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-05-25 03:39:21 UTC (rev 87260)
@@ -1,3 +1,15 @@
+2011-05-24  Adam Barth  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
+        https://bugs.webkit.org/show_bug.cgi?id=61395
+
+        * src/FrameLoaderClientImpl.cpp:
+        (WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):
+        * src/WebFrameImpl.cpp:
+        (WebKit::WebFrameImpl::isProcessingUserGesture):
+
 2011-05-24  Greg Simon  <[email protected]>
 
         Reviewed by Dimitri Glazkov.

Modified: trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp (87259 => 87260)


--- trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp	2011-05-25 03:39:21 UTC (rev 87260)
@@ -634,6 +634,9 @@
             // insufficient to catch and properly flag these transitions. Once a
             // proper fix for this bug is identified and applied the following
             // block may no longer be required.
+            //
+            // FIXME: Why do we call isProcessingUserGesture here but none of
+            // the other ports do?
             bool wasClientRedirect =
                 (url == m_expectedClientRedirectDest && chainEnd == m_expectedClientRedirectSrc)
                 || !m_webFrame->isProcessingUserGesture();

Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (87259 => 87260)


--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp	2011-05-25 03:39:21 UTC (rev 87260)
@@ -1099,6 +1099,7 @@
 
 bool WebFrameImpl::isProcessingUserGesture() const
 {
+    // FIXME: We should call ScriptController::processingUserGesture().
     return frame()->loader()->isProcessingUserGesture();
 }
 

Modified: trunk/Source/WebKit/mac/ChangeLog (87259 => 87260)


--- trunk/Source/WebKit/mac/ChangeLog	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/mac/ChangeLog	2011-05-25 03:39:21 UTC (rev 87260)
@@ -1,3 +1,13 @@
+2011-05-24  Adam Barth  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
+        https://bugs.webkit.org/show_bug.cgi?id=61395
+
+        * WebView/WebView.mm:
+        (-[WebView _isProcessingUserGesture]):
+
 2011-05-24  Michael Saboff  <[email protected]>
 
         Reviewed by Geoffrey Garen.

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (87259 => 87260)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2011-05-25 03:39:21 UTC (rev 87260)
@@ -1238,6 +1238,7 @@
 - (BOOL)_isProcessingUserGesture
 {
     WebFrame *frame = [self mainFrame];
+    // FIXME: We should call ScriptController::processingUserGesture().
     return core(frame)->loader()->isProcessingUserGesture();
 }
 

Modified: trunk/Source/WebKit/qt/ChangeLog (87259 => 87260)


--- trunk/Source/WebKit/qt/ChangeLog	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-05-25 03:39:21 UTC (rev 87260)
@@ -1,3 +1,13 @@
+2011-05-24  Adam Barth  <[email protected]>
+
+        Reviewed by Eric Seidel.
+
+        Add FIXME comments about removing FrameLoader::isProcessingUserGesture
+        https://bugs.webkit.org/show_bug.cgi?id=61395
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (drtPrintFrameUserGestureStatus):
+
 2011-05-23  Luiz Agostini  <[email protected]>
 
         Reviewed by Andreas Kling.

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (87259 => 87260)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2011-05-25 03:28:18 UTC (rev 87259)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2011-05-25 03:39:21 UTC (rev 87260)
@@ -113,6 +113,7 @@
 
 static QString drtPrintFrameUserGestureStatus(WebCore::Frame* frame)
 {
+    // FIXME: We should call ScriptController::processingUserGesture().
     if (frame->loader()->isProcessingUserGesture())
         return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("true"));
     return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("false"));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to