[New Block-Inside-Inline Model] Implement the correct paint order for blocks inside...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Apr 2015 18:34:57 +0000 (18:34 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Apr 2015 18:34:57 +0000 (18:34 +0000)
commit514f9ab2ff2ab275b3b3c49c9d58b758f3b0cbff
treedf7f92cf5f48925c59335693d1c476884107d079
parenta239330f530d5fb13788fb1c97f31ed44771bdca
[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: https://svn.webkit.org/repository/webkit/trunk@182279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/block/inside-inlines/new-model/paint-order-expected.html [new file with mode: 0644]
LayoutTests/fast/block/inside-inlines/new-model/paint-order.html [new file with mode: 0644]
LayoutTests/fast/block/inside-inlines/opacity-on-inline-expected.html [new file with mode: 0644]
LayoutTests/fast/block/inside-inlines/opacity-on-inline.html [new file with mode: 0644]
LayoutTests/fast/block/inside-inlines/paint-order-expected.html [new file with mode: 0644]
LayoutTests/fast/block/inside-inlines/paint-order.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebCore/rendering/EllipsisBox.h
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineElementBox.cpp
Source/WebCore/rendering/InlineElementBox.h
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderLineBoxList.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.h