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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:46:51 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cad0f8be9f906711f03360460661c9ac0c9cfb31
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 4 00:31:52 2002 +0000

    WebCore:
    
    	Add API to execute JavaScript.
    
            * kwq/WebCoreBridge.h: Add method.
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge executeJavaScriptFromString:]): Call through to
    	KHTML. But only if the document is not nil. We need to figure out
    	what to do in the case where the document is nil.
    
    WebKit:
    
    	Add API for executing JavaScript.
    
            * WebView.subproj/WebController.h: Add method.
            * WebView.subproj/WebController.m:
            (-[WebController executeJavaScriptFromString:]): Call through to
    	WebCore to do the heavy lifting.
    
    WebBrowser:
    
    	Fixed most of 2980477 -- javascript: URLs don't work when typed
    	into the page address field or in bookmarks
    
    	They work now, but only if the frontmost window is not empty.
    
            * BrowserWebBookmarkExtras.m:
            (-[WebBookmark _goToWithWindowPolicy:]): Rename, change to take
    	a policy parameter instead of a boolean, and add code for the
    	javascript: case.
            (-[WebBookmark goTo]): Pass ReuseAvailableWindow.
            (-[WebBookmark goToInNewWindow]): Pass CreateWindow.
            (-[WebBookmark goToUsingNewWindowAccordingToEvent:]): Choose policy based
    	on both the command key and the shift key.
    
            * BrowserWindowController.m:
            (-[BrowserWindowController goToToolbarLocation:]): Add add code for the
    	javascript: case.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2239 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 5655fc9..91e763d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,13 @@
+2002-10-03  Darin Adler  <darin at apple.com>
+
+	Add API to execute JavaScript.
+
+        * kwq/WebCoreBridge.h: Add method.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge executeJavaScriptFromString:]): Call through to
+	KHTML. But only if the document is not nil. We need to figure out
+	what to do in the case where the document is nil.
+
 === Alexander-26 ===
 
 2002-10-02  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5655fc9..91e763d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2002-10-03  Darin Adler  <darin at apple.com>
+
+	Add API to execute JavaScript.
+
+        * kwq/WebCoreBridge.h: Add method.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge executeJavaScriptFromString:]): Call through to
+	KHTML. But only if the document is not nil. We need to figure out
+	what to do in the case where the document is nil.
+
 === Alexander-26 ===
 
 2002-10-02  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5655fc9..91e763d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2002-10-03  Darin Adler  <darin at apple.com>
+
+	Add API to execute JavaScript.
+
+        * kwq/WebCoreBridge.h: Add method.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge executeJavaScriptFromString:]): Call through to
+	KHTML. But only if the document is not nil. We need to figure out
+	what to do in the case where the document is nil.
+
 === Alexander-26 ===
 
 2002-10-02  Darin Adler  <darin at apple.com>
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 0203e72..86739da 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -132,6 +132,8 @@ typedef khtml::RenderPart KHTMLRenderPart;
 
 - (CFStringEncoding)textEncoding;
 
+- (void)executeJavaScriptFromString:(NSString *)string;
+
 @end
 
 // The WebCoreBridge protocol contains methods for use by the WebCore side of the bridge.
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index b136c6c..b59e819 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -532,4 +532,12 @@ using khtml::RenderPart;
     return part->impl->nextKeyViewInFrameHierarchy(0, KWQSelectingPrevious);
 }
 
+- (void)executeJavaScriptFromString:(NSString *)string
+{
+    // FIXME: We want to execute it even without a document, no?
+    if (part->impl->document()) {
+        part->executeScript(QString::fromNSString(string));
+    }
+}
+
 @end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 959713d..db483c6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,14 @@
 2002-10-03  Darin Adler  <darin at apple.com>
 
+	Add API for executing JavaScript.
+
+        * WebView.subproj/WebController.h: Add method.
+        * WebView.subproj/WebController.m:
+        (-[WebController executeJavaScriptFromString:]): Call through to
+	WebCore to do the heavy lifting.
+
+2002-10-03  Darin Adler  <darin at apple.com>
+
         * English.lproj/Localizable.strings: Generated by the script.
         * English.lproj/StringsNotToBeLocalized.txt: Added many more strings to ignore.
         * English.lproj/WebError.strings: Removed.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 959713d..db483c6 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,14 @@
 2002-10-03  Darin Adler  <darin at apple.com>
 
+	Add API for executing JavaScript.
+
+        * WebView.subproj/WebController.h: Add method.
+        * WebView.subproj/WebController.m:
+        (-[WebController executeJavaScriptFromString:]): Call through to
+	WebCore to do the heavy lifting.
+
+2002-10-03  Darin Adler  <darin at apple.com>
+
         * English.lproj/Localizable.strings: Generated by the script.
         * English.lproj/StringsNotToBeLocalized.txt: Added many more strings to ignore.
         * English.lproj/WebError.strings: Removed.
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 192688a..b7d2900 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -324,7 +324,7 @@ extern NSString *WebElementFrameKey;
 /*!
     @method userAgentForURL:
     @abstract Get the appropriate user-agent string for a particular URL.
-    @param URL Get the appropriate user-agent string for the URL.
+    @param URL The URL.
     @result Returns the user-agent string for the supplied URL.
 */
 - (NSString *)userAgentForURL:(NSURL *)URL;
@@ -365,8 +365,13 @@ extern NSString *WebElementFrameKey;
 /*!
     @method customTextEncoding
     @result Returns the custom text encoding.
-    // FIXME Resolve whether to use NSStringEncoding
 */
 - (NSString *)customTextEncodingName;
 
+/*!
+    @method executeJavaScriptFromString:
+    @param script The text of the JavaScript.
+*/
+- (void)executeJavaScriptFromString:(NSString *)string;
+
 @end
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index a063f2d..744230c 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -475,4 +475,9 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     return result;
 }
 
+- (void)executeJavaScriptFromString:(NSString *)string
+{
+    [[[self mainFrame] _bridge] executeJavaScriptFromString:string];
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 192688a..b7d2900 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -324,7 +324,7 @@ extern NSString *WebElementFrameKey;
 /*!
     @method userAgentForURL:
     @abstract Get the appropriate user-agent string for a particular URL.
-    @param URL Get the appropriate user-agent string for the URL.
+    @param URL The URL.
     @result Returns the user-agent string for the supplied URL.
 */
 - (NSString *)userAgentForURL:(NSURL *)URL;
@@ -365,8 +365,13 @@ extern NSString *WebElementFrameKey;
 /*!
     @method customTextEncoding
     @result Returns the custom text encoding.
-    // FIXME Resolve whether to use NSStringEncoding
 */
 - (NSString *)customTextEncodingName;
 
+/*!
+    @method executeJavaScriptFromString:
+    @param script The text of the JavaScript.
+*/
+- (void)executeJavaScriptFromString:(NSString *)string;
+
 @end
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index a063f2d..744230c 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -475,4 +475,9 @@ NSString *WebElementFrameKey = @"WebElementFrame";
     return result;
 }
 
+- (void)executeJavaScriptFromString:(NSString *)string
+{
+    [[[self mainFrame] _bridge] executeJavaScriptFromString:string];
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list