예제 #1
0
 public DomElement(WebDocument ownerDoc, int nodePrefixNameIndex, int nodeLocalNameIndex)
     : base(ownerDoc)
 {
     this.nodePrefixNameIndex = nodePrefixNameIndex;
     this.nodeLocalNameIndex  = nodeLocalNameIndex;
     SetNodeType(HtmlNodeType.OpenElement);
 }
예제 #2
0
 public DomElement(WebDocument ownerDoc, int nodePrefixNameIndex, int nodeLocalNameIndex)
     : base(ownerDoc)
 {
     this.nodePrefixNameIndex = nodePrefixNameIndex;
     this.nodeLocalNameIndex = nodeLocalNameIndex;
     SetNodeType(HtmlNodeType.OpenElement);
 }
예제 #3
0
        internal DomNode(WebDocument ownerDoc)
        {
            this.ownerDoc = ownerDoc;
#if DEBUG
            this.dbugId = dbugTotalId;
            dbugTotalId++;
#endif
        }
예제 #4
0
 public DomAttribute(WebDocument ownerDoc,
                     int nodePrefixNameIndex,
                     int nodeLocalNameIndex)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.Attribute);
     this.nodePrefixNameIndex = nodePrefixNameIndex;
     this.nodeLocalNameIndex  = nodeLocalNameIndex;
 }
예제 #5
0
        internal DomNode(WebDocument ownerDoc)
        {
            this.ownerDoc = ownerDoc;
#if DEBUG
            this.dbugId = dbugTotalId;
            dbugTotalId++;
#endif

        }
예제 #6
0
        internal DomNode(WebDocument ownerDoc)
        {
            _ownerDoc = ownerDoc;
#if DEBUG
            this.dbugId = dbugTotalId;
            dbugTotalId++;
            //if (this.dbugId == 69)
            //{

            //}
#endif
        }
예제 #7
0
 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();
 }
예제 #8
0
        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;
        }
예제 #9
0
 public DomTextNode(WebDocument ownerDoc, char[] copyBuffer)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.TextNode);
     this.copyBuffer = copyBuffer;
 }
예제 #10
0
 internal DomComment(WebDocument ownerDoc)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.Comment);
 }
예제 #11
0
 internal DomCDataNode(WebDocument ownerDoc)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.CData);
 }
예제 #12
0
 internal DomProcessInstructionNode(WebDocument ownerDoc, int procName)
     : base(ownerDoc)
 {
     this.procName = procName;
     SetNodeType(HtmlNodeType.ProcessInstruction);
 }
예제 #13
0
 internal DomProcessInstructionNode(WebDocument ownerDoc, int procName)
     : base(ownerDoc)
 {
     this.procName = procName;
     SetNodeType(HtmlNodeType.ProcessInstruction);
 }
예제 #14
0
 internal DomCDataNode(WebDocument ownerDoc)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.CData);
 }
예제 #15
0
 internal DomComment(WebDocument ownerDoc)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.Comment);
 }
예제 #16
0
 public DomDocumentNode(WebDocument ownerDoc)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.DocumentNode);
 }
예제 #17
0
        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;
        }
예제 #18
0
        //-------------------------------------------

        public DomElement(WebDocument ownerDoc, int nodePrefixNameIndex, int nodeLocalNameIndex)
            : base(ownerDoc)
        {
            _nodeNameIndex = (nodePrefixNameIndex << 16) | nodeLocalNameIndex;
            SetNodeType(HtmlNodeKind.OpenElement);
        }
예제 #19
0
 public DomDocumentNode(WebDocument ownerDoc)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.DocumentNode);
 }
예제 #20
0
 public DomAttribute(WebDocument ownerDoc,
     int nodePrefixNameIndex,
     int nodeLocalNameIndex)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.Attribute);
     this.nodePrefixNameIndex = nodePrefixNameIndex;
     this.nodeLocalNameIndex = nodeLocalNameIndex;
 }
예제 #21
0
 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();
 }
예제 #22
0
 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;
 }
예제 #23
0
 public DomTextNode(WebDocument ownerDoc, char[] copyBuffer)
     : base(ownerDoc)
 {
     SetNodeType(HtmlNodeType.TextNode);
     this.copyBuffer = copyBuffer;
 }
예제 #24
0
 public void ForceRefreshHtmlDomChange(LayoutFarm.WebDom.WebDocument doc)
 {
     //RefreshHtmlDomChange(_baseCssData);
     myHtmlContainer_NeedUpdateDom(this, EventArgs.Empty);
     this.PaintMe();
 }
예제 #25
0
 public HtmlTextNode(WebDocument ownerDoc, char[] buffer)
     : base(ownerDoc, buffer)
 {
 }