[Chromium] Correct zoom for focused node when using compositor scaling
https://bugs.webkit.org/show_bug.cgi?id=107599

Reviewed by Adam Barth.

When applyDeviceScaleFactorInCompositor, targetScale should exclude device scale factor.
When applyPageScaleFactorInCompositor, caret size and content sizes are in css pixels and they should be in the viewport of the new scale.

Reapply r141153. Added font-size in html to ensure same caret size across platforms.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::scrollFocusedNodeIntoRect):
(WebKit):
(WebKit::WebViewImpl::computeScaleAndScrollForFocusedNode): Extracted from scrollFocusedNodeIntoRect() to ease testing.
* src/WebViewImpl.h:
(WebViewImpl):
* tests/WebFrameTest.cpp: Updated test DivScrollEditableTest
* tests/data/get_scale_for_zoom_into_editable_test.html: Moved the logic of onload script (which seems not to work) into WebFrameTest.cpp.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Remove m_pendingSyncBackingStores in LayerTreeRenderer.
https://bugs.webkit.org/show_bug.cgi?id=107099

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-30
Reviewed by Noam Rosenthal.

Source/WebCore:

Add GraphicsLayerTextureMapper::setBackingStore() so that
LayerTreeRenderer sets a backing store to GraphicsLayerTextureMapper.

Remove three methods of TextureMapperLayer related to a backing store
because they are no longer used.

Covered by existing compositing tests.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded):
(WebCore):
(WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCount):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
(WebCore::GraphicsLayerTextureMapper::setBackingStore):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(GraphicsLayerTextureMapper):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/TextureMapperLayer.h:
(TextureMapperLayer):

Source/WebKit2:

Instead of queuing the setting of backing stores in LayerTreeRenderer,
and then setting them directly to TextureMapperLayer, we allow
GraphicsLayerTextureMapper's existing queuing mechanism to handle that.
Instead of a m_pendingSyncBackingStores queue, we have a m_backingStores
queue which can be applied much more easily to the layer tree.

In addition, LayerTreeRenderer::purgeGLResources() does not call
TextureMapperLayer::clearBackingStoresRecursive() because
TextureMapperLayer will be destructed soon.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::deleteLayer):
(WebKit::LayerTreeRenderer::createBackingStoreIfNeeded):
(WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded):
(WebKit::LayerTreeRenderer::resetBackingStoreSizeToLayerSize):
(WebKit::LayerTreeRenderer::createTile):
(WebKit::LayerTreeRenderer::removeTile):
(WebKit::LayerTreeRenderer::updateTile):
(WebKit::LayerTreeRenderer::commitPendingBackingStoreOperations):
(WebKit::LayerTreeRenderer::purgeGLResources):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:

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