Floating box is misplaced after content change.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Oct 2015 23:36:01 +0000 (23:36 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Oct 2015 23:36:01 +0000 (23:36 +0000)
commitd72eb111090df76e83dfd863973e5b3808046a3e
tree01aef7836393b9eadf68a7b56625babc117e69a7
parentb4125ae6c27e264ecd792b1ecbe7a1461b32a1bb
Floating box is misplaced after content change.
https://bugs.webkit.org/show_bug.cgi?id=150271

Reviewed by David Hyatt.

Collapse anonymous block when as the result of a sibling removal only floating siblings are left.

Source/WebCore:

Test: fast/block/collapse-anon-block-with-float-siblings-only.html

* rendering/RenderBlock.cpp:
(WebCore::canCollapseAnonymousBlock):
(WebCore::canMergeContiguousAnonymousBlocks):
(WebCore::RenderBlock::collapseAnonymousBoxChild):
(WebCore::RenderBlock::removeChild):
(WebCore::canMergeAnonymousBlock): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):

LayoutTests:

* fast/block/collapse-anon-block-with-float-siblings-only-expected.html: Added.
* fast/block/collapse-anon-block-with-float-siblings-only.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/block/collapse-anon-block-with-float-siblings-only-expected.html [new file with mode: 0644]
LayoutTests/fast/block/collapse-anon-block-with-float-siblings-only.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.h
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderFlexibleBox.h
Source/WebCore/rendering/RenderGrid.h