[iOS][WK2] Support disabling speculative tiling
https://bugs.webkit.org/show_bug.cgi?id=132512

Reviewed by Tim Horton.

Move ScrollView::setScrollVelocity() and ScrollView::computeCoverageRect() to FrameView.
When speculative tiling is disabled, return an unmodified exposed rect.

Time/velocity adjusments are completely unnecessary at the moment since speculative tiling
is enabled as soon as the view scrolls.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setScrollVelocity):
(WebCore::FrameView::computeCoverageRect):
* page/FrameView.h:
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::setScrollVelocity): Deleted.
(WebCore::ScrollView::computeCoverageRect): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] REGRESSION (WebKit2): Page isn't clipped properly during back/forward swipe
https://bugs.webkit.org/show_bug.cgi?id=132538
<rdar://problem/16266027>

Reviewed by Simon Fraser.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/ViewGestureController.h:
Add a clipping layer above the live swipe layer, which explicitly clips to bounds.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clear the JSString cache when under memory pressure.
<https://webkit.org/b/132539>

The WeakGCMap used for fast mapping from StringImpl* to JSString*
can actually get pretty big, and if we find ourselves under memory
pressure, it's entirely inessential.

1.1 MB progression on Membuster3.

Reviewed by Sam Weinig.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseMemory):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS JIT: optimize direct / indirect adjacent's traversal backtracking
https://bugs.webkit.org/show_bug.cgi?id=132319

Patch by Yusuke Suzuki <utatane.tea@gmail.com> on 2014-05-03
Reviewed by Benjamin Poulain.


Source/WebCore: 
Since adjacent backtracking stack reference is pre-allocated
in prologue in http://trac.webkit.org/changeset/166834,
clearing stack phase is not needed. So we can drop
JumpToClearAdjacentTail from backtracking action and simplify
backtracking handling.
And optimize direct / indirect adjacent's traversal backtracking by
using appropriate backtracking height.

When solving adjacent traversal backtracking action,
1) When there's no descendant relation on the right, traversal
failure becomes global failure.
2) When `tagNameMatchedBacktrackingStartHeightFromDescendant` ==
`heightFromDescendant` + 1, the descendant backtracking starts with
the parent of the current element. So we can use the current element
and the backtracking action is JumpToDescendantTreeWalkerEntryPoint.
3) Otherwise, currently we take the conservative approach,
JumpToDescendantTail.

NOTE:
And if `hasDescendantRelationOnTheRight` is true and there's no child
fragment on the right, the backtracking element register is not
effective. So we should ensure that fragment doesn't use the
backtracking element register. Such a fragment fulfills the following
conditions. 1. tagNameMatchedBacktrackingStartHeightFromDescendant is
always 1 (tagNames.size(), that contains only descendant fragment) 2.
heightFromDescendant is always 0 (-- See
computeBacktrackingHeightFromDescendant implementation) Therefore such
a fragment's action always becomes
JumpToDescendantTreeWalkerEntryPoint. So we can ensure that the
backtracking element register is not used.

Test: fast/selectors/backtracking-adjacent.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
(WebCore::SelectorCompiler::solveAdjacentTraversalBacktrackingAction):
(WebCore::SelectorCompiler::solveBacktrackingAction):
(WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
(WebCore::SelectorCompiler::isAfterChildRelation): Deleted.

LayoutTests: 
* fast/selectors/backtracking-adjacent-expected.txt: Added.
* fast/selectors/backtracking-adjacent.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderSVGResourcePattern should deal in RenderElement&.
<https://webkit.org/b/132536>

Tweak buildPattern() and buildTileImageTransform() to take RenderElement&
instead of RenderObject* since we know that these functions will always
be called with non-null RenderElement subclasses.

Reviewed by Sam Weinig.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::applyResource):
(WebCore::RenderSVGResourcePattern::buildTileImageTransform):
* rendering/svg/RenderSVGResourcePattern.h:


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