[New Block-Inside-Inline Model] Implement the correct paint order for blocks inside inlines.
https://bugs.webkit.org/show_bug.cgi?id=143320
Reviewed by Darin Adler.
Source/WebCore:
Added new tests in fast/block/inside-inlines.
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::nodeAtPoint):
* rendering/EllipsisBox.h:
* rendering/InlineBox.h:
* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::paint):
(WebCore::InlineElementBox::nodeAtPoint):
* rendering/InlineElementBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::paint):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::nodeAtPoint):
* rendering/InlineTextBox.h:
The HitTestAction has to be passed to nodeAtPoint so that hit test actions can be honored. All the nodeAtPoint
functions have been patched to include this argument. Painting and hit testing have been patched for InlineElementBox
to honor phases/actions when the element is an anonymous inline block.
The phase filter on RenderLineBoxList has been pushed in to InlineFlowBox::paint and InlineFlowBox::nodeAtPoint so that
we can respect it properly when inlines are painting by themselves (e.g., because they have a layer).
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
(WebCore::RenderBlockFlow::constructLine):
Go ahead and include all of the inline flow boxes between the root and the anonymous inline block if it turns out they
need to be constructed. This will end up being relevant for outlines and for self-painting layers (e.g., opacity).
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::paint):
(WebCore::RenderLineBoxList::hitTest):
Remove the filters here, since they get pushed in to InlineFlowBox.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::nodeAtPoint):
* rendering/RootInlineBox.h:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::nodeAtPoint):
* rendering/svg/SVGInlineTextBox.h:
More patching to pass the HitTestAction into nodeAtPoint.
LayoutTests:
* fast/block/inside-inlines/new-model/paint-order-expected.html: Added.
* fast/block/inside-inlines/new-model/paint-order.html: Added.
* fast/block/inside-inlines/opacity-on-inline-expected.html: Added.
* fast/block/inside-inlines/opacity-on-inline.html: Added.
* fast/block/inside-inlines/paint-order-expected.html: Added.
* fast/block/inside-inlines/paint-order.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@182279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed