Add a minimumLayoutWidth WKView property
https://bugs.webkit.org/show_bug.cgi?id=103660
<rdar://problem/11791729>

Reviewed by Beth Dakin.

When minimumLayoutWidth is set to a positive value, the WKView will update its intrinsic content size given the layout width.

* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::intrinsicContentSizeDidChange):
Call the WKView.

* UIProcess/API/mac/WKView.mm:
(-[WKView intrinsicContentSize]):
Override the intrinsicContentSize getter.

(-[WKView _setIntrinsicContentSize:]):
Update the intrinsic content size and mark it as invalid.

(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
By default, the WKView should have no intrinsic size.

(-[WKView minimumLayoutWidth]):
(-[WKView setMinimumLayoutWidth:]):
Call through to the WebPageProxy object.

* UIProcess/API/mac/WKViewPrivate.h:
Add the SPI here.

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::minimumLayoutWidthDidChange):
(WebKit::DrawingAreaProxy::didUpdateGeometry):
(WebKit::DrawingAreaProxy::intrinsicContentSizeDidChange):
Add empty stubs.

* UIProcess/DrawingAreaProxy.messages.in:
Update the DidUpdateGeometry signature and add IntrinsicContentSizeDidChange.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Initialize the minimum layout width.

(WebKit::WebPageProxy::setMinimumLayoutWidth):
Update the minimum layout width and call the drawing area proxy.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::minimumLayoutWidth):
Add getter.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
(TiledCoreAnimationDrawingAreaProxy):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutWidthDidChange):
Update the geometry if needed.

(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
Update the intrinsic content size.

(WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
Call through to WebPageProxy::intrinsicContentSizeDidChange.

(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
Pass along the minimum layout width.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::intrinsicContentSizeDidChange):
Call through to the page client.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):
Call DrawingArea::mainFrameContentSizeChanged.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::mainFrameContentSizeChanged):
Add empty stub.

(WebKit::DrawingArea::updateGeometry):
Update signature.

* WebProcess/WebPage/DrawingArea.messages.in:
Add minimumLayoutWidth to UpdateGeometry.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
If the content size change is not coming from updateGeometry, send an InstrinsicContentSizeDidChange message.

(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
If m_minimumLayoutWidth is positive, do an initial layout pass to figure out the height of the page and then do another
layout with the viewport set to that height.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordinatedGraphics] Use OwnPtr for LayerMap's layers in LayerTreeRenderer
https://bugs.webkit.org/show_bug.cgi?id=103650

Reviewed by Noam Rosenthal.

We currently store raw pointers to WebCore::GraphicsLayer in the LayerMap
meaning that we need to delete them manually. This patch leverages smart
pointers and stores layers as OwnPtr in the LayerMap so that the layers
are owned by the HashMap and we don't have to handle memory manually.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::adjustPositionForFixedLayers):
(WebKit::LayerTreeRenderer::setLayerChildren):
(WebKit::LayerTreeRenderer::deleteLayer):
(WebKit::LayerTreeRenderer::ensureLayer):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136175 and r136177.
http://trac.webkit.org/changeset/136175
http://trac.webkit.org/changeset/136177
https://bugs.webkit.org/show_bug.cgi?id=103683

Changes did not correct Windows build. (Requested by bfulgham
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-29

* TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r134693): Compilation error on @supports grammar code
https://bugs.webkit.org/show_bug.cgi?id=103678

Patch by Pablo Flouret <pablof@motorola.com> on 2012-11-29
Reviewed by Tony Chang.

Coming from https://bugs.webkit.org/show_bug.cgi?id=102295

No new tests, compile fix.

* css/CSSGrammar.y.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unused parameters on plugins/npapi.cpp
https://bugs.webkit.org/show_bug.cgi?id=103676

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-11-29
Reviewed by Kentaro Hara.

Because 'instance' and 'menu' are not used when !PLATFORM(QT) || !defined(XP_MACOSX),
use UNUSED_PARAM macro to fix build warning -Wunused-parameter

* plugins/npapi.cpp:
(NPN_PopUpContextMenu):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove deprecated API since it is no longer used
https://bugs.webkit.org/show_bug.cgi?id=103570

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-11-29
Reviewed by Adam Barth.

Remove WebPluginContainer::setIsAcceptingTouchEvents, since this is not used anymore,
in favour of WebPluginContainer::requestTouchEventType.

* public/WebPluginContainer.h:
(WebPluginContainer):
* src/WebPluginContainerImpl.cpp:
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: optimize repaint regions upon text editing
https://bugs.webkit.org/show_bug.cgi?id=103674

Reviewed by Vsevolod Vlasov.

There is a lot happening that makes repaint area larger than it should be,
namely unnecessary tabbed pane and navigator updates.

* inspector/front-end/NavigatorView.js:
(WebInspector.NavigatorView.prototype._updateScriptTitle):
* inspector/front-end/TabbedPane.js:
(WebInspector.TabbedPaneTab.prototype.set title):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135862.
http://trac.webkit.org/changeset/135862
https://bugs.webkit.org/show_bug.cgi?id=103367

We've been observing 'Fatal error in
v8::V8::AddMessageListener()' in bots

* bindings/v8/V8Binding.cpp:
(WebCore::v8NonStringValueToWebCoreString):
* bindings/v8/V8StringResource.cpp:
(WebCore::int32ToWebCoreStringFast):
(WebCore::int32ToWebCoreString):
* bindings/v8/V8StringResource.h:
(WebCore::V8StringResource::V8StringResource):
(WebCore::V8StringResource::prepareBase):
(WebCore::V8StringResource::setString):
(V8StringResource):
(WebCore::V8StringResource::toString):
(WebCore::::prepare):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimization in image decoding.
https://bugs.webkit.org/show_bug.cgi?id=88424

Patch by Viatcheslav Ostapenko <v.ostapenko@samsung.com> on 2012-11-29
Reviewed by Brent Fulgham.

Reduce branching and multiplications in JPEG image decoding loops and functions.
Code is moved to the template functions with scale and color space template parameters
because they were reason of branches inside loops. With templated funtions compiler
will generate separate instance of function for every set of parameters removing
unreachable code in every condition where constant value is used.

Rebase and update of original patch by Misha Tyutyunik <michael.tyuytunik@nokia.com> .

Thanks to Noel Gordon for his help in cleaning up remaining issues.

Covered by existing tests.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore):
(WebCore::setPixel):
(WebCore::JPEGImageDecoder::outputScanlines):
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
(JPEGImageDecoder):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Initialize m_xpcConnection to null if the identifier doesn't have an XPC connection
https://bugs.webkit.org/show_bug.cgi?id=103689

Reviewed by Darin Adler.

* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::platformInitialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136171.
http://trac.webkit.org/changeset/136171
https://bugs.webkit.org/show_bug.cgi?id=103695

Likely caused ReOpenedWithID and ReOpenedWithURL to fail in
linux/chromeos (Requested by zhenyao on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-29

Source/WebCore:

* inspector/InspectorClient.h:
(WebCore::InspectorClient::startMainThreadMonitoring):
(WebCore::InspectorClient::stopMainThreadMonitoring):
* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
(InspectorController):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willProcessTaskImpl):
(WebCore::InspectorInstrumentation::didProcessTaskImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willProcessTask):
(WebCore):
(WebCore::InspectorInstrumentation::didProcessTask):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):

Source/WebKit/chromium:

* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::startMainThreadMonitoring):
(WebKit):
(WebKit::InspectorClientImpl::stopMainThreadMonitoring):
(WebKit::InspectorClientImpl::willProcessTask):
(WebKit::InspectorClientImpl::didProcessTask):
* src/InspectorClientImpl.h:
(InspectorClientImpl):
* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgentImpl::attach):
(WebKit::WebDevToolsAgentImpl::detach):
* src/WebDevToolsAgentImpl.h:
(WebDevToolsAgentImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix python unit tests after r136158 (android port tests failing)
https://bugs.webkit.org/show_bug.cgi?id=103581

Unreviewed, build fix.

The unit tests apparently weren't ran for this patch; we failed
to update the mock executive calls out to adb to determine various
aspects of the environment, and were failing to create drivers.

* Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
(MockRunCommand.mock_run_command_fn):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Instantiate snapshot plugins in a PluginProcess with muted audio
https://bugs.webkit.org/show_bug.cgi?id=101536

Patch by Kiran Muppala <cmuppala@apple.com> on 2012-11-29
Reviewed by Anders Carlsson.

Plugins created for generation of a snapshot should be instantiated in a separate process with
muted audio so that any sound generated during the snapshot process is not audible to the user.

* Configurations/WebKit2.xcconfig: Add CoreAudio to the list of linked frameworks.
* PluginProcess/PluginProcess.h: Add PluginProcess::Type enum with values for regular and
snapshot process types. Provide DefaultHash and IsInteger template specializations for the enum
so that PluginProcessConnectionManager can store it in a HashMap.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::muteAudio):
(WebKit::PluginProcess::platformInitialize): Mute audio if the process creation parameters indicate
that the plugin process type is snapshot process.
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
* Shared/Plugins/PluginProcessCreationParameters.h: Add processType process creation parameter.
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::getPluginProcessConnection): Add process type parameter.
(WebKit::PluginProcessManager::getSitesWithData): Forward message to regular plugin process only.
(WebKit::PluginProcessManager::clearSiteData): Forward message to regular plugin process only.
(WebKit::PluginProcessManager::pluginProcessWithPath): Add process type parameter.
(WebKit::PluginProcessManager::getOrCreatePluginProcess): Ditto.
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::create): Add process type parameter.
(WebKit::PluginProcessProxy::PluginProcessProxy): Ditto.
(WebKit::PluginProcessProxy::didClose): Include process type with the plugin process crashed message.
(WebKit::PluginProcessProxy::didFinishLaunching): Set process type process creation parameter.
* UIProcess/Plugins/PluginProcessProxy.h:
(WebKit::PluginProcessProxy::processType):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginProcessConnection): Pass along process type parameter to
PluginProcessManager.
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
* UIProcess/WebProcessProxy.messages.in: Add process type parameter to GetPluginProcessConnection message.
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection): Add process type parameter.
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::create): Ditto.
(WebKit::PluginProcessConnection::processType): Ditto.
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection): Add process type parameter.
(WebKit::PluginProcessConnectionManager::removePluginProcessConnection): Use process type in addition to
plugin path to find the connection to remove.
(WebKit::PluginProcessConnectionManager::pluginProcessCrashed): Add process type parameter.
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create): Ditto.
(WebKit::PluginProxy::PluginProxy): Ditto.
(WebKit::PluginProxy::initialize): Add process type parameter in call to
PluginProcessConnectionManager::getPluginProcessConnection.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin): Determine process type based on display state of plugin element and
pass it to PluginProxy::create.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::pluginProcessCrashed): Pass along process type parameter to
PluginProcessConnectionManager.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Add process type parameter to PluginProcessCrashed message.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Propagate more leveldb errors to script
https://bugs.webkit.org/show_bug.cgi?id=103580

Reviewed by Tony Chang.

Source/WebCore:

LevelDBDatabase used a single return value to indicate both I/O problems
and a missing key. Now an out variable is used to indicate if the
requested key was found. The return value is used to report corruption
or disk error.

This is a small step toward propagating low level errors everywhere
possible. So far only one scenario will newly cause script to receive
an error: when leveldb has trouble looking for existing keys during an
objectstore->add.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::getInt):
(WebCore::getVarInt):
(WebCore::getString):
(WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::keyExistsInObjectStore):
* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::generateKey):
(WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):
* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::safeGet):
* platform/leveldb/LevelDBDatabase.h:
(LevelDBDatabase):
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBTransaction::safeGet):
(WebCore):
(WebCore::LevelDBTransaction::get):
* platform/leveldb/LevelDBTransaction.h:
(LevelDBTransaction):

Source/WebKit/chromium:

* tests/IDBFakeBackingStore.h:
 Update method signatures.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitpy: autoinstaller is failing on windows
https://bugs.webkit.org/show_bug.cgi?id=103699

Unreviewed, build fix.

We're attempting to create directories with forward slashes in them;
this is a no-no on windows.

* Scripts/webkitpy/common/system/autoinstall.py:
(AutoInstaller._create_scratch_directory_inner):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r136167.
http://trac.webkit.org/changeset/136167
https://bugs.webkit.org/show_bug.cgi?id=103701

Win debug build failure (Requested by zhenyao on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-29

* platform/graphics/chromium/LazyDecodingPixelRef.cpp:
(WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
* platform/graphics/chromium/LazyDecodingPixelRef.h:
(LazyDecodingPixelRef):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Forward cookie jar calls to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=103457

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
PlatformCookieJar.h functions are now used in WebKit2.

* loader/CookieJar.cpp:
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
Use a strategy instead of going to PlatformCookieJar directly.

* platform/Cookie.h: (Cookie): Added a default constructor, so that Cookie could be
sent over IPC.

* platform/CookiesStrategy.h: Added functions for cookie jar.

Source/WebKit/efl:

* WebCoreSupport/PlatformStrategiesEfl.cpp:
(PlatformStrategiesEfl::cookiesForDOM):
(PlatformStrategiesEfl::setCookiesFromDOM):
(PlatformStrategiesEfl::cookiesEnabled):
(PlatformStrategiesEfl::cookieRequestHeaderFieldValue):
(PlatformStrategiesEfl::getRawCookies):
(PlatformStrategiesEfl::deleteCookie):
(PlatformStrategiesEfl::getHostnamesWithCookies):
(PlatformStrategiesEfl::deleteCookiesForHostname):
(PlatformStrategiesEfl::deleteAllCookies):

Source/WebKit/gtk:

* WebCoreSupport/PlatformStrategiesGtk.cpp:
(PlatformStrategiesGtk::cookiesForDOM):
(PlatformStrategiesGtk::setCookiesFromDOM):
(PlatformStrategiesGtk::cookiesEnabled):
(PlatformStrategiesGtk::cookieRequestHeaderFieldValue):
(PlatformStrategiesGtk::getRawCookies):
(PlatformStrategiesGtk::deleteCookie):
(PlatformStrategiesGtk::getHostnamesWithCookies):
(PlatformStrategiesGtk::deleteCookiesForHostname):
(PlatformStrategiesGtk::deleteAllCookies):

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookiesEnabled):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
(WebPlatformStrategies::deleteCookie):
(WebPlatformStrategies::getHostnamesWithCookies):
(WebPlatformStrategies::deleteCookiesForHostname):
(WebPlatformStrategies::deleteAllCookies):
(WebPlatformStrategies::getPluginInfo):
(WebPlatformStrategies::bufferForType):
WebKit1 strategy just uses PlatformCookieJar.

Source/WebKit/qt:

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::cookiesForDOM):
(PlatformStrategiesQt::setCookiesFromDOM):
(PlatformStrategiesQt::cookiesEnabled):
(PlatformStrategiesQt::cookieRequestHeaderFieldValue):
(PlatformStrategiesQt::getRawCookies):
(PlatformStrategiesQt::deleteCookie):
(PlatformStrategiesQt::getHostnamesWithCookies):
(PlatformStrategiesQt::deleteCookiesForHostname):
(PlatformStrategiesQt::deleteAllCookies):

Source/WebKit/win:

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookiesEnabled):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
(WebPlatformStrategies::deleteCookie):
(WebPlatformStrategies::getHostnamesWithCookies):
(WebPlatformStrategies::deleteCookiesForHostname):
(WebPlatformStrategies::deleteAllCookies):

Source/WebKit/wince:

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::cookiesForDOM):
(PlatformStrategiesWinCE::setCookiesFromDOM):
(PlatformStrategiesWinCE::cookiesEnabled):
(PlatformStrategiesWinCE::cookieRequestHeaderFieldValue):
(PlatformStrategiesWinCE::getRawCookies):
(PlatformStrategiesWinCE::deleteCookie):
(PlatformStrategiesWinCE::getHostnamesWithCookies):
(PlatformStrategiesWinCE::deleteCookiesForHostname):
(PlatformStrategiesWinCE::deleteAllCookies):

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
Added messages to maniputate CookieJar in network process.

* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp: Removed unnecessary WebCore:: prefixes,
this file has a using direcive.
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
(WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname):
(WebKit::NetworkConnectionToWebProcess::deleteAllCookies):
Added implementations that use PlatformCookieJar in the network process.

* Scripts/webkit2/messages.py: (struct_or_class):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
Added support for Cookie.

* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
(WebKit::WebPlatformStrategies::getHostnamesWithCookies):
(WebKit::WebPlatformStrategies::deleteCookiesForHostname):
(WebKit::WebPlatformStrategies::deleteAllCookies):
When using the network process, forward cookie calls to it.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Node::isDescendantOf contains logic that duplicates isDocumentNode
https://bugs.webkit.org/show_bug.cgi?id=103698

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-11-29
Reviewed by Hajime Morita.

Instead of checking for documents with node->document() == node just
use node->isDocumentNode().

* dom/Node.cpp:
(WebCore::Node::isDescendantOf):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It should be easy to find code blocks in debug dumps
https://bugs.webkit.org/show_bug.cgi?id=103623

Source/JavaScriptCore: 

Reviewed by Goeffrey Garen.

This gives CodeBlock a relatively strong, but also relatively compact, hash. We compute
it lazily so that it only impacts run-time when debug support is enabled. We stringify
it smartly so that it's short and easy to type. We base it on the source code so that
the optimization level is irrelevant. And, we use SHA1 since it's already in our code
base. Now, when a piece of code wants to print some debugging to say that it's operating
on some code block, it can use this CodeBlockHash instead of memory addresses.

This also takes CodeBlock debugging into the new world of print() and dataLog(). In
particular, CodeBlock::dump() corresponds to the thing you want printed if you do:

dataLog("I heart ", *myCodeBlock);

Probably, you want to just print some identifying information at this point rather than
the full bytecode dump. So, the existing CodeBlock::dump() has been renamed to
CodeBlock::dumpBytecode(), and CodeBlock::dump() now prints the CodeBlockHash plus just
a few little tidbits.
        
Here's an example of CodeBlock::dump() output:
        
EkILzr:[0x103883a00, BaselineFunctionCall]
        
EkILzr is the CodeBlockHash. 0x103883a00 is the CodeBlock's address in memory. The other
part is self-explanatory.

Finally, this new notion of CodeBlockHash is available for other purposes like bisecting
breakage. As such CodeBlockHash has all of the comparison operator overloads. When
bisecting in DFGDriver.cpp, you can now say things like:
        
if (codeBlock->hash() < CodeBlockHash("CAAAAA"))
    return false;
        
And yes, CAAAAA is near the median hash, and the largest one is smaller than E99999. Such
is life when you use base 62 to encode a 32-bit number.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CallLinkInfo.h:
(CallLinkInfo):
(JSC::CallLinkInfo::specializationKind):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::hash):
(JSC):
(JSC::CodeBlock::dumpAssumingJITType):
(JSC::CodeBlock::dump):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::resetStubInternal):
(JSC::CodeBlock::reoptimize):
(JSC::ProgramCodeBlock::jettison):
(JSC::EvalCodeBlock::jettison):
(JSC::FunctionCodeBlock::jettison):
(JSC::CodeBlock::shouldOptimizeNow):
(JSC::CodeBlock::tallyFrequentExitSites):
(JSC::CodeBlock::dumpValueProfiles):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::specializationKind):
(CodeBlock):
(JSC::CodeBlock::getJITType):
* bytecode/CodeBlockHash.cpp: Added.
(JSC):
(JSC::CodeBlockHash::CodeBlockHash):
(JSC::CodeBlockHash::dump):
* bytecode/CodeBlockHash.h: Added.
(JSC):
(CodeBlockHash):
(JSC::CodeBlockHash::CodeBlockHash):
(JSC::CodeBlockHash::hash):
(JSC::CodeBlockHash::operator==):
(JSC::CodeBlockHash::operator!=):
(JSC::CodeBlockHash::operator<):
(JSC::CodeBlockHash::operator>):
(JSC::CodeBlockHash::operator<=):
(JSC::CodeBlockHash::operator>=):
* bytecode/CodeBlockWithJITType.h: Added.
(JSC):
(CodeBlockWithJITType):
(JSC::CodeBlockWithJITType::CodeBlockWithJITType):
(JSC::CodeBlockWithJITType::dump):
* bytecode/CodeOrigin.cpp: Added.
(JSC):
(JSC::CodeOrigin::inlineDepthForCallFrame):
(JSC::CodeOrigin::inlineDepth):
(JSC::CodeOrigin::inlineStack):
(JSC::InlineCallFrame::hash):
* bytecode/CodeOrigin.h:
(InlineCallFrame):
(JSC::InlineCallFrame::specializationKind):
(JSC):
* bytecode/CodeType.cpp: Added.
(WTF):
(WTF::printInternal):
* bytecode/CodeType.h:
(WTF):
* bytecode/ExecutionCounter.cpp:
(JSC::ExecutionCounter::dump):
* bytecode/ExecutionCounter.h:
(ExecutionCounter):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::dump):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpCodeOrigin):
* dfg/DFGOSRExitCompiler.cpp:
* dfg/DFGOperations.cpp:
* dfg/DFGRepatch.cpp:
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):
(JSC::DFG::emitPutReplaceStub):
(JSC::DFG::emitPutTransitionStub):
(JSC::DFG::dfgLinkClosureCall):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::dumpCallFrame):
* jit/JITCode.cpp: Added.
(WTF):
(WTF::printInternal):
* jit/JITCode.h:
(JSC::JITCode::jitType):
(WTF):
* jit/JITDisassembler.cpp:
(JSC::JITDisassembler::dump):
(JSC::JITDisassembler::dumpForInstructions):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompilePutByVal):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompilePatchGetArrayLength):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/CodeSpecializationKind.cpp: Added.
(WTF):
(WTF::printInternal):
* runtime/CodeSpecializationKind.h:
(JSC::specializationFromIsCall):
(JSC):
(JSC::specializationFromIsConstruct):
(WTF):
* runtime/Executable.cpp:
(JSC::ExecutableBase::hashFor):
(JSC):
(JSC::NativeExecutable::hashFor):
(JSC::ScriptExecutable::hashFor):
* runtime/Executable.h:
(ExecutableBase):
(NativeExecutable):
(ScriptExecutable):
(JSC::ScriptExecutable::source):

Source/WTF: 

Reviewed by Geoffrey Garen.

Changed RawPointer to accept both const void* and void*, and use the former internally.
        
Cleaned up SHA1 so that the functionality already used internally for self-testing is
available via the API. This includes addBytes(CString) and computing hex digests.

* wtf/RawPointer.h:
(WTF::RawPointer::RawPointer):
(RawPointer):
(WTF::RawPointer::value):
* wtf/SHA1.cpp:
(WTF::expectSHA1):
(WTF::SHA1::hexDigest):
(WTF::SHA1::computeHexDigest):
* wtf/SHA1.h:
(WTF::SHA1::addBytes):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix typo in commit 136189
https://bugs.webkit.org/show_bug.cgi?id=103706

Patch by Viatcheslav Ostapenko <v.ostapenko@samsung.com> on 2012-11-29
Reviewed by Kentaro Hara.

Because of typo in commit 136189 blue color value was set twice for every pixel.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::setPixel):

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