Fix r152265: FrameView's pagination mode is only one of two, and the logic was totally wrong
https://bugs.webkit.org/show_bug.cgi?id=118439
<rdar://problem/14366120>

Reviewed by Anders Carlsson.

* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
- Test both Page and FrameView's pagination modes.
- *Don't* clamp negatives to zero if we are paginated with scroll offset set,
    like the original changelog claimed, but the code did the opposite.
- Don't clamp in *all* pagination modes; with 'direction: RTL' it's still possible
    to have a negative maximum position in LTR/TB pagination modes.

* TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp:
(TestWebKitAPI::didLayout):
(TestWebKitAPI::TEST):
- Make use of EXPECT_JS_EQ instead of manually doing JavaScript stuff.
- Assert that we got the right number of pages for sanity.
- Reduce the page gap size so that DrawingAreaImpl doesn't try to allocate
    so much memory that SharedMemory asserts and makes the test time out.
- Use didFirstLayoutAfterSuppressedIncrementalRendering instead of Paint
    because paint doesn't fire if the window is offscreen.


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