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)); }
public Document (WebBrowser control, nsIDOMDocument document) : base (control, document) { if (control.platform != control.enginePlatform) this.node = nsDOMDocument.GetProxy (control, document); else this.node = document; }
protected override void Dispose (bool disposing) { if (!disposed) { if (disposing) { this.resources.Clear (); this.node = null; } } base.Dispose (disposing); }
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)); }
protected override void Dispose(bool disposing) { if (!disposed) { if (disposing) { this.resources.Clear(); this.node = null; } } base.Dispose(disposing); }
/// <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); }
public Document(WebBrowser control, nsIDOMDocument document) : base(control, document) { if (control.platform != control.enginePlatform) { this.node = nsDOMDocument.GetProxy(control, document); } else { this.node = document; } }
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)"; }
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(); }
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)"; } }
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; }
public void Send(nsIDOMDocument data) { this.CallVoidMethod("send", data); }
private static nsIDOMHTMLCanvasElement GetCanvas(nsIDOMDocument domDocument) { var canvas = (nsIDOMHTMLCanvasElement)domDocument.CreateElementNS("http://www.w3.org/1999/xhtml", "html:canvas"); return canvas; }
private DomDocument(nsIDOMDocument domDocument) : base(domDocument) { Debug.Assert(domDocument != null); m_DomDocument = domDocument; }
internal GeckoDomDocument(nsIDOMDocument document) : base(document) { _domDocument = document; }
internal GeckoDocument(mozIDOMWindowProxy window, /* nsIDOMHTMLDocument */ nsIDOMDocument document) : base(window, document) { _domHtmlDocument = document; _htmlDocument = new Lazy <HTMLDocument>(() => new HTMLDocument(Window, (nsISupports)_domHtmlDocument)); }
private static WebBrowser GetBrowserFromDomDocument(nsIDOMDocument domDocument) { if (domDocument != null) { var documentView = (nsIDOMDocumentView)domDocument; var domWindow = (nsIDOMWindow)documentView.DefaultView; return GetBrowserFromDomWindow(domWindow); } return null; }
internal static GeckoDocument Create(mozIDOMWindowProxy window, /* nsIDOMHTMLDocument */ nsIDOMDocument document) { return(document == null ? null : new GeckoDocument(window, document)); }
public static nsIDOMDocument GetProxy (Mono.WebBrowser.IWebBrowser control, nsIDOMDocument obj) { object o = Base.GetProxyForObject (control, typeof(nsIDOMDocument).GUID, obj); return o as nsIDOMDocument; }
public nsISupports TransformToFragment(nsIDOMNode source, nsIDOMDocument output) { return(this.CallMethod <nsISupports>("transformToFragment", source, output)); }
public static nsIDOMDocument GetProxy(Mono.WebBrowser.IWebBrowser control, nsIDOMDocument obj) { object o = Base.GetProxyForObject(control, typeof(nsIDOMDocument).GUID, obj); return(o as nsIDOMDocument); }
internal static DomDocument Create(nsIDOMDocument domDocument) { return domDocument != null ? new DomDocument(domDocument) : null; }