Transition cti_op_throw and cti_vm_throw to a JIT operation
https://bugs.webkit.org/show_bug.cgi?id=122931

Reviewed by Filip Pizlo.

Moved cti_op_throw to operationThrow.  Made the caller responsible for jumping to the
catch handler.  Eliminated cti_op_throw_static_error, cti_vm_throw, ctiVMThrowTrampoline()
and their callers as it is now dead code.  There is some work needed on the Microsoft X86
callOperation to handle the need to provide space for structure return value.

* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_throw):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_catch):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARM64.h:
* jit/JITStubsARMv7.h:
* jit/JITStubsMIPS.h:
* jit/JITStubsMSVC64.asm:
* jit/JITStubsSH4.h:
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:
* jit/JSInterfaceJIT.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add scaffolding for IDBDatabaseBackends in Web and Database processes
https://bugs.webkit.org/show_bug.cgi?id=122971

Reviewed by Tim Horton.

This patch:
- Adds a WebProcessIDBDatabaseBackend
- Adds a DatabaseProcessIDBDatabaseBackend
- Establishes the basic messaging between them
- Actually creates those backends as the result of an indexedDB.open() call from javascript

* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:
* Platform/Logging.h:

Hook up messaging so (Web/Database)ProcessIDBDatabaseBackends can message each other:
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
(WebKit::DatabaseToWebProcessConnection::establishIDBDatabaseBackend):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
(WebKit::DatabaseToWebProcessConnection::connection):
* DatabaseProcess/DatabaseToWebProcessConnection.messages.in: Added.

DatabaseProcess side of an IDBDatabaseBackend:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.cpp:
(WebKit::DatabaseProcessIDBDatabaseBackend::DatabaseProcessIDBDatabaseBackend):
(WebKit::DatabaseProcessIDBDatabaseBackend::~DatabaseProcessIDBDatabaseBackend):
(WebKit::DatabaseProcessIDBDatabaseBackend::openConnection):
(WebKit::DatabaseProcessIDBDatabaseBackend::messageSenderConnection):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h: Added.
(WebKit::DatabaseProcessIDBDatabaseBackend::create):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.messages.in: Added.

WebProcess side of an IDBDatabaseBackend:
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp: Added.
(WebKit::generateBackendIdentifier):
(WebKit::WebProcessIDBDatabaseBackend::WebProcessIDBDatabaseBackend):
(WebKit::WebProcessIDBDatabaseBackend::~WebProcessIDBDatabaseBackend):
(WebKit::WebProcessIDBDatabaseBackend::openConnection):
(WebKit::WebProcessIDBDatabaseBackend::createObjectStore):
(WebKit::WebProcessIDBDatabaseBackend::deleteObjectStore):
(WebKit::WebProcessIDBDatabaseBackend::createTransaction):
(WebKit::WebProcessIDBDatabaseBackend::close):
(WebKit::WebProcessIDBDatabaseBackend::commit):
(WebKit::WebProcessIDBDatabaseBackend::abort):
(WebKit::WebProcessIDBDatabaseBackend::createIndex):
(WebKit::WebProcessIDBDatabaseBackend::deleteIndex):
(WebKit::WebProcessIDBDatabaseBackend::get):
(WebKit::WebProcessIDBDatabaseBackend::put):
(WebKit::WebProcessIDBDatabaseBackend::setIndexKeys):
(WebKit::WebProcessIDBDatabaseBackend::setIndexesReady):
(WebKit::WebProcessIDBDatabaseBackend::openCursor):
(WebKit::WebProcessIDBDatabaseBackend::count):
(WebKit::WebProcessIDBDatabaseBackend::deleteRange):
(WebKit::WebProcessIDBDatabaseBackend::clear):
(WebKit::WebProcessIDBDatabaseBackend::messageSenderConnection):
(WebKit::WebProcessIDBDatabaseBackend::establishDatabaseProcessBackend):
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h: Added.
(WebKit::WebProcessIDBDatabaseBackend::create):

Basic shared utilities that multiple processes will need going forward:
* Shared/Databases/IndexedDB/IDBUtilities.cpp:
(WebKit::uniqueDatabaseIdentifier):
* Shared/Databases/IndexedDB/IDBUtilities.h:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::sharedDatabaseBackendMap):
(WebKit::WebIDBFactoryBackend::open): Actually establish an IDBDatabaseBackend in the DatabaseProcess
  when indexedDB.open() is called, even if it does nothing for now.

* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Blind attempt at gtk-wk2 build fix.

* GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove PlatformCALayerMac workaround for <rdar://problem/7390716>
https://bugs.webkit.org/show_bug.cgi?id=122983

Reviewed by Simon Fraser.

Remove a workaround for a bug fixed in Lion.

* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::setSublayers):
(PlatformCALayerMac::removeAllSublayers):
(PlatformCALayerMac::adoptSublayers):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening of Apple Windows port.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove saving callFrameRegister to JITStackFrame in JITCompiler::compileFunction()
https://bugs.webkit.org/show_bug.cgi?id=122974

Reviewed by Geoffrey Garen.

Eliminated unneeded storing to JITStackFrame.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileFunction):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unnecessary check for RenderLayer and rename ensureLayer to createLayer in RenderLayerModelObject.
https://bugs.webkit.org/show_bug.cgi?id=122928

Reviewed by Darin Adler.

No new tests due to code refactoring.

RenderLayerModelObject::styleDidChange invokes the ensureLayer() only in case of !layer().
Again checking for layer existence would be deemed redundant in ensureLayer.
Replacing it with an ASSERT(!m_layer) and also renaming it to createLayer.

Blink review URL: https://codereview.chromium.org/27246003/

* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::createLayer):
(WebCore::RenderLayerModelObject::styleDidChange):
* rendering/RenderLayerModelObject.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Eliminate all ASSERT references to OBJECT_OFFSETOF(struct JITStackFrame,...) in JITStubsXXX.h.
https://bugs.webkit.org/show_bug.cgi?id=122979.

Reviewed by Michael Saboff.

* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARM64.h:
* jit/JITStubsARMv7.h:
* jit/JITStubsMIPS.h:
* jit/JITStubsSH4.h:
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:
* runtime/VM.cpp:
(JSC::VM::VM):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Comment AffineTransform::xScale() and yScale() to make their meanings clearer
https://bugs.webkit.org/show_bug.cgi?id=122981

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-10-17
Reviewed by Simon Fraser.

* platform/graphics/transforms/AffineTransform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Eliminate emitGetJITStubArg() - dead code
https://bugs.webkit.org/show_bug.cgi?id=122975

Reviewed by Anders Carlsson.

* jit/JIT.h:
* jit/JITInlines.h: Removed unused, deprecated function.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change emit_op_catch to use another method to materialize VM
https://bugs.webkit.org/show_bug.cgi?id=122977

Reviewed by Oliver Hunt.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_catch):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_catch): Use a constant. It removes our dependency
on JITStackFrame. It is also faster and simpler.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed a use of JITSTACKFRAME_ARGS_INDEX
https://bugs.webkit.org/show_bug.cgi?id=122989

Reviewed by Oliver Hunt.

* jit/JITStubCall.h: Removed an unused function. This is one step closer
to using the C stack.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: RenderMathMLFenced always has a MathMLInlineContainerElement.
<https://webkit.org/b/122986>

This renderer is never anonymous and always has a corresponding
MathMLInlineContainerElement. Overload element() with a tighter
return type.

Also marked the class FINAL and made most methods private.

Reviewed by Anders Carlsson.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove PlatformCAAnimation::supportsValueFunction()
https://bugs.webkit.org/show_bug.cgi?id=122990

Reviewed by Tim Horton.

PlatformCAAnimation::supportsValueFunction always returns true now, so there's no need for it to exist anymore.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor stored website data APIs
https://bugs.webkit.org/show_bug.cgi?id=122781

Patch by Martin Hock <mhock@apple.com> on 2013-10-17
Reviewed by Brady Eidson.

Add WebOriginDataManager along with corresponding class
WebOriginDataManagerProxy and API WKOriginDataManager.

Currently, the new files are unused.

WKOriginDataManager should subsume the functionality of:
WKApplicationCacheManager, WKCookieManager, WKDatabaseManager,
WKKeyValueStorageManager, WKMediaCacheManager,
WKPluginSiteDataManager, and WKResourceCacheManager.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetOriginDataManager):
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKOriginDataManager.cpp: Added.
(WKOriginDataManagerGetTypeID):
(WKOriginDataManagerGetOrigins):
(WKOriginDataManagerDeleteEntriesForOrigin):
(WKOriginDataManagerDeleteAllEntries):
(WKOriginDataManagerStartObservingChanges):
(WKOriginDataManagerStopObservingChanges):
(WKOriginDataManagerSetChangeClient):
* UIProcess/API/C/WKOriginDataManager.h: Added.
* UIProcess/WebOriginDataManagerProxy.cpp: Added.
(WebKit::WebOriginDataManagerProxy::supplementName):
(WebKit::WebOriginDataManagerProxy::create):
(WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy):
(WebKit::WebOriginDataManagerProxy::~WebOriginDataManagerProxy):
(WebKit::WebOriginDataManagerProxy::contextDestroyed):
(WebKit::WebOriginDataManagerProxy::processDidClose):
(WebKit::WebOriginDataManagerProxy::shouldTerminate):
(WebKit::WebOriginDataManagerProxy::refWebContextSupplement):
(WebKit::WebOriginDataManagerProxy::derefWebContextSupplement):
(WebKit::WebOriginDataManagerProxy::getOrigins):
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerProxy::deleteAllEntries):
(WebKit::WebOriginDataManagerProxy::startObservingChanges):
(WebKit::WebOriginDataManagerProxy::stopObservingChanges):
(WebKit::WebOriginDataManagerProxy::setChangeClient):
(WebKit::WebOriginDataManagerProxy::didChange):
* UIProcess/WebOriginDataManagerProxy.h: Added.
* UIProcess/WebOriginDataManagerProxy.messages.in: Added.
* UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Added.
(WebKit::WebOriginDataManagerProxyChangeClient::didChange):
* UIProcess/WebOriginDataManagerProxyChangeClient.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/OriginData/WebOriginDataManager.cpp: Added.
(WebKit::WebOriginDataManager::supplementName):
(WebKit::WebOriginDataManager::WebOriginDataManager):
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteAllEntries):
(WebKit::WebOriginDataManager::startObservingChanges):
(WebKit::WebOriginDataManager::stopObservingChanges):
* WebProcess/OriginData/WebOriginDataManager.h: Added.
* WebProcess/OriginData/WebOriginDataManager.messages.in: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Speculative buildfixes for GTK and EFL after r157582.

* CMakeLists.txt:
* GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: allow front-end to trigger the system beep sound to signal an error
https://bugs.webkit.org/show_bug.cgi?id=122955

Reviewed by Timothy Hatcher.

Source/WebCore:

New beep() method exposed on InspectorFrontendHost calling into WebCore's systemBeep().

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::beep):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:

Source/WebInspectorUI:

Provide a stub method for the new InspectorFrontendHost.beep() method.

* UserInterface/InspectorFrontendHostStub.js:
(WebInspector.InspectorFrontendHostStub.prototype.beep):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix three bugs in the equals() implementations for css gradients.
https://bugs.webkit.org/show_bug.cgi?id=122987

Reviewed by Andreas Kling.

1. Linear gradients were considered equal if the first gradient has no x and y
   position and the second has no x but does have y.
2. Same as 1, for radial gradients. (This doesn't happen in practice as
   CSSParser::parseRadialGradient rejects such input, so no test for this case.)
3. Radial gradients without x and y position weren't considered equal even if
   they were.

Source/WebCore:

* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::equals):
(WebCore::CSSRadialGradientValue::equals):

LayoutTests:

Merges https://codereview.chromium.org/26147006/

* cssom/cssvalue-comparison-expected.txt:
* cssom/cssvalue-comparison.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: RenderMathMLOperator always has a MathMLElement.
<https://webkit.org/b/122988>

Reviewed by Antti Koivisto.

The renderer is never anonymous and always has a corresponding
MathMLElement. Overload element() with a tighter return type.

Also marked the class FINAL and made most methods private.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: logged objects are highlighted in blue
https://bugs.webkit.org/show_bug.cgi?id=122897

Reviewed by Joseph Pecoraro.

Switch to using the system highlight color for the background selected messages.
Also removing SVG assets no longer needed since we won't be showing white prompt
and result icons anymore as well as a few generated canvas states.

* UserInterface/Images/UserInputPromptPreviousSelected.svg: Removed.
* UserInterface/Images/UserInputResultSelected.svg: Removed.
* UserInterface/LogContentView.css:
(.console-messages:focus .console-item.selected):
* UserInterface/Main.js:
(WebInspector._generateDisclosureTriangleImages):


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