Pass HTMLDocument to convertToData

Change-Id: Ia7db42b7727b8ca16ae837b2f7c2aa56fb17576e
Merge "Pass HTMLDocument to convertToData"