Div having contentEditable and display:grid cannot be edited if it is empty.
authorchangseok.oh@collabora.com <changseok.oh@collabora.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Feb 2015 17:15:50 +0000 (17:15 +0000)
committerchangseok.oh@collabora.com <changseok.oh@collabora.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Feb 2015 17:15:50 +0000 (17:15 +0000)
commit3eb18feeffa585d5568d80681abff274ea78ffee
treed477211287cdabffa332e44591f382993d40951f
parenta73f8ff3333f17b181df1c95f5f0e1813e6fb662
Div having contentEditable and display:grid cannot be edited if it is empty.
https://bugs.webkit.org/show_bug.cgi?id=141465

Reviewed by Ryosuke Niwa.

Source/WebCore:

This bug is quite similar to webkit.org/b/141218. RenderGrid should be also treated as a candidate
for visible position as like RenderFlexibleBox. The only different situation between them is
that RenderGrid has a bug setting "0px" for logicalHeight when it is empty. RenderGrid should also have
a minimum height of a single line if it is editable as well as RenderFlexibleBox does.

Test: fast/events/key-events-in-editable-gridbox.html

* dom/Position.cpp:
(WebCore::Position::isCandidate):
(WebCore::Position::isRenderedCharacter):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutGridItems):

LayoutTests:

This tests if an editable grid box can be reedited after erasing all texts in it.

* fast/events/key-events-in-editable-gridbox-expected.txt: Added.
* fast/events/key-events-in-editable-gridbox.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/key-events-in-editable-gridbox-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/key-events-in-editable-gridbox.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Position.cpp
Source/WebCore/rendering/RenderGrid.cpp