* Mono.Mozilla/WebBrowser.cs: fix Document accessor
[mono.git] / mcs / class / Mono.Mozilla / ChangeLog
1 2008-01-21  Andreia Gaita <avidigal@novell.com>
2
3         * Mono.Mozilla/WebBrowser.cs: fix Document accessor
4
5 2008-01-14  Andreia Gaita <avidigal@novell.com>
6
7         * Mono.Mozilla.dll.sources, Mono.Mozilla2K5.csproj: Updated.
8         
9         * build-csproj2k5: Fix guid.
10
11         * Mono.Mozilla/DOM/*, Mono.WebBrowser/DOM/*:
12           - Reorganization to get rid of unneeded DOM prefix.
13           - All constructors now get a proxy only if the application is running under
14             a different toolkit than the mozilla engine. If they match, no proxies are
15             needed since there is no need to switch threads.
16         
17         * Mono.Mozilla/DOM/DOMObject.cs:
18           - Move resources list to here since most objects need one.
19           - WebBrowser now has some internal methods, so store the class instead of the
20             interface for child classes to use.
21         
22         * Mono.Mozilla/DOM/HTMLElement.cs, Mono.Mozilla/DOM/Element.cs: 
23           IElement represents all element types (html or not), and is implemented
24           by two classes, one that wraps html elements, and another that wraps other 
25           element types. IElement represents both in the public API so it's easier 
26           to deal with for the api user.
27         
28         * Mono.Mozilla/DOM/Attribute.cs, 
29           Mono.Mozilla/DOM/AttributeCollection.cs,
30           Mono.WebBrowser/DOM/IAttributeCollection.cs,
31           Mono.WebBrowser/DOM/IAttribute.cs:
32           Added. Represent attributes from an element.
33           
34         * Mono.Mozilla/DOM/Document.cs, Mono.WebBrowser/DOM/IDocument.cs: 
35           - renamed from DOMHTMLDocument and IDOMHTMLDocument, respectively
36           - Added GetElementsByTagName method.
37           - Document is now retrieved from the WebNavigation interface, so get a proxy for
38             it in the constructor.
39           - Add an internal method that returns the unmanaged resource, the Element.InnerText
40             property needs to use it.
41         
42         * Mono.Mozilla/DOM/Element.cs, Mono.WebBrowser/DOM/IElement.cs: 
43           - renamed from DOMElement and IDOMElement, respectively
44           - Added the following properties: InnerText, InnerHTML, All (returns all child
45             elements), HasAttribute, GetAttribute. InnerHTML is virtual, and is implemented
46             in HTMLElement.
47
48         * Mono.Mozilla/DOM/HTMLElement.cs: Implement InnerHTML property. 
49
50         * Mono.Mozilla/DOM/HTMLElementCollection.cs: Added. Subclass of NodeList that
51           represents a list of html elements.
52
53         * Mono.Mozilla/DOM/Navigation.cs: Added a Document property that uses the 
54           nsIWebNavigation interface to access the Document directly instead of going 
55           through gluezilla.
56           
57         * Mono.Mozilla/DOM/Node.cs, Mono.WebBrowser/DOM/INode.cs: Renamed from 
58           DOMNode and IDOMNode, respectively. Added the following properties:
59           - Attributes (returns the attributes of a node)
60           - ChildNodes
61           - Type (returns the type of a node, i.e., Element, Attribute, etc)
62           - FirstChild
63           - LocalName
64           Added public enumeration to determine a node type.
65
66         * Mono.Mozilla/DOM/NodeList.cs, Mono.WebBrowser/DOM/INodeList.cs: Renamed
67           from DOMNodeList and IDOMNodeList, respectively. Allow subclasses to fill in and 
68           access the collection of nodes, as well as override the loading method.
69          
70         * Mono.Mozilla/interfaces/extras/NodeType.cs: Added. Represents the various 
71           types of a Node (element, attribute, etc).
72         
73         * Mono.WebBrowser/DOM/IDOMHTMLElement.cs: Removed. Merged with IElement.
74         
75         * Mono.Mozilla/Base.cs: Add support for tracking which toolkit the 
76           application is running under, so I know if I need to create threads and 
77           proxies or not. Send that info to gluezilla, and get back which toolkit
78           the mozilla engine is using.
79           
80         * Mono.Mozilla/WebBrowser.cs: Save the application and engine toolkit info.
81           Change the Document accessor so it goes through the Navigation object instead
82           of thru gluezilla.
83
84 2008-01-14  Andreia Gaita <avidigal@novell.com>
85
86         * Mono.Mozilla/interfaces/nsIDOMNSHTMLElement.cs: Added. Interface to
87         access the InnerHtml property of an element.
88
89 2008-01-09  Andreia Gaita <avidigal@novell.com>\r
90 \r
91         * Mono.Mozilla/Base.cs, 
92           Mono.Mozilla/WebBrowser.cs, 
93           Mono.WebBrowser/IWebBrowser.cs,
94           Mono.WebBrowser/Manager.cs:
95           Add initial support for specifying the toolkit the application is running 
96           on (gtk or winforms). Knowing this allows gluezilla not to initialize
97           a gtk loop if the application is already running one (and is passing 
98           gluezilla a gtk handle and not an X/HWND handle). This should make it 
99           easy to also use gluezilla/Mono.Mozilla with gtk apps.
100
101 2008-01-09  Andreia Gaita <avidigal@novell.com>\r
102 \r
103         * build-csproj2k5: take out weird characters creeping in, vstudio \r
104         doesn't appreciate them.
105
106 2008-01-07  Andreia Gaita <avidigal@novell.com>
107
108         * build-csproj2k5: Added to generate Mono.Mozilla2K5.csproj from .sources
109         * Mono.Mozilla2K5.csproj: updated
110         * Makefile: run the build-csproj2k5
111
112 2008-01-07  Andreia Gaita <avidigal@novell.com>
113
114         * Mono.Mozilla.dll.sources: Added new classes (see below).
115
116         * Mono.Mozilla/DOM/DOMObject.cs: 
117         - Store reference to the IWebBrowser control that created this (and     
118         subclassed) object. This reference needs to be used in any gluezilla calls 
119         that have to invoke methods on the mozilla ui thread (any Widget method, 
120         whose ptr reference     is stored in Base and indexed by IWebBrowser control).
121         
122         - Tweak the Dispose pattern: subclasses don't have their own private
123         dispose field to keep track of whether they've been disposed already, this
124         base class takes care of that.
125         
126         * Mono.Mozilla/DOM/DOMNode.cs:
127         - Initialize a proxy to the nsI object that this wrapper encapsulates.
128         - Cache all objects returned from this object in an hashtable, so that 
129                 1) we can keep track of all objects and release them earlier and 
130                 properly
131                 2) we don't have to keep creating new objects everytime we get requests 
132                 for read-only stuff 
133         - Implement FirstChild and LocalName
134         - Add Dispose pattern
135
136         * Mono.Mozilla/DOM/DOMHTMLElement.cs: 
137         - Change the inheritance to DOMElement.
138         - Change the constructor to send the nsI object and IWebBrowser up the tree.
139         - Get a proxy to the nsI object.
140         - Add dispose pattern.
141         
142         * Mono.Mozilla/DOM/DOMHTMLDocument.cs: 
143         - Change the constructor to send the IWebBrowser instance up the tree.
144         - Add resources hashtable to keep track of already-fetched objects. 
145         Particularly useful here since getElementById can be called n times, so it
146         would be complicated to keep track and dispose properly of all the objects.
147         - Implement DocumentElement
148         - Change Body and GetElementById to use resources cache
149         - Fix GetElementById case
150
151         * Mono.Mozilla/DOM/DOMElement.cs: Added. Inherits from DOMNode, so the 
152         parent class also keeps track of the nsI object.
153         * Mono.Mozilla/DOM/DOMNodeList.cs: Added to support easy iteration of nodes.
154         * Mono.Mozilla/DOM/Navigation.cs: Tweak dispose pattern and constructor to
155         the new model.
156
157         * Mono.Mozilla/WebBrowser.cs: Fix the DOMHTMLDocument creation. 
158         
159         * Mono.WebBrowser/DOM/IDOMHTMLDocument.cs: Fix case on GetElementById, add
160         DocumentElement property.
161
162         * Mono.WebBrowser/DOM/IDOMNodeList.cs, 
163           Mono.WebBrowser/DOM/IDOMElement.cs:
164         Added, no external functionality for now.
165         
166 2008-01-07  Andreia Gaita <avidigal@novell.com>
167
168         * Mono.Mozilla/DOM/Navigation.cs: Fix calls to the nsIWebNavigation
169         interface (case change from being generated through xpidl2cs. that's what
170         I get for merging in batches :/ )
171
172 2008-01-07  Andreia Gaita <avidigal@novell.com>
173
174         * Mono.Mozilla/Base.cs: Add GetProxyForObject method to create proxies
175         for mozilla objects.
176         Remove trace listener.
177
178 2008-01-07  Andreia Gaita <avidigal@novell.com>
179
180         * Mono.Mozilla/interfaces/nsIDOMRange.cs,
181           Mono.Mozilla/interfaces/nsIDOMDocumentRange.cs:
182         Added to get the content of elements. 
183
184         * Mono.Mozilla/interfaces/*.cs: Regenerated with the xpidl2cs.pl script.
185         Add helper class to create a proxy for all native mozilla interfaces. 
186
187         * Mono.Mozilla/interfaces/extras/: classes for the mozilla interfaces that 
188         don't get generated automatically, like enums, delegates, etc.
189
190         * Mono.Mozilla/interfaces/extras/nsIWriteSegmentFun.cs: 
191         Delegate callback for a writer function for mozilla     streams 
192         (nsIInputStream.readSegments)
193         
194         * Mono.Mozilla/interfaces/extras/Options.cs: Enum for nsIWebNavigation.stop
195
196 2007-12-25  Andreia Gaita  <avidigal@novell.com>
197
198         * Mono.Mozilla/DOM/DOMHTMLDocument.cs,
199           Mono.Mozilla/DOM/DOMObject.cs
200           Mono.Mozilla/DOM/Navigation.cs:
201           
202         Properly dispose unmanaged resources.
203         Use native mozilla dom interfaces through com directly instead
204         of going through the glue, as they are now proxies that invoke
205         the methods on the main mozilla ui properly (avoiding threading problems).
206         Check if library was properly initialized.
207         Add Go method - implements navigation
208         directly through COM instead of going through the glue.
209         
210         * Mono.Mozilla/interfaces/nsIWebNavigation.cs: Use typed flags instead of
211         generic uint32. Remove comments about threading (as it is now safe to use
212         this interface)
213
214         * Mono.Mozilla/Base.cs: Return bool on initialization so I can track if
215         library was properly initialized from the interfaces that go directly 
216         through COM and not through the glue
217
218         * Mono.Mozilla/WebBrowser.cs: Save initialization result so interfaces
219         don't get called if the library was not initialized.
220
221 2007-11-08  Andreia Gaita  <avidigal@novell.com>
222
223         * Mono.Mozilla.csproj, Mono.Mozilla2K5.csproj: Synch with .sources
224
225 2007-11-08  Andreia Gaita  <avidigal@novell.com>
226
227         * Mono.Mozilla.dll.sources,
228           Mono.Mozilla/DOM/Navigation.cs,
229           Mono.Mozilla/interfaces/nsIHistoryEntry.cs,
230           Mono.Mozilla/interfaces/nsIInputStream.cs,
231           Mono.Mozilla/interfaces/nsISHistory.cs,
232           Mono.Mozilla/interfaces/nsISHistoryListener.cs,
233           Mono.Mozilla/interfaces/nsISimpleEnumerator.cs,
234           Mono.Mozilla/interfaces/nsIURI.cs,
235           Mono.Mozilla/interfaces/nsIWebNavigation.cs,
236           Mono.WebBrowser/DOM/INavigation.cs:
237
238         Add nsIWebNavigation interface and related 
239         dependencies to access navigation-related properties directly (CanGoBack, etc). 
240         Add INavigation interface and implementation to expose navigation properties. 
241         Navigation is now done through this interface (Reload(), Stop(), etc).
242         
243         Please note: Due to threading issues on linux (namely, mozilla being run 
244         on a different thread), only methods that do not affect drawing can be 
245         invoked through the interfaces, so although Reload is now called from 
246         the INavigation interface, it is still being routed through the Base 
247         class and the glue code (and not through the nsIWebNavigation.Reload 
248         call, as are other non-drawing-affecting methods like GetTitle).
249
250         * Mono.Mozilla/ICallback.cs, Callback.cs: Remove unneeded events, adjust parameters, 
251         add support enumeration for tracking loading state.
252
253         * Mono.Mozilla/DOM/DOMHTMLDocument.cs, Mono.WebBrowser/DOM/IDOMHTMLDocument.cs: 
254         Add URL getter.
255
256         * Mono.WebBrowser/IWebBrowser.cs, Mono.Mozilla/WebBrowser.cs: 
257         Add Navigation interface getter.
258         Add Navigated event support through the StateChange and LocationChange
259         events.
260         Clean up cached objects when navigating.
261         Remove Reload, Forward, Stop, Home methods, these are now accessible 
262         through the INavigation interface.
263
264         * Mono.Mozilla/Base.cs: Add call to return the navigation interface. 
265         Add MarshalAs so that returning interfaces directly works on mono.
266
267 2007-10-31  Andreia Gaita  <avidigal@novell.com>
268
269         * Base.cs: Send (and create if needed) user dir to store local mozilla data
270
271 2007-10-30  Andreia Gaita  <avidigal@novell.com>
272
273         * Base.cs: use the blur method to signal when the webbrowser loses
274         focus
275         
276 2007-10-18 Andreia Gaita <avidigal@novell.com>
277
278         * use the newly-renamed gluezilla library
279
280 2007-10-07 Andreia Gaita <avidigal@novell.com>
281
282         * More dialog event options.
283         * Mono.Mozilla/interfaces/nsIDOM*: Added mozilla dom interfaces.
284         * Mono.WebBrowser/DOM/IDOM*: Added generic interfaces for public 
285           dom access.
286         * Mono.Mozilla/DOM/DOM*: corresponding implementations for 
287           accessing mozilla.
288         * WebBrowser.cs: moved to Mono.Mozilla, since it is a 
289           mozilla-specific implementation of the generic public
290           interface.
291
292 2007-09-23 Andreia Gaita <avidigal@novell.com>
293
294         * Added implementation of dialog popups - alert,
295         alertcheck, confirm, confirmcheck, confirmex, prompt, 
296         promptusernameandpassword, promptpassword, select.
297         Cleaned up some.
298
299 2007-09-19 Andreia Gaita <avidigal@novell.com>
300
301         * Forgot to commit an update on the xulbrowser check :/
302
303 2007-09-13 Andreia Gaita <avidigal@novell.com>
304
305         * add check for xulbrowser library, if it's not 
306         present complain then leave (don't blow up)
307         * change blur method to call deactivate (mozilla seems
308         to need it to know when it loses focus)
309         * add FocusOption enumeration for finer focus control
310
311 2007-09-12 Andreia Gaita <avidigal@novell.com>
312
313         * Base.cs, IWebBrowser.cs, WebBrowser.cs: setup shutdown routine
314
315 2007-08-11 Andreia Gaita <avidigal@novell.com>
316
317         * AssemblyInfo.cs: fix version and attributes
318
319 2007-08-10 Andreia Gaita <avidigal@novell.com>
320
321         * Reorganize sources by namespace, fix csproj
322
323 2007-08-10 Andreia Gaita <avidigal@novell.com>
324
325         * Move to main tree
326
327 2007-08-10 Andreia Gaita <avidigal@novell.com>
328
329         * Add file headers. Take out generic collections, because
330         we'll need to use this on 1.1 as well.
331
332 2007-08-09 Andreia Gaita <avidigal@novell.com>
333
334         * Change external generic interfaces to Mono.WebBrowser
335         namespace, while mozilla-specific stuff is Mono.Mozilla.
336         Encapsulate code even further with a Manager, so that
337         callers can only use what's available in the IWebBrowser
338         interface by asking for a new instance from the Manager.
339         Everything not in the IWebBrowser interface is private.
340         Navigation control, new window creation events.
341
342 2007-07-30 Andreia Gaita <avidigal@novell.com>
343
344         * Add focus and activation management
345           Add new ICallback interface to encapsulate callbacks
346           from xulbrowser. IWebBrowser has all calls and events
347           accessible from MWF.
348           Implement mouse, focus and key handlers
349
350 2007-07-21 Andreia Gaita <avidigal@novell.com>
351
352         * MozilaInvoke is now called Base, and encapsulates all the
353         pinvokes plus a list of web controls that have been loaded
354         indexed the control, with binding info (callback object and
355         IntPtr to the native xulbrowser instance.
356         WebBrowser.cs implements IWebBrowser and is the entry point
357         to the library - the WebControl api keeps a reference and 
358         calls only this.
359         Add vstudio 2005 project for 2.0 api
360
361 2007-06-25 Andreia Gaita <avidigal@novell.com>
362
363         * Callback.cs, IWebBrowser.cs, WebBrowser.cs: 
364         Change OnWidgetLoaded callback to send the new  
365         handle when it's called.
366         
367 2007-06-18      Andreia Gaita   <avidigal@novell.com>
368
369         * initial checkin.