Bug 836371 simplify dom