[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:57:14 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 80bc0b8de02053524be4c24684d50e353d7cf095
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 5 10:26:22 2002 +0000

    	- fixed 3027404 - pop-up ads not always suppressed
    
            * khtml/ecma/kjs_binding.cpp:
            (ScriptInterpreter::isWindowOpenAllowed): Don't allow opening if
    	we are in a timer callback - for reasons unexplained this will
    	always show up as an inline script.
            * khtml/ecma/kjs_binding.h:
            * khtml/ecma/kjs_window.cpp:
            (ScheduledAction::execute): Note that we're in a timer callback.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 51c34a0..7d55194 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-11-05  Maciej Stachowiak  <mjs at apple.com>
+
+	- fixed 3027404 - pop-up ads not always suppressed
+	
+        * khtml/ecma/kjs_binding.cpp:
+        (ScriptInterpreter::isWindowOpenAllowed): Don't allow opening if
+	we are in a timer callback - for reasons unexplained this will
+	always show up as an inline script.
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_window.cpp:
+        (ScheduledAction::execute): Note that we're in a timer callback.
+
 2002-11-04  Richard Williamson  <rjw at apple.com>
 
         Changes to support cursive letter forms.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 51c34a0..7d55194 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2002-11-05  Maciej Stachowiak  <mjs at apple.com>
+
+	- fixed 3027404 - pop-up ads not always suppressed
+	
+        * khtml/ecma/kjs_binding.cpp:
+        (ScriptInterpreter::isWindowOpenAllowed): Don't allow opening if
+	we are in a timer callback - for reasons unexplained this will
+	always show up as an inline script.
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_window.cpp:
+        (ScheduledAction::execute): Note that we're in a timer callback.
+
 2002-11-04  Richard Williamson  <rjw at apple.com>
 
         Changes to support cursive letter forms.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 51c34a0..7d55194 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2002-11-05  Maciej Stachowiak  <mjs at apple.com>
+
+	- fixed 3027404 - pop-up ads not always suppressed
+	
+        * khtml/ecma/kjs_binding.cpp:
+        (ScriptInterpreter::isWindowOpenAllowed): Don't allow opening if
+	we are in a timer callback - for reasons unexplained this will
+	always show up as an inline script.
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_window.cpp:
+        (ScheduledAction::execute): Note that we're in a timer callback.
+
 2002-11-04  Richard Williamson  <rjw at apple.com>
 
         Changes to support cursive letter forms.
diff --git a/WebCore/khtml/ecma/kjs_binding.cpp b/WebCore/khtml/ecma/kjs_binding.cpp
index ea80f79..2721153 100644
--- a/WebCore/khtml/ecma/kjs_binding.cpp
+++ b/WebCore/khtml/ecma/kjs_binding.cpp
@@ -183,13 +183,13 @@ bool ScriptInterpreter::isWindowOpenAllowed() const
       return true;
   } else // no event
   {
-    if ( m_inlineCode )
+    if ( m_inlineCode  && !m_timerCallback )
     {
       // This is the <a href="javascript:window.open('...')> case -> we let it through
       return true;
       kdDebug(6070) << "Window.open, smart policy, no event, inline code -> ok" << endl;
     }
-    else // This is the <script>window.open(...)</script> case -> block it
+    else // This is the <script>window.open(...)</script> case or a timer callback -> block it
       kdDebug(6070) << "Window.open, smart policy, no event, <script> tag -> refused" << endl;
   }
   return false;
diff --git a/WebCore/khtml/ecma/kjs_binding.h b/WebCore/khtml/ecma/kjs_binding.h
index 5a05bd4..2072650 100644
--- a/WebCore/khtml/ecma/kjs_binding.h
+++ b/WebCore/khtml/ecma/kjs_binding.h
@@ -110,6 +110,7 @@ namespace KJS {
      */
     void setCurrentEvent( DOM::Event *evt ) { m_evt = evt; }
     void setInlineCode( bool inlineCode ) { m_inlineCode = inlineCode; }
+    void setProcessingTimerCallback( bool timerCallback ) { m_timerCallback = timerCallback; }
     /**
      * "Smart" window.open policy
      */
@@ -120,6 +121,7 @@ namespace KJS {
     QPtrDict<DOMObject> m_domObjects;
     DOM::Event *m_evt;
     bool m_inlineCode;
+    bool m_timerCallback;
   };
   /**
    * Retrieve from cache, or create, a KJS object around a DOM object
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 40e13e0..378e08b 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1391,6 +1391,10 @@ ScheduledAction::ScheduledAction(QString _code, bool _singleShot)
 
 void ScheduledAction::execute(Window *window)
 {
+  ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(KJSProxy::proxy(window->m_part)->interpreter());
+
+  interpreter->setProcessingTimerCallback(true);
+
   //kdDebug(6070) << "ScheduledAction::execute " << this << endl;
   if (isFunction) {
     if (func.implementsCall()) {
@@ -1409,6 +1413,8 @@ void ScheduledAction::execute(Window *window)
   else {
     window->m_part->executeScript(code);
   }
+
+  interpreter->setProcessingTimerCallback(false);
 }
 
 ScheduledAction::~ScheduledAction()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list