Allow UI clients to handle vertical wheel events.
https://bugs.webkit.org/show_bug.cgi?id=110006

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2013-02-19
Reviewed by Tim Horton.

Source/WebCore:

Add API to allow matching changes in WebKit2 to control rubber-banding behavior at vertical page extrema.
If rubber-banding is disabled during a scroll event that would otherwise trigger rubber-banding, dispatch
didNotHandleWheelEvent() to the page UI client.

* WebCore.exp.in:
Export new rubber-banding API.

* page/Page.cpp:
(WebCore):
(WebCore::Page::rubberBandsAtBottom):
Proxy for the corresponding function in ScrollingCoordinator.
(WebCore::Page::setRubberBandsAtBottom):
Ditto.
(WebCore::Page::rubberBandsAtTop):
Ditto.
(WebCore::Page::setRubberBandsAtTop):
Ditto.

* page/Page.h:
(Page):
Declare new rubber-banding API (above).

* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::rubberBandsAtBottom):
Stub API implementation.
(WebCore::ScrollingCoordinator::setRubberBandsAtBottom):
Ditto.
(WebCore::ScrollingCoordinator::rubberBandsAtTop):
Ditto.
(WebCore::ScrollingCoordinator::setRubberBandsAtTop):
Ditto.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
Initialize new member variables.
(WebCore::ScrollingTree::setMainFramePinState):
Set top/bottom pinned states.
(WebCore::ScrollingTree::rubberBandsAtBottom):
New accessor function.
(WebCore::ScrollingTree::setRubberBandsAtBottom):
New mutator function.
(WebCore::ScrollingTree::rubberBandsAtTop):
New accessor function.
(WebCore::ScrollingTree::setRubberBandsAtTop):
New mutator function.
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
Start a vertical swipe event if the frame is pinned at the top or bottom and associated rubber-banding is disabled.

* page/scrolling/ScrollingTree.h:
(ScrollingTree):
Declare new rubber-banding API and associated member variables.

* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
Declare API overrides.

* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::rubberBandsAtBottom):
Method override; proxy to corresponding function in ScrollingTree.
(WebCore::ScrollingCoordinatorMac::setRubberBandsAtBottom):
Ditto.
(WebCore::ScrollingCoordinatorMac::rubberBandsAtTop):
Ditto.
(WebCore::ScrollingCoordinatorMac::setRubberBandsAtTop):
Ditto.

* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection):
Remove trailing whitespace.
(WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
Calculate and pass vertical pinning state to ScrollingTree::setMainFramePinState().

Source/WebKit2:

Add API to allow clients to selectively control rubber-banding at vertical page extrema.

* UIProcess/API/C/WKPage.cpp:
(WKPageRubberBandsAtBottom):
Proxy for the corresponding function in WebCore::Page.
(WKPageSetRubberBandsAtBottom):
Ditto.
(WKPageRubberBandsAtTop):
Ditto.
(WKPageSetRubberBandsAtTop):
Ditto.

* UIProcess/API/C/WKPage.h:
Declare new API.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize new member variables.
(WebKit::WebPageProxy::setRubberBandsAtBottom):
New function; dispatches a matching message to the WebKit::WebPage.
(WebKit::WebPageProxy::setRubberBandsAtTop):
Ditto.

* UIProcess/WebPageProxy.h:
(WebPageProxy):
Declare new API.
(WebKit::WebPageProxy::rubberBandsAtBottom):
New accessor function.
(WebKit::WebPageProxy::rubberBandsAtTop):
Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setRubberBandsAtBottom):
New function; call the matching function on the associated WebCore::Page.
(WebKit::WebPage::setRubberBandsAtTop):
Ditto.

* WebProcess/WebPage/WebPage.h:
(WebPage):
Declare new rubber-banding API.

* WebProcess/WebPage/WebPage.messages.in:
Declare new rubber-banding API.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
'round' not implemented in border-image
https://bugs.webkit.org/show_bug.cgi?id=14185

Patch by Uday Kiran <udaykiran@motorola.com> on 2013-02-19
Reviewed by David Hyatt.

Source/WebCore:

Add rendering support for 'round' keyword of border-image-repeat CSS property
http://dev.w3.org/csswg/css3-background/#border-image-repeat
Rebased original patch by Benjamin Otte <otte@gnome.org> and made few fixes.

Test: fast/borders/border-image-02.html

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawTiledImage):
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
(Image):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintNinePieceImage): For 'round' keyword,
the image is tiled (repeated) to fill the area. If it does not fill the area
with a whole number of tiles, the image is rescaled so that it does.

LayoutTests:

Added test for 'round' keyword of border-image-repeat CSS property
http://dev.w3.org/csswg/css3-background/#border-image-repeat

* fast/borders/border-image-02.html: Added.
* platform/chromium-linux/fast/borders/border-image-02-expected.png: Added.
* platform/chromium/TestExpectations:
* platform/chromium/fast/borders/border-image-02-expected.txt: Added.
* platform/efl/TestExpectations:
* platform/gtk/fast/borders/border-image-02-expected.png: Added.
* platform/gtk/fast/borders/border-image-02-expected.txt: Added.
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:

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