[DevTools] Replace usages of document with custom functions.

This patch replaces the following document.XXXX functions with window.XXXX custom ones:
- createDocumentFragment;
- createElement;
- createElementWithClass;
- createTextNode.

BUG=424188

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183892 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: fix aggegated pie chart for JSFrame events on Timeline

JSFrame events are added in TimelineFlameChart and their selfTime is never calculated. These events are never added into the model as they are used only to draw the flame chart. When such event is selected we calculate its selfTime on the fly as duration - sum of children times.

BUG=424507

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

git-svn-id: svn://svn.chromium.org/blink/trunk@183893 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: bring back exception handling in URL decoding

The exception handling was added in r177449, but then was accidentally
removed via r183686. This patch brings the test and functionality back.

R=vsevik

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

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