ASSERTION FAILED: scrollerImp == scrollbarPainterForScrollbar(_scrollbar) on two API tests
https://bugs.webkit.org/show_bug.cgi?id=132034
<rdar://problem/16624332>

Reviewed by Simon Fraser.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):
scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp: moves the delegate
from the old scrollerImp to the new one, and also happens to call shouldUseLayerPerPartForScrollerImp.
Since scrollerImpWithStyle: has not returned yet, the scrollbarPainterForScrollbar still returns the old scrollerImp,
so this assertion fires. It's safe to remove this because supportsUpdateOnSecondaryThread doesn't make use of the imp.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not paint border image when the border rect is empty.
https://bugs.webkit.org/show_bug.cgi?id=131988

Reviewed by Darin Adler.

http://trac.webkit.org/changeset/167351 introduced an early return when border
rect is empty. This patch ensures that border image is not painted either in that case.

Source/WebCore:
Modified padding-margin-negative-border.html to cover border-image case.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintBorder):

LayoutTests:
* fast/css/padding-margin-negative-border-expected.html: Borders in -expected.html does not get painted either, just
ensure that they are explicitly different colors.
* fast/css/padding-margin-negative-border.html:


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