Web Inspector: Do not copy large module source strings
https://bugs.webkit.org/show_bug.cgi?id=136191

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-23
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::injectedScriptSource):

Source/WebCore:

* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::source):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
https://bugs.webkit.org/show_bug.cgi?id=109658
Source/WebCore:

Patch by Byungseon Shin <sun.shin@lge.com> on 2014-08-23
Reviewed by Martin Robinson.

Based on patch originally written by Tim Horton.
Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.

* WebCore.exp.in:
Adjust exports.

* platform/graphics/GraphicsLayer.h:
Move ContentsLayerPurpose enum up out of GraphicsLayer platform implmentations
and into GraphicsLayer, so we can use it as a parameter.
Add ContentsLayerForPlugin.

(WebCore::GraphicsLayer::setContentsToPlatformLayer):
Remove setContentsToMedia and setContentsToCanvas, and replace them
with setContentsToPlatformLayer, which previously existed but was unused
and simply called setContentsToMedia.
setContentsToPlatformLayer takes a ContentsLayerPurpose, primarily
so that GraphicsLayerCA can know whether it needs to setNeedsDisplay
the layer when parenting it (canvas) or not (everything else).

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
Rename function setContentsToMedia -> setContentsToPlatformLayer.
Rename argument mediaLayer -> platformLayer.
Store the passed-in ContentsLayerPurpose.
Remove setContentsToCanvas.

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateContentsPlatformLayer):
Remove updateContentsMediaLayer and updateContentsCanvas layer,
add updateContentsPlatformLayer.

* platform/graphics/ca/GraphicsLayerCA.h:
Do the same to the LayerChange enum.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
(WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay):
(WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
(WebCore::CoordinatedGraphicsLayer::destroyPlatformLayerIfNeeded):
(WebCore::CoordinatedGraphicsLayer::createPlatformLayerIfNeeded):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
Fold these together in the same way as elsewhere.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Do the same to the LayerChange enum.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createPlatformLayerIfNeeded):
(WebCore::CoordinatedGraphicsScene::syncPlatformLayerIfNeeded):
(WebCore::CoordinatedGraphicsScene::destroyPlatformLayerIfNeeded):
(WebCore::CoordinatedGraphicsScene::setLayerState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
Rename canvasLayer -> platformLayer.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
Use the new setContentsToPlatformLayer, passing in the relevant ContentsLayerPurpose.

Source/WebKit2:

Patch by Byungseon Shin <sun.shin@lge.com> on 2014-08-23
Reviewed by Martin Robinson.

Based on patch originally written by Tim Horton.
Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
Rename canvas -> platformLayer.

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