Procházet zdrojové kódy

* winforms/webbrowser/standalone/Page.cs,
winforms/webbrowser/standalone/Main.cs: Added Style and TabIndex
accessors
* winforms/webbrowser/standalone/bin,
winforms/webbrowser/standalone/bin/test.html: Test page set up to
load by default in the app
* winforms/webbrowser/standalone/DomInspector.cs: Added Style and
TabIndex accessors in the dom menu
* mcs/class/Mono.Mozilla/Mono.Mozilla2K5.csproj,
mcs/class/Mono.Mozilla/Mono.Mozilla.dll.sources: Interfaces added
to support stylesheet getters/setters
* mcs/class/Mono.Mozilla/Mono.WebBrowser/DOM/IElement.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/DOM/Node.cs,
mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlElement.cs:
Implement Style property
* mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMMediaList.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSValue.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSStyleSheet.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSRuleList.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMStyleSheet.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSStyleDeclaration.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMViewCSS.cs,
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSRule.cs:
Added to support stylesheet getters/setters

2008-05-08 Andreia Gaita <[email protected]>

svn path=/trunk/mcs/; revision=102824

Andreia Gaita před 17 roky
rodič
revize
13aeb6c770

+ 4 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,7 @@
+2008-05-08  Andreia Gaita <[email protected]> 
+
+	* HtmlElement.cs: Implement Style property
+
 2008-05-08  Jonathan Pobst  <[email protected]>
 
 	* ListBox.cs: Respect checkboxes when measuring item size.

+ 2 - 2
mcs/class/Managed.Windows.Forms/System.Windows.Forms/HtmlElement.cs

@@ -185,8 +185,8 @@ namespace System.Windows.Forms
 
 		[MonoTODO ("Needs implementation")]
 		public string Style {
-			get { return String.Empty; }
-			set { }
+			get { return this.element.Style; }
+			set { this.element.Style = value; }
 		}
 
 		#endregion

+ 16 - 0
mcs/class/Mono.Mozilla/ChangeLog

@@ -1,3 +1,19 @@
+2008-05-08  Andreia Gaita <[email protected]> 
+
+	* Mono.Mozilla2K5.csproj, Mono.Mozilla.dll.sources: Interfaces added to
+	  support stylesheet getters/setters
+	* Mono.WebBrowser/DOM/IElement.cs, Mono.Mozilla/DOM/Node.cs: Implement
+	  Style property
+	* Mono.Mozilla/interfaces/nsIDOMMediaList.cs,
+	  Mono.Mozilla/interfaces/nsIDOMCSSValue.cs,
+	  Mono.Mozilla/interfaces/nsIDOMCSSStyleSheet.cs,
+	  Mono.Mozilla/interfaces/nsIDOMCSSRuleList.cs,
+	  Mono.Mozilla/interfaces/nsIDOMStyleSheet.cs,
+	  Mono.Mozilla/interfaces/nsIDOMCSSStyleDeclaration.cs,
+	  Mono.Mozilla/interfaces/nsIDOMViewCSS.cs,
+	  Mono.Mozilla/interfaces/nsIDOMCSSRule.cs: Added to support
+	  stylesheet getters/setters
+
 2008-05-07  Andreia Gaita <[email protected]> 
 
 	* Mono.WebBrowser/DOM/IElement.cs, Mono.Mozilla/DOM/HTMLElement.cs,

+ 8 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla.dll.sources

@@ -6,14 +6,22 @@ Mono.Mozilla/Callback.cs
 Mono.Mozilla/DOM/EventListener.cs
 Mono.Mozilla/interfaces/nsICancelable.cs
 Mono.Mozilla/interfaces/nsIChannel.cs
+Mono.Mozilla/interfaces/nsIDOMCSSRule.cs
+Mono.Mozilla/interfaces/nsIDOMCSSRuleList.cs
+Mono.Mozilla/interfaces/nsIDOMCSSStyleDeclaration.cs
+Mono.Mozilla/interfaces/nsIDOMCSSStyleSheet.cs
+Mono.Mozilla/interfaces/nsIDOMCSSValue.cs
 Mono.Mozilla/interfaces/nsIDOMDocumentEvent.cs
 Mono.Mozilla/interfaces/nsIDOMEvent.cs
 Mono.Mozilla/interfaces/nsIDOMEventListener.cs
 Mono.Mozilla/interfaces/nsIDOMEventTarget.cs
 Mono.Mozilla/interfaces/nsIDOMKeyEvent.cs
+Mono.Mozilla/interfaces/nsIDOMMediaList.cs
 Mono.Mozilla/interfaces/nsIDOMMouseEvent.cs
 Mono.Mozilla/interfaces/nsIDOMNSRange.cs
+Mono.Mozilla/interfaces/nsIDOMStyleSheet.cs
 Mono.Mozilla/interfaces/nsIDOMUIEvent.cs
+Mono.Mozilla/interfaces/nsIDOMViewCSS.cs
 Mono.Mozilla/interfaces/nsIFile.cs
 Mono.Mozilla/interfaces/nsIIOService.cs
 Mono.Mozilla/interfaces/nsILoadGroup.cs

+ 31 - 1
mcs/class/Mono.Mozilla/Mono.Mozilla/DOM/Node.cs

@@ -165,7 +165,37 @@ namespace Mono.Mozilla.DOM
 				return new Document (control, doc as Mono.Mozilla.nsIDOMHTMLDocument);
 			}
 		}
-
+
+		public string Style {
+			get {				
+				nsIDOMDocument doc;
+				this.node.getOwnerDocument (out doc);
+				nsIDOMDocumentView docView = (nsIDOMDocumentView) doc;
+				nsIDOMAbstractView abstractView;
+				docView.getDefaultView (out abstractView);
+				nsIDOMViewCSS viewCss = (nsIDOMViewCSS)abstractView;
+				Base.StringSet (storage, String.Empty);
+				nsIDOMCSSStyleDeclaration styleDecl;
+				AsciiString s = new Mono.Mozilla.AsciiString(String.Empty);
+				viewCss.getComputedStyle (this.node as Mono.Mozilla.nsIDOMElement, s.Handle, out styleDecl);
+				styleDecl.getCssText (storage);
+				return Base.StringGet (storage);
+			}
+			set {
+				nsIDOMDocument doc;
+				this.node.getOwnerDocument (out doc);
+				nsIDOMDocumentView docView = (nsIDOMDocumentView) doc;
+				nsIDOMAbstractView abstractView;
+				docView.getDefaultView (out abstractView);
+				nsIDOMViewCSS viewCss = (nsIDOMViewCSS)abstractView;
+				Base.StringSet (storage, String.Empty);
+				nsIDOMCSSStyleDeclaration styleDecl;
+				viewCss.getComputedStyle (this.node as Mono.Mozilla.nsIDOMElement, storage, out styleDecl);
+				Base.StringSet (storage, value);
+				styleDecl.setCssText (storage);				
+			}
+		}
+		
 		public virtual Mono.WebBrowser.DOM.NodeType Type {
 			get {
 				ushort type;

+ 72 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSRule.cs

@@ -0,0 +1,72 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("a6cf90c1-15b3-11d2-932e-00805f8add32")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMCSSRule {
+
+#region nsIDOMCSSRule
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getType ( out ushort ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getCssText (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setCssText ( /*DOMString*/ HandleRef value);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getParentStyleSheet ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSStyleSheet ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getParentRule ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSRule ret);
+
+#endregion
+	}
+
+
+	internal class nsDOMCSSRule {
+		public static nsIDOMCSSRule GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMCSSRule obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMCSSRule).GUID, obj);
+			return o as nsIDOMCSSRule;
+		}
+	}
+}

+ 61 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSRuleList.cs

@@ -0,0 +1,61 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("a6cf90c0-15b3-11d2-932e-00805f8add32")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMCSSRuleList {
+
+#region nsIDOMCSSRuleList
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getLength ( out uint ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int item (
+				   uint index,[MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSRule ret);
+
+#endregion
+	}
+
+
+	internal class nsDOMCSSRuleList {
+		public static nsIDOMCSSRuleList GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMCSSRuleList obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMCSSRuleList).GUID, obj);
+			return o as nsIDOMCSSRuleList;
+		}
+	}
+}

+ 100 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSStyleDeclaration.cs

@@ -0,0 +1,100 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("a6cf90be-15b3-11d2-932e-00805f8add32")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMCSSStyleDeclaration {
+
+#region nsIDOMCSSStyleDeclaration
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getCssText (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setCssText ( /*DOMString*/ HandleRef value);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getPropertyValue (
+				   /*DOMString*/ HandleRef propertyName,  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getPropertyCSSValue (
+				   /*DOMString*/ HandleRef propertyName,[MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSValue ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int removeProperty (
+				   /*DOMString*/ HandleRef propertyName,  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getPropertyPriority (
+				   /*DOMString*/ HandleRef propertyName,  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setProperty (
+				   /*DOMString*/ HandleRef propertyName,
+				   /*DOMString*/ HandleRef value,
+				   /*DOMString*/ HandleRef priority);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getLength ( out uint ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int item (
+				   uint index,  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getParentRule ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSRule ret);
+
+#endregion
+	}
+
+
+	internal class nsDOMCSSStyleDeclaration {
+		public static nsIDOMCSSStyleDeclaration GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMCSSStyleDeclaration obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMCSSStyleDeclaration).GUID, obj);
+			return o as nsIDOMCSSStyleDeclaration;
+		}
+	}
+}

+ 105 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSStyleSheet.cs

@@ -0,0 +1,105 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("a6cf90c2-15b3-11d2-932e-00805f8add32")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet {
+#region nsIDOMStyleSheet
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getType (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getDisabled ( out bool ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setDisabled ( bool value);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getOwnerNode ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMNode ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getParentStyleSheet ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMStyleSheet ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getHref (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getTitle (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getMedia ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMMediaList ret);
+
+#endregion
+
+#region nsIDOMCSSStyleSheet
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getOwnerRule ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSRule ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getCssRules ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSRuleList ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int insertRule (
+				   /*DOMString*/ HandleRef rule,
+				   uint index, out uint ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int deleteRule (
+				   uint index);
+
+#endregion
+	}
+
+
+	internal class nsDOMCSSStyleSheet {
+		public static nsIDOMCSSStyleSheet GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMCSSStyleSheet obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMCSSStyleSheet).GUID, obj);
+			return o as nsIDOMCSSStyleSheet;
+		}
+	}
+}

+ 64 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMCSSValue.cs

@@ -0,0 +1,64 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("009f7ea5-9e80-41be-b008-db62f10823f2")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMCSSValue {
+
+#region nsIDOMCSSValue
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getCssText (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setCssText ( /*DOMString*/ HandleRef value);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getCssValueType ( out ushort ret);
+
+#endregion
+	}
+
+
+	internal class nsDOMCSSValue {
+		public static nsIDOMCSSValue GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMCSSValue obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMCSSValue).GUID, obj);
+			return o as nsIDOMCSSValue;
+		}
+	}
+}

+ 79 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMMediaList.cs

@@ -0,0 +1,79 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("9b0c2ed7-111c-4824-adf9-ef0da6dad371")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMMediaList {
+
+#region nsIDOMMediaList
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getMediaText (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setMediaText ( /*DOMString*/ HandleRef value);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getLength ( out uint ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int item (
+				   uint index,  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int deleteMedium (
+				   /*DOMString*/ HandleRef oldMedium);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int appendMedium (
+				   /*DOMString*/ HandleRef newMedium);
+
+#endregion
+	}
+
+
+	internal class nsDOMMediaList {
+		public static nsIDOMMediaList GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMMediaList obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMMediaList).GUID, obj);
+			return o as nsIDOMMediaList;
+		}
+	}
+}

+ 84 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMStyleSheet.cs

@@ -0,0 +1,84 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("a6cf9080-15b3-11d2-932e-00805f8add32")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMStyleSheet {
+
+#region nsIDOMStyleSheet
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getType (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getDisabled ( out bool ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int setDisabled ( bool value);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getOwnerNode ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMNode ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getParentStyleSheet ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMStyleSheet ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getHref (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getTitle (  /*DOMString*/ HandleRef ret);
+
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getMedia ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMMediaList ret);
+
+#endregion
+	}
+
+
+	internal class nsDOMStyleSheet {
+		public static nsIDOMStyleSheet GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMStyleSheet obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMStyleSheet).GUID, obj);
+			return o as nsIDOMStyleSheet;
+		}
+	}
+}

+ 64 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla/interfaces/nsIDOMViewCSS.cs

@@ -0,0 +1,64 @@
+// THIS FILE AUTOMATICALLY GENERATED BY xpidl2cs.pl
+// EDITING IS PROBABLY UNWISE
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2007, 2008 Novell, Inc.
+//
+// Authors:
+//	Andreia Gaita ([email protected])
+//
+
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace Mono.Mozilla {
+
+	[Guid ("0b9341f3-95d4-4fa4-adcd-e119e0db2889")]
+	[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
+	[ComImport ()]
+	internal interface nsIDOMViewCSS : nsIDOMAbstractView {
+#region nsIDOMAbstractView
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getDocument ([MarshalAs (UnmanagedType.Interface)]  out nsIDOMDocumentView ret);
+
+#endregion
+
+#region nsIDOMViewCSS
+		[PreserveSigAttribute]
+		[MethodImpl (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+		int getComputedStyle (
+				[MarshalAs (UnmanagedType.Interface)]   nsIDOMElement elt,
+				   /*DOMString*/ HandleRef pseudoElt,[MarshalAs (UnmanagedType.Interface)]  out nsIDOMCSSStyleDeclaration ret);
+
+#endregion
+	}
+
+
+	internal class nsDOMViewCSS {
+		public static nsIDOMViewCSS GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMViewCSS obj)
+		{
+			object o = Base.GetProxyForObject (control, typeof(nsIDOMViewCSS).GUID, obj);
+			return o as nsIDOMViewCSS;
+		}
+	}
+}

+ 8 - 0
mcs/class/Mono.Mozilla/Mono.Mozilla2K5.csproj

@@ -85,14 +85,22 @@
     <Compile Include="Mono.Mozilla\DOM\EventListener.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsICancelable.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIChannel.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSRule.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSRuleList.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSStyleDeclaration.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSStyleSheet.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSValue.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentEvent.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMEvent.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMEventListener.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMEventTarget.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMKeyEvent.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMMediaList.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMMouseEvent.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMNSRange.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMStyleSheet.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIDOMUIEvent.cs" />
+    <Compile Include="Mono.Mozilla\interfaces\nsIDOMViewCSS.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIFile.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsIIOService.cs" />
     <Compile Include="Mono.Mozilla\interfaces\nsILoadGroup.cs" />

+ 1 - 0
mcs/class/Mono.Mozilla/Mono.WebBrowser/DOM/IElement.cs

@@ -48,6 +48,7 @@ namespace Mono.WebBrowser.DOM
 		string 				InnerHTML { get; set; }
 		string 				OuterText { get; set; }
 		string 				OuterHTML { get; set; }
+		string 				Style { get; set; }
 		int 				TabIndex { get; set; }
 		string 				TagName { get; }
 		bool				Disabled { get; set; }