Exemplo n.º 1
0
        /// <summary>
        /// Whether the tree node matches the filter
        /// </summary>
        /// <param name="node">The tree node of type T</param>
        /// <returns>
        /// true, if the node matches, otherwise false
        /// </returns>
        protected override bool AcceptNode(HtmlElement element)
        {
            bool hidden = false;

            string displayValue              = element.GetStyle(Css.Properties.DISPLAY);
            bool   isDisplayNone             = CssHelper.IsDisplayNone(displayValue);
            bool   displayNoneIsDefaultValue = _defaultStyleLookup.IsDefaultValue(element.TagName, Css.Properties.DISPLAY, Css.Values.DISPLAY_NONE);

            if (isDisplayNone && !displayNoneIsDefaultValue)
            {
                hidden = true;
            }

            return(hidden);
        }