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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:52:53 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 10680e80fdc1c0f1cf98cd4dc9a145d8a3ec5847
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 7 21:58:51 2001 +0000

    Changes to clean up warnings.
    Also big swath of new API for WebView and WebdataSource
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@482 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d9adf0c..8beb639 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2001-12-07  Richard Williamson  <richwill at richwill.com>
+
+        Fixed bug that was highlighted when we turned on warnings.
+        
+	* src/kwq/KWQFontMetrics.mm:
+	* src/kwq/KWQMetrics.h:
+
 2001-12-07  Kenneth Kocienda  <kocienda at apple.com>
 
         Fixed small bug in a comparison that was making -Wall complain
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d9adf0c..8beb639 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2001-12-07  Richard Williamson  <richwill at richwill.com>
+
+        Fixed bug that was highlighted when we turned on warnings.
+        
+	* src/kwq/KWQFontMetrics.mm:
+	* src/kwq/KWQMetrics.h:
+
 2001-12-07  Kenneth Kocienda  <kocienda at apple.com>
 
         Fixed small bug in a comparison that was making -Wall complain
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d9adf0c..8beb639 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,10 @@
+2001-12-07  Richard Williamson  <richwill at richwill.com>
+
+        Fixed bug that was highlighted when we turned on warnings.
+        
+	* src/kwq/KWQFontMetrics.mm:
+	* src/kwq/KWQMetrics.h:
+
 2001-12-07  Kenneth Kocienda  <kocienda at apple.com>
 
         Fixed small bug in a comparison that was making -Wall complain
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bda3582..56620b7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2001-12-07  Richard Williamson  <richwill at richwill.com>
+
+        First pass at API for WKWebPageView and WKWebPageDataSource.  Note
+        that we have to change names from NS to WK!  The new API is conditionally
+        excluded #ifdef READY_FOR_PRIMETIME
+	* WebView.subproj/NSWebPageDataSource.h:
+	* WebView.subproj/NSWebPageDataSourcePrivate.h:
+	* WebView.subproj/NSWebPageView.h:
+
 2001-12-06  Maciej Stachowiak  <mjs at apple.com>
 
 	* Cache.subproj/NSURICacheData.m: (+[NSURICacheData
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index bda3582..56620b7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,12 @@
+2001-12-07  Richard Williamson  <richwill at richwill.com>
+
+        First pass at API for WKWebPageView and WKWebPageDataSource.  Note
+        that we have to change names from NS to WK!  The new API is conditionally
+        excluded #ifdef READY_FOR_PRIMETIME
+	* WebView.subproj/NSWebPageDataSource.h:
+	* WebView.subproj/NSWebPageDataSourcePrivate.h:
+	* WebView.subproj/NSWebPageView.h:
+
 2001-12-06  Maciej Stachowiak  <mjs at apple.com>
 
 	* Cache.subproj/NSURICacheData.m: (+[NSURICacheData
diff --git a/WebKit/WebView.subproj/NSWebPageDataSource.h b/WebKit/WebView.subproj/NSWebPageDataSource.h
index 095e8b2..e8ff602 100644
--- a/WebKit/WebView.subproj/NSWebPageDataSource.h
+++ b/WebKit/WebView.subproj/NSWebPageDataSource.h
@@ -5,10 +5,230 @@
 */
 #import <Cocoa/Cocoa.h>
 
+/*
+    A NSWebPageDataSource represents all the state associated
+    with a web page.  It is typicallly instantiated withe a URL, but
+    may also be initialized with an NSString or NSData that hold
+    HTML content.
+    
+    Typical usage of a WKWebDataSource.
+    
+    WKWebPageDataSource *dataSource = [[WKWebPageDataSource alloc] initWithURL: url];
+    [dataSource setFrameSetManager: (WKFrameSetManagement *)myManager];
+    [dataSource setScriptExecutionContext: (WKScriptContext *)myContext];
+    
+    Although, usually a WKWebView is the owner and user of data source, and it
+    becomes the WKScriptContext and WKFrameSetManagement for a data source.
+*/
+
+#ifdef READY_FOR_PRIMETIME
+
 @interface NSWebPageDataSource : NSObject
 {
 @private
     id _dataSourcePrivate;
 }
 
- at end
\ No newline at end of file
+
+// Can these init methods return nil? i.e. if URL is invalid, or should they
+// throw expections?
+- initWithURL: (NSURL *)url;
+- initWithData: (NSData *)data;
+- initWithString: (NSString *)string;
+
+// ?? How do you create subclasses of WKURILoader, how is this
+// expected to be used?
+- initWithLoader: (WKURILoader *)loader;
+
+// ?? We don't have a NS streams API!!
+- initWithStream: (NSStream *)stream
+
+// Start actually getting (if initialized with a URL) and parsing data.
+- (void)startLoading;
+
+// Cancel and pending loads.
+- (BOOL)stopLoading;
+
+// Get DOM access to the document.
+- (WKDOMDocument *)document;
+
+// Get the actual source of the docment.
+- (NSString *)documentText;
+
+// Get a 'pretty' version of the document, created by traversal of the DOM.
+- (NSString *)formattedDocumentText;
+
+// Get the currently focused node.  Is this appropriate for the model, or
+// should this be handled by the view?
+- (WKDOMNode *)activeNode;
+
+// URL reference point, these should problably not be public for 1.0.
+- setBase: (NSURL *)url;
+- (NSURL *)base;
+- setBaseTarget: (NSURL *)url;
+- (NSURL *)baseTarget;
+
+- (NSString *)encoding;
+
+// Style sheet
+- (void)setUserStyleSheet: (NSURL *)url;
+- (void)setUserStyleSheet: (NSString *)sheet;
+
+// Searching, to support find in clients.  regular expressions?
+- (WKSearchState *)findTextBegin;
+- (NSString *)findTextNext: (WKRegularExpression *)exp direction: (BOOL)forward state: (WKSearchState *)state;
+- (NSString *)findTextNext: (NSString *)string direction: (BOOL)forward caseSensitive: (BOOL)case state: (WKSearchState *)state;
+
+// Selection
+- (NSString *)selectedText;
+- (WKDOMRange *)selectedRange;
+- (void)setSelection: (WKDOMRange *range);
+- (BOOL)hasSelection;
+- (void)selectAll;
+
+- (void)setFrameSetManager: (WKFrameSetManagement *)fmanager;
+
+- (void)setScriptExecutionContext: (WKScriptContext *)context;
+
+- executeScript: (NSString *)string;
+// Same as above expect uses the node as 'this' value
+- executeScript: (NSString *)string withNode: (WKDOMNode *)node;
+
+// This API reflects the KDE API, but is it sufficient?
+- (BOOL)scheduleScript: (NSString *)string withNode: (WKDOMNode *)node 
+- executeScheduledScript;
+
+
+// a.k.a shortcut icons, http://msdn.microsoft.com/workshop/Author/dhtml/howto/ShortcutIcon.asp.
+- (NSImage *)pageImage;
+
+
+// ---------------------- Convience methods ----------------------
+- (NSString *)pageTitle;
+// ---------------------------------------------------------------
+
+
+/*
+    Notifications?
+        In general, how often should we notify?  We should use notifications
+        if we anticipate multiple clients, no return types, and generally
+        asynchronous or indirect behaviour.
+        
+        notifications:
+            WKSelectionChangedNotification
+            WKNodeActivatedNotification
+            WKDocumentChangedNotification
+    
+    Error handling:
+        exceptions?
+        nil returns?
+        errors by notification?
+        
+        error conditions:
+            timeout
+            unrecognized/handled mime-type
+            javascript errors
+            invalid url
+            parsing errors
+            
+*/
+ at end
+
+
+/*
+    Implementors of this protocol will received messages indicating
+    data streaming.  These methods will be called even if the data source
+    is initialized with something other than a URL.
+*/
+ at protocol  WKWebDataSourceClient
+
+// A new chunk of data has been received.  This could be partial load
+// of a url.  It may be useful to do incremental layout, although
+// typically for non-base URLs this should be done after a URL (i.e. image)
+// has been completed downloaded.
+// ? Should we also provide data?  I think perhaps not, as all access to the
+// document should be via the DOM.
+- (void)receivedDataForURL: (NSURL *)url;
+
+// A URL has completed loading.  This could be used to perform layout.
+- (void)finishedReceivingDataForURL: (NSURL *)url;
+
+//  Called when all the resources associated with a document have been loaded.
+- documentReceived;
+
+ at end
+
+
+/*
+    A class that implements WKScriptContext provides all the state information
+    that may be used by Javascript (AppleScript?).  This includes quirky methods nad
+    
+*/
+ at protocol WKScriptContext
+
+- (void)setStatusText: (NSString *)text;
+- (NSString *)statusText;
+
+// Need API for things like window size and position, window ids,
+// screen goemetry.  Essentially all the 'view' items that are
+// accessible from Javascript.
+
+ at end
+
+
+/*
+*/
+ at protocol WKFrameSetManagement
+- (NSArray *)frameNames;
+- (id)findFrameNamed: (NSString *)name;
+- (BOOL)frameExists: (NSString *)name;
+- (BOOL)openURLInFrame: (id)aFrame url: (NSURL *)url;
+ at end
+
+
+/*
+    The class provide a cover for URL based preference items. 
+*/
+ at interface WKPreferences
++ getPreferencesForURL: (NSURL *)url;
+
+// Encoding that will be used in none specified on page? or in header?
++ setEncoding: (NSString *)encoding;
++ (NSString *)encoding;
+
+// Javascript preferences
+- (void)setJScriptEnabled: (BOOL)flag;
+- (BOOL)jScriptEnabled;
+
+// Java preferences
+- (void)setJavaEnabled: (BOOL)flag
+- (BOOL)javaEnabled;
+
+// Document refreshes allowed
+- setRefreshEnabled: (BOOL)flag;
+- (BOOL)refreshEnabled;
+
+// Plugins
+- (void)setPluginsEnabled: (BOOL)flag;
+- (BOOL)pluginEnabled;
+
+// Should images be loaded.
+- (void)setAutoloadImages: (BOOL)flag;
+- (BOOL)autoloadImages;
+
+// Should only allow local references (i.e. help view?)
+- (void)setOnlyLocalReferences: (BOOL)flag;
+- (BOOL)onlyLocalReferences;
+
+ at end
+
+#else
+ at interface NSWebPageDataSource : NSObject
+{
+ at private
+    id _dataSourcePrivate;
+}
+
+ at end
+#endif
+
diff --git a/WebKit/WebView.subproj/NSWebPageDataSourcePrivate.h b/WebKit/WebView.subproj/NSWebPageDataSourcePrivate.h
index 4a8b733..6fb209e 100644
--- a/WebKit/WebView.subproj/NSWebPageDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/NSWebPageDataSourcePrivate.h
@@ -11,4 +11,6 @@
 {
 }
 
- at end
\ No newline at end of file
+
+ at end
+
diff --git a/WebKit/WebView.subproj/NSWebPageView.h b/WebKit/WebView.subproj/NSWebPageView.h
index dec8fce..76f5f95 100644
--- a/WebKit/WebView.subproj/NSWebPageView.h
+++ b/WebKit/WebView.subproj/NSWebPageView.h
@@ -7,14 +7,161 @@
 
 #import <WebKit/NSWebPageDataSource.h>
 
- at interface NSWebPageView : NSView
+#ifdef READY_FOR_PRIMETIME
+/*
+    Typical usage of an WKWebPageView.
+    
+    NSURL *url = [NSURL URLWithString: @"http://www.apple.com"];
+    ...
+    WKWebPageDataSource *dataSource = [[WKWebPageDataSource alloc] initWithURL: url];
+    WKWebPageView *view = [[WKWebPageView alloc] initWithFrame: myFrame];
+    [view setClient: (WKWebClient *)myClient];
+    [view setDataSource: dataSource];
+    [[view dataSource] startLoading];
+    ...
+    or
+    ...
+    WKWebPageDataSource *dataSource = [[WKWebPageDataSource alloc] initWithURL: url];
+    WKWebPageView *view = [[WKWebPageView alloc] initWithFrame: myFrame DataSource: url];
+    [view setClient: (WKWebClient *)myClient];
+    [[view dataSource] startLoading];
+    ...
+    or
+    ...
+    WKWebPageView *view = [[WKWebPageView alloc] initWithFrame: myFrame url: url];
+    [view setClient: (WKWebClient *)myClient];
+    [[view dataSource] startLoading];
+    
+    What is the behaviour of the view after it has been initialized and -startLoading is called?
+    
+        1.  When the data source is set during (i.e. -setDataSource:) -locationWillChange will be sent
+            to the view's client.  It may veto by returning NO.  Note that if the convience initializers
+            are used no client will have been set, and thus no chance to veto will be provided.
+            
+        2.  The view will do nothing until receipt of it's first -receivedDataForURL: message
+            from it's data source.  Thus the view will not change it's content before users have
+            a chance to cancel slow URLs.  
+                        
+            During this time, if -stopLoading is called on the data source, loading will 
+            abort.  If the loading is stopped the contents of the window will be unchanged.
+            [This implies that the data source should revert to the previous data source.
+            Will that be problematic?.]  The client will receive a -loadingCancelled message
+            if the load is aborted during this period.
+            
+            Client should initiate progress indicators at this point (how?).
+            
+        
+        3.  After receipt of it first -receivedDataForURL: it will clear it's contents
+            and perform it's first layout.  At this point a loadingStarted message will
+            be sent to the client.
+            
+        4.  Upon every subsequent receipts of -finishedReceivingDataForURL: messages it
+            will perform additional layouts.  Note that these may be coalesced, depending
+            on the interval the messages are received.  During this time the load may
+            be stopped.  The layout may be incomplete if the load is stopped before all
+            the referenced documents are loaded.  If the layout is stopped during this
+            period the client will received a -loadingStopped message.
+            
+        5.  When -documentReceived is received the loading and initial layout is complete.
+            Clients should terminate progress indicators at this point.  At this point
+            clients will receive a -loadingFinished message.
+
+    What is the behavior of the view when a link is clicked?
+    
+        0.  See above.  The behavior is exactly as above.  
+        
+        
+   ***
+  
+   The control behavior and view/model interdependencies of a WK is manifested by several 
+   protocols (so far: WKWebDataSourceClient, WKScriptContext, WKFrameSetManagement).  This 
+   behavior could be encapsulated in a WKController class, or it could be implemented by the 
+   WKWebView.
+*/
+ at interface NSWebPageView : NSView <WKWebDataSourceClient, WKScriptContext, WKFrameSetManagement>
 {
 @private
     id _viewPrivate;
 }
 
+- initWithFrame: (NSRect)frame;
 - initWithFrame: (NSRect)frame dataSource: (NSWebPageDataSource *)dataSource;
+- initWithFrame: (NSRect)frame url: (NSURL *)url;
 
 - (NSWebPageDataSource *)dataSource;
+- (void)setDataSource: (NSWebPageDataSource *)ds;
+
+// Either creates a new datasource or reuses the same datasource for
+// URLs that are qualified, i.e. URLs with an anchor target.
+- (BOOL)setURL: (NSURL *)url;
+
+// This method should not be public until we have a more completely
+// understood way to subclass WKWebView.
+- (void)layout;
+
+- (void)stopAnimations;
+
+// Font API
+- (void)setFontSizes: (NSArray *)sizes;
+- (NSArray *)fontSize;
+- (void)resetFontSizes;
+- (void)setStandardFont: (NSSFont *)font;
+- (NSFont *)standardFont;
+- (void)setFixedFont: (NSSFont *)font;
+- (NSFont *)fixedFont;
+
+// Drag and drop links and images.  Others?
+- (void)setDragFromEnabled: (BOOL)flag;
+- (BOOL)dragFromEnabled;
+
+- (void)setDragToEnabled: (BOOL)flag;
+- (BOOL)dragToEnabled;
+
+- (void)setClient: (WKWebViewClient *)client;
+
+// MCJ thinks we need high level find API.
+ at end
+
+
+ at protocol WKWebViewClient
+- (BOOL)locationWillChange;
+- (void)loadingCancelled;
+- (void)loadingStopped;
+- (void)loadingFinished;
+- (void)loadingStarted;
+
+// These reflect the WKWebDataSourceClient protocol
+- (void)receivedDataForURL: (NSURL *)url;
+- (void)finishedReceivingDataForURL: (NSURL *)url;
+- documentReceived;
+
+ at end
+
+/*
+    Other areas still to consider:
+
+		tool tips for ALT image text and link URLs
+		
+		node events
+		
+		context menus
+
+		client access to form elements
+		   for auto-completion, passwords
+
+		authentication dialog
+
+		authentication/security state (is page secure)
+*/
+
+
+
+#else
+ at interface NSWebPageView : NSView 
+{
+ at private
+    id _viewPrivate;
+}
+ at end
+#endif
 
- at end
\ No newline at end of file

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list