public DomElement(WebDocument ownerDoc, int nodePrefixNameIndex, int nodeLocalNameIndex) : base(ownerDoc) { this.nodePrefixNameIndex = nodePrefixNameIndex; this.nodeLocalNameIndex = nodeLocalNameIndex; SetNodeType(HtmlNodeType.OpenElement); }
internal DomNode(WebDocument ownerDoc) { this.ownerDoc = ownerDoc; #if DEBUG this.dbugId = dbugTotalId; dbugTotalId++; #endif }
public DomAttribute(WebDocument ownerDoc, int nodePrefixNameIndex, int nodeLocalNameIndex) : base(ownerDoc) { SetNodeType(HtmlNodeType.Attribute); this.nodePrefixNameIndex = nodePrefixNameIndex; this.nodeLocalNameIndex = nodeLocalNameIndex; }
internal DomNode(WebDocument ownerDoc) { _ownerDoc = ownerDoc; #if DEBUG this.dbugId = dbugTotalId; dbugTotalId++; //if (this.dbugId == 69) //{ //} #endif }
public void LoadHtmlDom(LayoutFarm.WebDom.WebDocument doc, string defaultCss) { _baseRawCssData = defaultCss; _baseCssData = LayoutFarm.WebDom.Parser.CssParserHelper.ParseStyleSheet(defaultCss, CssDefaults.DefaultCssData, true); //----------------- htmlContainer.WebDocument = (this.currentDoc = doc); BuildCssBoxTree(htmlContainer, _baseCssData); //--------------------- PerformLayout(); Invalidate(); }
void SetHtml(LayoutFarm.HtmlBoxes.MyHtmlContainer htmlContainer, string html, CssActiveSheet cssData) { //----------------------------------------------------------------- var htmldoc = this.currentDoc = LayoutFarm.Composers.WebDocumentParser.ParseDocument( new WebDom.Parser.TextSource(html.ToCharArray())); //build rootbox from htmldoc var rootBox = this.htmlhost.GetRenderTreeBuilder().BuildCssRenderTree(htmldoc, cssData, null); htmlContainer.WebDocument = htmldoc; htmlContainer.RootCssBox = rootBox; }
public DomTextNode(WebDocument ownerDoc, char[] copyBuffer) : base(ownerDoc) { SetNodeType(HtmlNodeType.TextNode); this.copyBuffer = copyBuffer; }
internal DomComment(WebDocument ownerDoc) : base(ownerDoc) { SetNodeType(HtmlNodeType.Comment); }
internal DomCDataNode(WebDocument ownerDoc) : base(ownerDoc) { SetNodeType(HtmlNodeType.CData); }
internal DomProcessInstructionNode(WebDocument ownerDoc, int procName) : base(ownerDoc) { this.procName = procName; SetNodeType(HtmlNodeType.ProcessInstruction); }
public DomDocumentNode(WebDocument ownerDoc) : base(ownerDoc) { SetNodeType(HtmlNodeType.DocumentNode); }
public CssBox BuildCssRenderTree(WebDocument webdoc, CssActiveSheet cssActiveSheet, RenderElement containerElement) { HtmlDocument htmldoc = webdoc as HtmlDocument; if (htmldoc == null) { //TODO: fixed here throw new NotSupportedException(); } htmldoc.CssActiveSheet = cssActiveSheet; htmldoc.SetDocumentState(DocumentState.Building); //---------------------------------------------------------------- TopDownActiveCssTemplate activeTemplate = new TopDownActiveCssTemplate(cssActiveSheet); PrepareStylesAndContentOfChildNodes((HtmlElement)htmldoc.RootNode, activeTemplate); //---------------------------------------------------------------- RootGraphic rootgfx = (containerElement != null) ? containerElement.Root : null; //TODO: review here, we should create cssbox at document.body? CssBox bridgeBox = HtmlHost.CreateBridgeBox(TextServices.IFonts, containerElement, rootgfx); ((HtmlElement)htmldoc.RootNode).SetPrincipalBox(bridgeBox); htmlHost.UpdateChildBoxes((HtmlRootElement)htmldoc.RootNode, true); htmldoc.SetDocumentState(DocumentState.Idle); //---------------------------------------------------------------- //SetTextSelectionStyle(htmlCont, cssData); return bridgeBox; }
//------------------------------------------- public DomElement(WebDocument ownerDoc, int nodePrefixNameIndex, int nodeLocalNameIndex) : base(ownerDoc) { _nodeNameIndex = (nodePrefixNameIndex << 16) | nodeLocalNameIndex; SetNodeType(HtmlNodeKind.OpenElement); }
public void ForceRefreshHtmlDomChange(LayoutFarm.WebDom.WebDocument doc) { //RefreshHtmlDomChange(_baseCssData); myHtmlContainer_NeedUpdateDom(this, EventArgs.Empty); this.PaintMe(); }
public HtmlTextNode(WebDocument ownerDoc, char[] buffer) : base(ownerDoc, buffer) { }