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

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

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

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