Unable to delete the first and the last characters of a contenteditable div with display: table.

Contenteditable cannot be set for table elements. So throughout our editing code we have checks wherein if the node being processed is a table node, we check for contenteditability on its parent.

The current check: isTableElement() however checks based on the renderer's style display type. If the display of the renderer was set to TABLE or INLINE_TABLE, it would be considered as a node to be skipped (for editing purposes) and contenteditability verified against its parent.

However, with this approach, block elements whose display type has been set to TABLE and who also have contenteditable set for them, too would get skipped; since the check was being carried out against the renderer and not the element type.

Methods such as isEditablePosition(), isCandidate(), upstream(), downstream() etc., basically all methods that are concerned with either checking the validity of the current position or dealing with position traversal should thus check against the element's name (table) instead of the renderer.

The isTableElement() function is used only for editing purposes. Have thus modified the same to only check against the tag name.
Another method isRenderedTable() has been added which performs the old check (against the renderer's display type).

One existing test's expected result changes after this fix. The test is a crashtest and an extra space character gets added now. This is because for that test, display: table set on the body element is now being respected and when formatted, an extra space is appended at the end. The extra space gets added for formatting carried out on the body element even with the original code.
More explanation with screenshots for this change have been added to the corresponding bug: #107366

BUG=107366

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

git-svn-id: svn://svn.chromium.org/blink/trunk@162687 bbb929c8-8fbe-4397-9dbb-9b2b20218538
FlameChart: convert drawOverview method into static function for reusing in TimelinePanel

_calculateDrawData and _drawOverviewCanvas were made static.

A small portion of the function was extracted into resetCanvas method.

BUG=319999
R=yurys@chromium.org

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

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