Handle crash when submitting an injected form on an "image document page".

Document encoding isn't set in an image document page. When html+javascript are injected into the document page, which has forms that are submitted with values, it looks for the doc encoding type(which isn't set) to encode the form data. The patch fixes it by When encoding isn't set, derive it from default charset.

BUG=226644

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159667 bbb929c8-8fbe-4397-9dbb-9b2b20218538