Coordinated Graphics: refactor syncCanvas to handle the lifecycle clearly.
https://bugs.webkit.org/show_bug.cgi?id=102664

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-19
Reviewed by Noam Rosenthal.

Source/WebCore:

As refactoring Coordinated Graphics in WebKit2, code related to
TextureMapper is changed.

No new tests. Refactoring only.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::platformLayerSize):
    We need to know the size of a texture mapper platform layer.
(WebCore):
* platform/graphics/texmap/TextureMapperBackingStore.cpp:
  Because CoordinatedGraphicsLayer handles the canvas GraphicsSurface
  lifecycle, TextureMapperSurfaceBackingStore does not need to know
  GraphicsSurfaceToken.
(WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
(WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
(WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
* platform/graphics/texmap/TextureMapperBackingStore.h:
(TextureMapperSurfaceBackingStore):
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(WebCore::TextureMapperPlatformLayer::platformLayerSize):

Source/WebKit2:

This patch makes sync canvas code handle the lifecycle of the canvas
GraphicsSurface in the similar style to a directly image compositing and
an update atlas code. This patch moves the canvas lifecycle handling
code from LayerTreeRenderer to CoordinatedGraphicsLayer, because
CoordinatedGraphicsLayer knows best when to create and remove the canvas
GraphicsSurface.

After this patch, we can remove the canvas GraphicsSurface in UI Process as soon
as the canvas platform layer is unset in Web Process.

* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::createCanvas):
(WebKit):
(WebKit::LayerTreeCoordinatorProxy::syncCanvas):
(WebKit::LayerTreeCoordinatorProxy::destroyCanvas):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::createCanvas):
(WebKit):
(WebKit::LayerTreeRenderer::syncCanvas):
(WebKit::LayerTreeRenderer::destroyCanvas):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToCanvas):
(WebCore::CoordinatedGraphicsLayer::syncCanvas):
(WebCore):
(WebCore::CoordinatedGraphicsLayer::destroyCanvasIfNeeded):
(WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::createCanvas):
(WebKit):
(WebKit::LayerTreeCoordinator::syncCanvas):
(WebKit::LayerTreeCoordinator::destroyCanvas):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move tryUsePlatformCertificateInfoForChallenge from AuthenticationManager to PlatformCertificateInfo.
https://bugs.webkit.org/show_bug.cgi?id=102718

Reviewed by Sam Weinig.

Add the shared PlatformCertificateInfo version of the method:
* Shared/mac/PlatformCertificateInfo.h:
* Shared/mac/PlatformCertificateInfo.mm:
(WebKit::tryUsePlatformCertificateInfoForChallenge):

Use the new shared version:
* WebProcess/Authentication/AuthenticationManager.cpp:

Remove the old member version:
* WebProcess/Authentication/AuthenticationManager.h:
* WebProcess/Authentication/mac/AuthenticationManager.mac.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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