internal GeckoDomDocument(mozIDOMWindowProxy window, nsIDOMDocument document)
     : base(window, document)
 {
     _domDocument          = document;
     _document             = new Lazy <Document>(() => new WebIDL.Document((mozIDOMWindowProxy)window, (nsISupports)document));
     _documentOrShadowRoot = new Lazy <DocumentOrShadowRoot>(() => new WebIDL.DocumentOrShadowRoot((mozIDOMWindowProxy)window, (nsISupports)document));
 }
Ejemplo n.º 2
0
		public Document (WebBrowser control, nsIDOMDocument document)
			: base (control, document)
		{
			if (control.platform != control.enginePlatform)
				this.node = nsDOMDocument.GetProxy (control, document);
			else
				this.node = document;
		}
Ejemplo n.º 3
0
		protected override void Dispose (bool disposing)
		{
			if (!disposed) {
				if (disposing) {
					this.resources.Clear ();
					this.node = null;
				}
			}
			base.Dispose (disposing);
		}
Ejemplo n.º 4
0
        public static GeckoDomDocument CreateDomDocumentWraper(nsIDOMDocument domDocument)
        {
            var htmlDocument = Xpcom.QueryInterface <nsIDOMHTMLDocument>(domDocument);

            if (htmlDocument != null)
            {
                Marshal.ReleaseComObject(htmlDocument);
                return(new GeckoDocument((nsIDOMHTMLDocument)domDocument));
            }
            return(new GeckoDomDocument(domDocument));
        }
Ejemplo n.º 5
0
 protected override void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             this.resources.Clear();
             this.node = null;
         }
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Calculate RCW counter for browser Document
        /// </summary>
        /// <param name="browser"></param>
        /// <returns></returns>
        private int GetDocumentRefCount(GeckoWebBrowser browser)
        {
            int            ret    = 0;
            nsIDOMDocument domDoc = null;

            using (var doc = browser.DomDocument)
            {
                domDoc = Xpcom.QueryInterface <nsIDOMDocument>(doc.NativeDomDocument);
            }
            ret = Marshal.ReleaseComObject(domDoc);
            return(ret);
        }
Ejemplo n.º 7
0
 public Document(WebBrowser control, nsIDOMDocument document)
     : base(control, document)
 {
     if (control.platform != control.enginePlatform)
     {
         this.node = nsDOMDocument.GetProxy(control, document);
     }
     else
     {
         this.node = document;
     }
 }
Ejemplo n.º 8
0
		public PropertiesDialog(nsIDOMDocument doc) : this()
		{
			txtTitle.Text = nsString.Get(doc.GetTitleAttribute);

			txtAddress.Text = nsString.Get(doc.GetDocumentURIAttribute);
			txtReferrer.Text = nsString.Get(doc.GetReferrerAttribute);

			nsIDOMDocumentType docType = doc.GetDoctypeAttribute();
			if (docType != null)
				lblDocType.Text = nsString.Get(docType.GetPublicIdAttribute);
			else
				lblDocType.Text = "(none)";
		}
Ejemplo n.º 9
0
        public PropertiesDialog(nsIDOMDocument doc) : this()
        {
            //txtTitle.Text = nsString.Get(doc.GetTitleAttribute);

            //txtAddress.Text = nsString.Get(doc.GetDocumentURIAttribute);
            //txtReferrer.Text = nsString.Get(doc.GetReferrerAttribute);

            //nsIDOMDocumentType docType = doc.GetDoctypeAttribute();
            //if (docType != null)
            //    lblDocType.Text = nsString.Get(docType.GetPublicIdAttribute);
            //else
            //    lblDocType.Text = "(none)";
            throw new NotImplementedException();
        }
Ejemplo n.º 10
0
        public PropertiesDialog(nsIDOMDocument doc) : this()
        {
            txtTitle.Text = nsString.Get(doc.GetTitleAttribute);

            txtAddress.Text  = nsString.Get(doc.GetDocumentURIAttribute);
            txtReferrer.Text = nsString.Get(doc.GetReferrerAttribute);

            nsIDOMDocumentType docType = doc.GetDoctypeAttribute();

            if (docType != null)
            {
                lblDocType.Text = nsString.Get(docType.GetPublicIdAttribute);
            }
            else
            {
                lblDocType.Text = "(none)";
            }
        }
Ejemplo n.º 11
0
 public static GeckoDomDocument CreateDomDocumentWraper(mozIDOMWindowProxy window, nsIDOMDocument domDocument)
 {
     // REVIEW: PORTFF60 - should we cache this?
     return(new GeckoDocument(window, domDocument));
 }
 public static GeckoDomDocument CreateDomDocumentWraper(nsIDOMDocument domDocument)
 {
     var htmlDocument = Xpcom.QueryInterface<nsIDOMHTMLDocument>( domDocument );
     if (htmlDocument!=null)
     {
         Marshal.ReleaseComObject( htmlDocument );
         return new GeckoDocument((nsIDOMHTMLDocument)domDocument);
     }
     var svgDocument = Xpcom.QueryInterface<nsIDOMSVGDocument>( domDocument );
     if (svgDocument != null)
     {
         Marshal.ReleaseComObject(svgDocument);
         return new SvgDocument((nsIDOMSVGDocument)domDocument);
     }
     return new GeckoDomDocument( domDocument );
 }
 internal GeckoDomDocument(nsIDOMDocument document )
     : base(document)
 {
     _domDocument = document;
 }
Ejemplo n.º 14
0
 public void Send(nsIDOMDocument data)
 {
     this.CallVoidMethod("send", data);
 }
Ejemplo n.º 15
0
		private static nsIDOMHTMLCanvasElement GetCanvas(nsIDOMDocument domDocument)
		{
			var canvas = (nsIDOMHTMLCanvasElement)domDocument.CreateElementNS("http://www.w3.org/1999/xhtml", "html:canvas");
			return canvas;
		}
Ejemplo n.º 16
0
		private DomDocument(nsIDOMDocument domDocument)
			: base(domDocument)
		{
			Debug.Assert(domDocument != null);
			m_DomDocument = domDocument;
		}
Ejemplo n.º 17
0
 internal GeckoDomDocument(nsIDOMDocument document)
     : base(document)
 {
     _domDocument = document;
 }
Ejemplo n.º 18
0
 internal GeckoDocument(mozIDOMWindowProxy window, /* nsIDOMHTMLDocument */ nsIDOMDocument document) : base(window, document)
 {
     _domHtmlDocument = document;
     _htmlDocument    = new Lazy <HTMLDocument>(() => new HTMLDocument(Window, (nsISupports)_domHtmlDocument));
 }
Ejemplo n.º 19
0
		private static WebBrowser GetBrowserFromDomDocument(nsIDOMDocument domDocument)
		{
			if (domDocument != null)
			{
				var documentView = (nsIDOMDocumentView)domDocument;
				var domWindow = (nsIDOMWindow)documentView.DefaultView;
				return GetBrowserFromDomWindow(domWindow);
			}
			return null;
		}
Ejemplo n.º 20
0
 internal static GeckoDocument Create(mozIDOMWindowProxy window, /* nsIDOMHTMLDocument */ nsIDOMDocument document)
 {
     return(document == null ? null : new GeckoDocument(window, document));
 }
Ejemplo n.º 21
0
		public static nsIDOMDocument GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMDocument obj)
		{
			object o = Base.GetProxyForObject (control, typeof(nsIDOMDocument).GUID, obj);
			return o as nsIDOMDocument;
		}
Ejemplo n.º 22
0
 public nsISupports TransformToFragment(nsIDOMNode source, nsIDOMDocument output)
 {
     return(this.CallMethod <nsISupports>("transformToFragment", source, output));
 }
Ejemplo n.º 23
0
        public static nsIDOMDocument GetProxy(Mono.WebBrowser.IWebBrowser control, nsIDOMDocument obj)
        {
            object o = Base.GetProxyForObject(control, typeof(nsIDOMDocument).GUID, obj);

            return(o as nsIDOMDocument);
        }
Ejemplo n.º 24
0
		internal static DomDocument Create(nsIDOMDocument domDocument)
		{
			return domDocument != null ? new DomDocument(domDocument) : null;
		}