Move the 'overflow' event dispatching logic out of RenderLayer
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 19:24:18 +0000 (19:24 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 19:24:18 +0000 (19:24 +0000)
commit0b10efb1d271873d5d0c3d0db2333e3928b43c6d
tree977b71130928aa92c236f59a0bd782483f69e49d
parent5f48adf9c2a300ea738c56ce7edd2fa0baf3b89e
Move the 'overflow' event dispatching logic out of RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=80090

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/events/overflow-events-writing-mode.html

This moves the 'overflow' event dispatch from RenderLayer to an helper class
OverflowEventDispatcher. For now, the class lives in RenderBlock as it matches
the existing code but it may be moved later to its own class as FrameView could
benefit from it too or if we need to support 'overflow' events on RenderBoxes.

* rendering/RenderBlock.cpp:
(WebCore):
(OverflowEventDispatcher):
(WebCore::OverflowEventDispatcher::OverflowEventDispatcher):
(WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
(WebCore::OverflowEventDispatcher::computeOverflowStatus):
RAII dispatcher class that stores the information before layout and compare
them after to dispatch the right information.

(WebCore::RenderBlock::layout): Added an instance of OverflowEventDispatcher.

* rendering/RenderBox.h:
(WebCore::RenderBox::hasHorizontalLayoutOverflow):
(WebCore::RenderBox::hasVerticalLayoutOverflow):
Helper method to know if we have an horizontal / vertical layout overflow.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderLayer.h:
Removed the scroll tracking logic as we don't need it anymore. This removes
3 booleans from RenderLayer.

LayoutTests:

* fast/events/overflow-events-writing-mode.html: Added.
* fast/events/overflow-events-writing-mode-expected.txt: Added.
Added a test for overflow events in a vertical writing mode.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/overflow-events-writing-mode-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/overflow-events-writing-mode.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h