Bug 1043163. Avoid negative widths and heights due to overflow. r=mats

--HG--
extra : rebase_source : 62db3ad669f7a965672ea6bbab1b932c4a07040f
Bug 1050096. Clip scrollparts to the viewport for root scrollframes. r=tnikkel