willReveal edge events should be hooked up for overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=131071
-and corresponding-
<rdar://problem/16190392>

Reviewed by Sam Weinig.

Source/WebCore: 

This patch moves the will reveal logic from FrameView to Document so that it can 
be shared for RenderLayers.

This is mostly just a moved function, but now the function takes an Element* that 
represents the target of the event if the target is not the window.
* dom/Document.cpp:
(WebCore::Document::sendWillRevealEdgeEventsIfNeeded):
* dom/Document.h:

No longer implement sendWillRevealEdgeEventsIfNeeded() on FrameView or 
ScrollableArea at all. Call into Document instead.
* page/FrameView.cpp:
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::sendWillRevealEdgeEventsIfNeeded): Deleted.
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::sendWillRevealEdgeEventsIfNeeded): Deleted.

Call sendWillRevealEdgeEventsIfNeeded() after sending scroll events. 
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):

LayoutTests: 

* fast/events/will-reveal-edge-on-div-expected.txt: Added.
* fast/events/will-reveal-edge-on-div.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Simplify the RenderFlowThread state pusher
https://bugs.webkit.org/show_bug.cgi?id=131035

Reviewed by David Hyatt.

The RenderFlowThread state pusher is desynchronized from the RenderView layout state pusher
by one renderer. This patch fixes the anomaly by correctly ordering the push and pop operations
between the two systems.

Tests: no functional change, no new tests.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
(WebCore::RenderFlowThread::popFlowThreadLayoutState):
(WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutState):
* rendering/RenderView.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Displaying region's children in another region not supported
https://bugs.webkit.org/show_bug.cgi?id=130735

Reviewed by David Hyatt.

Source/WebCore:

With http://trac.webkit.org/changeset/166353, we disabled the possibility
of collecting the region's children into another flow and displaying them
in another region.
I added a new test for this and also changed the plain ASSERT in Element dtor
to ASSERT_WITH_SECURITY_IMPLICATION to better reflect the meaning of the assertion.

Test: fast/regions/region-child-not-flowed.html

* dom/Element.cpp:
(WebCore::Element::~Element):

LayoutTests:

With http://trac.webkit.org/changeset/166353, we disabled the possibility
of collecting the region's children into another flow and displaying them
in another region. With that change, we also skipped the existing tests.

Add a dedicated test that passes if a region child cannot be painted in another region,
in order to complete the skipped tests. This test should be removed when support for
this functionality will be added again.

* fast/regions/region-child-not-flowed-expected.html: Added.
* fast/regions/region-child-not-flowed.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@166632 268f45cc-cd09-0410-ab3c-d52691b4dbfc