Tile cache has way too many tiles when pinch-zoomed in
https://bugs.webkit.org/show_bug.cgi?id=132929
-and corresponding-
<rdar://problem/16527172>

Reviewed by Benjamin Poulain.

This patch makes the margin sizing functions return the set margin size scaled by 
the TileGrid's scale. We also need to get rid of the old notion we used to have
that margin tiles might be allowed to have a different size than the other tiles. 
We don't want that. They should have the normal margin size, but they should
affect the overall coverage area.

Scale by the TileGrid's scale.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::topMarginHeight):
(WebCore::TileController::bottomMarginHeight):
(WebCore::TileController::leftMarginWidth):
(WebCore::TileController::rightMarginWidth):

Get rid of adjustRectAtTileIndexForMargin() since we do not want to ever do this 
adjustment. Use tileSize instead of margin size for all sizing computations.
* platform/graphics/ca/mac/TileGrid.h:
* platform/graphics/ca/mac/TileGrid.mm:
(WebCore::TileGrid::rectForTileIndex):
(WebCore::TileGrid::getTileIndexRangeForRect):
(WebCore::TileGrid::adjustRectAtTileIndexForMargin): Deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.

This was causing -Wunused-const-variable errors.

* css/CSSParser.cpp: Add include guard.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable IOSurface view snapshots for 10.9+
https://bugs.webkit.org/show_bug.cgi?id=132932
<rdar://problem/16900619>

Reviewed by Dean Jackson.

* UIProcess/mac/ViewSnapshotStore.h:
r166005 unintentionally worked around <rdar://problem/16734031>.
r168689 fixed another bug that caused sometimes randomly white snapshots.
It's safe to turn on IOSurface view snapshots where purgeability is supported.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove FrameView::viewportConstrainedExtentRect, it is unused
https://bugs.webkit.org/show_bug.cgi?id=132927

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-05-14
Reviewed by Simon Fraser.

* page/FrameView.cpp:
(WebCore::FrameView::viewportConstrainedExtentRect): Deleted.
* page/FrameView.h:
Simon replaced this by viewportConstrainedVisibleContentRect, remove the old code.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
https://bugs.webkit.org/show_bug.cgi?id=132931

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-05-14
Reviewed by Sam Weinig.

The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.

For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
Rotate back to landscape: the position is restored  correct, but it is then overriden by
the stick-to-edges branch.

When we restore the position from history, we should only put it back in the valid bounds, skipping
stick-to-edges entirely.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):


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