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

trey trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:23:48 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit be0a20366b366d34b79d9caaaa3f12e99c215f20
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 6 20:24:04 2003 +0000

    WebCore:
    
    	3137647 - ad frames get their own history entries at channels.netscape.com
    	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
    
    	The logic for deciding whether new entries are added to history is moved here
    	from WebKit.  The advantage is that we can take specific action in each of the
    	relevant cases instead of WK the half-informed guessing WK was doing.
    
    	Here is what we now use for the lockHistory param to scheduleRedirect():
    
    	document.location = XXX  	-    !userGesture
    	window.location = XXX		-    !userGesture
    	window.open			-    false
    	window.replace			-    true
    	window.reload			-    true
    	meta equiv http-refresh		-    delay <= 1
    	http-refresh			-    delay <= 1
    
            Reviewed by Maciej, Darin.
    
            * khtml/ecma/kjs_binding.cpp:
            (ScriptInterpreter::wasRunByUserGesture):  Rename of previous isWindowOpenAllowed(),
    	since we know use it for multiple purposes.
            * khtml/ecma/kjs_binding.h:
            * khtml/ecma/kjs_html.cpp:
            (KJS::HTMLDocument::putValue):  Assignment to document.location locks history
    	if not a result of a user gesture.
            * khtml/ecma/kjs_window.cpp:
            (Window::put):  Assignment to window.location locks history
    	if not a result of a user gesture.
            (WindowFunc::tryCall):  Adopt rename to wasRunByUserGesture().
            (Location::put):  Assignment to window.location locks history
    	if not a result of a user gesture.
            * khtml/khtml_part.cpp:
            (KHTMLPart::receivedFirstData):  http-refreshes lock history if the timeout<1
            * khtml/xml/dom_docimpl.cpp:
            (DocumentImpl::processHttpEquiv):  http-refreshes lock history if the timeout<1
    
    WebKit:
    
    	3137647 - ad frames get their own history entries at channels.netscape.com
    	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
    
    	Move logic for deciding on "quick redirect" down to WebCore, where we really know
    	what case we're in instead of having to guess from the params we were receiving.
    
            Reviewed by Maciej, Darin.
    
            * Plugins.subproj/WebNetscapePluginDocumentView.m:
            (-[WebNetscapePluginDocumentView setDataSource:]):  Fix build error (URL vs String)
            * WebView.subproj/WebFramePrivate.h:  Nuke Completing state.
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _transitionToLayoutAcceptable]):  Nuke Completing state.
            (-[WebFrame _transitionToCommitted:]):  Nuke Completing state.
            (-[WebFrame _isLoadComplete]):  Nuke Completing state.
            (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
    	Just obey lockHistory param when deciding whether we are doing a "client redirect"
    	instead of previous guesswork.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3583 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index dbf55f8..c60a450 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,43 @@
+2003-02-05  Trey Matteson  <trey at apple.com>
+
+	3137647 - ad frames get their own history entries at channels.netscape.com	
+	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
+
+	The logic for deciding whether new entries are added to history is moved here
+	from WebKit.  The advantage is that we can take specific action in each of the
+	relevant cases instead of WK the half-informed guessing WK was doing.
+
+	Here is what we now use for the lockHistory param to scheduleRedirect():
+
+	document.location = XXX  	-    !userGesture
+	window.location = XXX		-    !userGesture
+	window.open			-    false
+	window.replace			-    true
+	window.reload			-    true
+	meta equiv http-refresh		-    delay <= 1
+	http-refresh			-    delay <= 1
+
+        Reviewed by Maciej, Darin.
+
+        * khtml/ecma/kjs_binding.cpp:
+        (ScriptInterpreter::wasRunByUserGesture):  Rename of previous isWindowOpenAllowed(),
+	since we know use it for multiple purposes.
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLDocument::putValue):  Assignment to document.location locks history
+	if not a result of a user gesture.
+        * khtml/ecma/kjs_window.cpp:
+        (Window::put):  Assignment to window.location locks history
+	if not a result of a user gesture.
+        (WindowFunc::tryCall):  Adopt rename to wasRunByUserGesture().
+        (Location::put):  Assignment to window.location locks history
+	if not a result of a user gesture.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::receivedFirstData):  http-refreshes lock history if the timeout<1
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::processHttpEquiv):  http-refreshes lock history if the timeout<1
+
+
 2003-02-04  Trey Matteson  <trey at apple.com>
 
 	Pass formValues up through the bridge at submit time.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index dbf55f8..c60a450 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,43 @@
+2003-02-05  Trey Matteson  <trey at apple.com>
+
+	3137647 - ad frames get their own history entries at channels.netscape.com	
+	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
+
+	The logic for deciding whether new entries are added to history is moved here
+	from WebKit.  The advantage is that we can take specific action in each of the
+	relevant cases instead of WK the half-informed guessing WK was doing.
+
+	Here is what we now use for the lockHistory param to scheduleRedirect():
+
+	document.location = XXX  	-    !userGesture
+	window.location = XXX		-    !userGesture
+	window.open			-    false
+	window.replace			-    true
+	window.reload			-    true
+	meta equiv http-refresh		-    delay <= 1
+	http-refresh			-    delay <= 1
+
+        Reviewed by Maciej, Darin.
+
+        * khtml/ecma/kjs_binding.cpp:
+        (ScriptInterpreter::wasRunByUserGesture):  Rename of previous isWindowOpenAllowed(),
+	since we know use it for multiple purposes.
+        * khtml/ecma/kjs_binding.h:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::HTMLDocument::putValue):  Assignment to document.location locks history
+	if not a result of a user gesture.
+        * khtml/ecma/kjs_window.cpp:
+        (Window::put):  Assignment to window.location locks history
+	if not a result of a user gesture.
+        (WindowFunc::tryCall):  Adopt rename to wasRunByUserGesture().
+        (Location::put):  Assignment to window.location locks history
+	if not a result of a user gesture.
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::receivedFirstData):  http-refreshes lock history if the timeout<1
+        * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::processHttpEquiv):  http-refreshes lock history if the timeout<1
+
+
 2003-02-04  Trey Matteson  <trey at apple.com>
 
 	Pass formValues up through the bridge at submit time.
diff --git a/WebCore/khtml/ecma/kjs_binding.cpp b/WebCore/khtml/ecma/kjs_binding.cpp
index 6469e10..c34bfa5 100644
--- a/WebCore/khtml/ecma/kjs_binding.cpp
+++ b/WebCore/khtml/ecma/kjs_binding.cpp
@@ -224,7 +224,7 @@ void ScriptInterpreter::forgetDOMObjectsForDocument( void* documentHandle )
 }
 
 
-bool ScriptInterpreter::isWindowOpenAllowed() const
+bool ScriptInterpreter::wasRunByUserGesture() const
 {
   if ( m_evt )
   {
diff --git a/WebCore/khtml/ecma/kjs_binding.h b/WebCore/khtml/ecma/kjs_binding.h
index 42c3ac4..ed27299 100644
--- a/WebCore/khtml/ecma/kjs_binding.h
+++ b/WebCore/khtml/ecma/kjs_binding.h
@@ -121,7 +121,7 @@ namespace KJS {
     /**
      * "Smart" window.open policy
      */
-    bool isWindowOpenAllowed() const;
+    bool wasRunByUserGesture() const;
 
     virtual void mark();
   private:
diff --git a/WebCore/khtml/ecma/kjs_html.cpp b/WebCore/khtml/ecma/kjs_html.cpp
index e6e84e4..12ecaf0 100644
--- a/WebCore/khtml/ecma/kjs_html.cpp
+++ b/WebCore/khtml/ecma/kjs_html.cpp
@@ -358,7 +358,13 @@ void KJS::HTMLDocument::putValue(ExecState *exec, int token, const Value& value,
        str = resolvedURL.url();
       }
 
+#if APPLE_CHANGES
+      // We want a new history item if this JS was called via a user gesture
+      bool userGesture = static_cast<ScriptInterpreter *>(exec->interpreter())->wasRunByUserGesture();
+      part->scheduleRedirection(0, str, !userGesture);
+#else
       part->scheduleRedirection(0, str, false/*don't lock history*/);
+#endif
     }
     break;
   }
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 5568232..ed08717 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -750,9 +750,17 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
       if (p) {
         QString dstUrl = p->htmlDocument().completeURL(value.toString(exec).string()).string();
         if (dstUrl.find("javascript:", 0, false) || isSafeScript(exec))
+#if APPLE_CHANGES
+        {
+          // We want a new history item if this JS was called via a user gesture
+          bool userGesture = static_cast<ScriptInterpreter *>(exec->interpreter())->wasRunByUserGesture();
+          m_part->scheduleRedirection(0, dstUrl, !userGesture);
+        }
+#else
           m_part->scheduleRedirection(0,
                                       dstUrl,
                                       false /*don't lock history*/);
+#endif
       }
       return;
     }
@@ -1093,7 +1101,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
     } else if ( policy == 3 ) // smart
     {
       // window.open disabled unless from a key/mouse event
-      if (static_cast<ScriptInterpreter *>(exec->interpreter())->isWindowOpenAllowed())
+      if (static_cast<ScriptInterpreter *>(exec->interpreter())->wasRunByUserGesture())
 #if !APPLE_CHANGES
         policy = 0;
 #else
@@ -1831,8 +1839,13 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
     ObjectImp::put(exec, p, v, attr);
     return;
   }
-
+#if APPLE_CHANGES
+  // We want a new history item if this JS was called via a user gesture
+  bool userGesture = static_cast<ScriptInterpreter *>(exec->interpreter())->wasRunByUserGesture();
+  m_part->scheduleRedirection(0, url.url(), !userGesture);
+#else
   m_part->scheduleRedirection(0, url.url(), false /*don't lock history*/);
+#endif
 }
 
 Value Location::toPrimitive(ExecState *exec, Type) const
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index c49213d..ba347f7 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -1073,7 +1073,12 @@ void KHTMLPart::receivedFirstData()
       if( pos == -1 )
       {
         delay = qData.stripWhiteSpace().toDouble();
+#if APPLE_CHANGES
+        // We want a new history item if the refresh timeout > 1 second
+        scheduleRedirection( delay, m_url.url(), delay <= 1);
+#else
         scheduleRedirection( delay, m_url.url());
+#endif
       }
       else
       {
@@ -1099,7 +1104,12 @@ void KHTMLPart::receivedFirstData()
                 end_pos = index;
           }
         }
+#if APPLE_CHANGES
+        // We want a new history item if the refresh timeout > 1 second
+        scheduleRedirection( delay, d->m_doc->completeURL( qData.mid( pos, end_pos ) ), delay <= 1);
+#else
         scheduleRedirection( delay, d->m_doc->completeURL( qData.mid( pos, end_pos ) ));
+#endif
       }
       d->m_bHTTPRefresh = true;
     }
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 6d833d2..703d9a3 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1473,7 +1473,12 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
             bool ok = false;
             int delay = 0;
 	    delay = str.toInt(&ok);
+#if APPLE_CHANGES
+            // We want a new history item if the refresh timeout > 1 second
+            if(ok) v->part()->scheduleRedirection(delay, v->part()->url().url(), delay <= 1);
+#else
             if(ok) v->part()->scheduleRedirection(delay, v->part()->url().url() );
+#endif
         } else {
             double delay = 0;
             bool ok = false;
@@ -1487,7 +1492,12 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con
             if ( str.length() && str[0] == '=' ) str = str.mid( 1 ).stripWhiteSpace();
             str = parseURL( DOMString(str) ).string();
             if ( ok )
+#if APPLE_CHANGES
+                // We want a new history item if the refresh timeout > 1 second
+                v->part()->scheduleRedirection(delay, getDocument()->completeURL( str ), delay <= 1);
+#else
                 v->part()->scheduleRedirection(delay, getDocument()->completeURL( str ));
+#endif
         }
     }
     else if(strcasecmp(equiv, "expires") == 0)
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 72f0b1f..8d98c8b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,24 @@
+2003-02-06  Trey Matteson  <trey at apple.com>
+
+	3137647 - ad frames get their own history entries at channels.netscape.com	
+	3133844 - 2 items in back list at http://www.kiup-bank.com/personal/main01.html
+
+	Move logic for deciding on "quick redirect" down to WebCore, where we really know
+	what case we're in instead of having to guess from the params we were receiving.
+
+        Reviewed by Maciej, Darin.
+
+        * Plugins.subproj/WebNetscapePluginDocumentView.m:
+        (-[WebNetscapePluginDocumentView setDataSource:]):  Fix build error (URL vs String)
+        * WebView.subproj/WebFramePrivate.h:  Nuke Completing state.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _transitionToLayoutAcceptable]):  Nuke Completing state.
+        (-[WebFrame _transitionToCommitted:]):  Nuke Completing state.
+        (-[WebFrame _isLoadComplete]):  Nuke Completing state.
+        (-[WebFrame _clientRedirectedTo:delay:fireDate:lockHistory:]):
+	Just obey lockHistory param when deciding whether we are doing a "client redirect"
+	instead of previous guesswork.
+
 2003-02-06  Richard Williamson   <rjw at apple.com>
 
         Rename WebError to WebKitError.
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
index c16a5ba..a6ec0e1 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginDocumentView.m
@@ -73,7 +73,7 @@
         // FIXME: It would be nice to stop the load here.
         
         WebPluginError *error = [WebPluginError pluginErrorWithCode:WebKitErrorCannotLoadPlugin
-                                                         contentURL:[theDataSource URL]
+                                                         contentURL:[[theDataSource URL] absoluteString]
                                                       pluginPageURL:nil
                                                          pluginName:[thePlugin name]
                                                            MIMEType:MIME];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index a8f2c36..a02763e 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -25,9 +25,6 @@ typedef enum {
     // This state indicates that it is reasonable to perform a layout.
     WebFrameStateLayoutAcceptable,
 
-    // We've decided we're complete, and khtml is ending the load
-    WebFrameStateCompleting,
-
     WebFrameStateComplete
 } WebFrameState;
 
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 97d71f8..419aa07 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -42,7 +42,6 @@ static const char * const stateNames[] = {
     "WebFrameStateProvisional",
     "WebFrameStateCommittedPage",
     "WebFrameStateLayoutAcceptable",
-    "WebFrameStateCompleting",
     "WebFrameStateComplete"
 };
 
@@ -473,7 +472,6 @@ Repeat load of the same URL (by any other means of navigation other than the rel
 
         case WebFrameStateProvisional:
         case WebFrameStateComplete:
-        case WebFrameStateCompleting:
         case WebFrameStateLayoutAcceptable:
             return;
     }
@@ -625,7 +623,6 @@ Repeat load of the same URL (by any other means of navigation other than the rel
         
         case WebFrameStateCommittedPage:
         case WebFrameStateLayoutAcceptable:
-        case WebFrameStateCompleting:
         case WebFrameStateComplete:
         default:
         {
@@ -824,19 +821,11 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
                 // Should instead make sure the bridge/part is in the proper state even for
                 // non-HTML content, or make a call to the document and let it deal with the bridge.
 
-                [self _setState:WebFrameStateCompleting];
+                [self _setState:WebFrameStateComplete];
                 if ([ds isDocumentHTML]) {
                     [_private->bridge end];
                 }
 
-                // Important to flip the state after we end the load, because client redirects will
-                // come out of those, and we want to treat them as part of the same op from the
-                //user's point of view. But it's possible we that inside the call to
-                // end we may navigate, so we have to check for a state change since calling end.
-                if ([self _state] == WebFrameStateCompleting) {
-                    [self _setState:WebFrameStateComplete];
-                }
-                
                 // FIXME: Is this subsequent work important if we already navigated away?
                 // Maybe there are bugs because of that, or extra work we can skip because
                 // the new page is ready.
@@ -904,9 +893,6 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
             return;
         }
         
-        case WebFrameStateCompleting:
-            return;
-
         case WebFrameStateComplete:
         {
             LOG(Loading, "%@:  checking complete, current state WebFrameStateComplete", [self name]);
@@ -1545,19 +1531,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
         // If we don't have a dataSource, we have no "original" load on which to base a redirect,
         // so we better just treat the redirect as a normal load.
         _private->quickRedirectComing = NO;
-    } else if (lockHistory) {
-        // meta-refresh, or another case WC thinks doens't need a b/f item
-        _private->quickRedirectComing = (seconds <= 1.0);
     } else {
-        // a redirection stemming from a JS call
-        if ([[[self controller] mainFrame] _state] == WebFrameStateCompleting) {
-            // Happened as part of closing a doc, so it's part of an onload
-            // I think delay will always be zero, but it's fine to go with the <1 policy
-            _private->quickRedirectComing = (seconds <= 1.0);
-        } else {
-            // Some other JS action, perhaps handling a user event.  Treat like a normal nav.
-            _private->quickRedirectComing = NO;
-        }
+        _private->quickRedirectComing = lockHistory;
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list