HTMLImageElement width/height should updateLayout first.

HTMLImageElement::width/height were not updating layout first before
checking for the layoutObject() which means that we fall back to the
attribute when we shouldn't. We're also using the updateLayout method
instead of updateLayoutIgnorePendingStylesheets which should be used
for all JS APIs. Finally I deleted the unused boolean argument to the
methods.

We also make sure to check if we're in the document before causing a
layout so checking for a disconnected image's width/height before
drawing to a canvas doesn't cause a sync layout.

Review URL: https://codereview.chromium.org/1299563002

git-svn-id: svn://svn.chromium.org/blink/trunk@200594 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed