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