After copy and paste, cursor may appear to be above the bottom of content
https://bugs.webkit.org/show_bug.cgi?id=129167
Reviewed by Ryosuke Niwa.
Source/WebCore:
Adding a clear:both to the end of content.
I can't handle the case of the cursor appearing above the bottom of
absolutely positioned divs (of the case of floats inside absolutely
positioned divs) because you can't know where the bottom of a div
will end up being rendered (it is affected by things like browser
window width and text size settings). Therefore, the only case I
can handle is the case where there is a floating div in the same
level as the document itself.
Test: editing/pasteboard/copy-paste-inserts-clearing-div.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::isFloating):
* editing/EditingStyle.h:
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
(WebCore::StyledMarkupAccumulator::appendElement):
(WebCore::createMarkupInternal):
LayoutTests:
Makes sure that the clearing div is inserted.
* editing/pasteboard/copy-paste-inserts-clearing-div-expected.txt: Added.
* editing/pasteboard/copy-paste-inserts-clearing-div.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164521
268f45cc-cd09-0410-ab3c-
d52691b4dbfc