Merge BaseDocument and HtmlDocument