No caret on empty contenteditable element with negative text-indent
authorrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 19:51:03 +0000 (19:51 +0000)
committerrobert@webkit.org <robert@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 19:51:03 +0000 (19:51 +0000)
commit9d5a6148ecc57d2112b47a36a64569c2a41c5fc5
tree1979a30f1f9f1ea8000dd0795465efd4005a91b1
parent9d032a7e09a9f8fc673b61d6903692b6ccae4f6b
No caret on empty contenteditable element with negative text-indent
https://bugs.webkit.org/show_bug.cgi?id=108633

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/repaint/paint-caret-in-div-with-negative-indent.html

When an editable element has a negative text indent we won't paint the caret when the
element is empty because it falls outside the element's border box. To ensure the caret is painted,
account for any negative indent with our overflow.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):

LayoutTests:

* fast/repaint/paint-caret-in-div-with-negative-indent-expected.png: Added.
* fast/repaint/paint-caret-in-div-with-negative-indent-expected.txt: Added.
* fast/repaint/paint-caret-in-div-with-negative-indent.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/repaint/paint-caret-in-div-with-negative-indent-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/paint-caret-in-div-with-negative-indent-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/paint-caret-in-div-with-negative-indent.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp