Refactor code for <img> size calculation during attach
Refactor code for <img> size calculation during attach

Based on the changes in revision 155294, the call to setImageSizeForAltText was being
done twice when the "src" changed between non-empty URL to a empty one . First by
RenderImageResource::setCachedImage and then follwed by a explicit call to
setImageSizeForAltText in attach. Added checks to avoid unnecessary call to
setImageSizeForAltText.

Review URL: https://chromiumcodereview.appspot.com/22145005

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@155583 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs