Web Inspector: Associate console messages with the requests that caused them.
https://bugs.webkit.org/show_bug.cgi?id=99941

Reviewed by Pavel Feldman.

The inspector currently supports the concept of a request's "initiator"
in order to add context to console messages that are generated in
response to a specific request. The initiator is used as the message's
anchor link iff a requestID is present, and no stack trace is present.

Currently, this functionality is only exposed to three specific
callsites: 'InspectorConsoleAgent::didFinishXHRLoading',
'InspectorConsoleAgent::didReceiveResponse', and
'InspectorConsoleAgent::didFailLoading'. This patch adds a generic
mechanism to associate requests with console messages by passing the
request's identifier through 'ScriptExecutionContext::addConsoleMessage'
or 'Console::addMessage' when relevant.

This patch should have no visible changes. It just installs some new
piping, and adjusts the three methods mentioned above to use it.
Existing tests shouldn't break.

* dom/Document.cpp:
(WebCore::Document::addMessage):
* dom/Document.h:
(Document):
    Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
    through to Console::addMessage.
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::addConsoleMessage):
* dom/ScriptExecutionContext.h:
(ScriptExecutionContext):
    Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
    through to the subclass' addMessage method.
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
    Accept an unsigned long instead of a string, and move the conversion
    from WebCore request identifiers to Inspector request identifiers
    into ConsoleMessage.
* inspector/ConsoleMessage.h:
(ConsoleMessage):
    Add 'requestIdentifier' (defaulting to 0) to the
    ConsoleMessage constructor that accepts a ScriptCallStack (it was
    already part of the constructor that accepted a line number).
* inspector/IdentifiersFactory.cpp:
(WebCore::IdentifiersFactory::requestId):
    If the provided request identifier is 0, return an empty string.
    This simplifies the logic at the callsite.
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
    Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
    through to the 'ConsoleMessage' constructor after converting it to
    an internal identifier via 'IdentifiersFactor::requestId'.
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
    Use the new 'requestIdentifier' parameter on addMessageToConsole
    rather than replicating the behavior in each of these three methods.
* inspector/InspectorConsoleAgent.h:
(InspectorConsoleAgent):
    Add a 'requestIdentifier' parameter (defaulting to 0).
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
    Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
    through to lower levels of the stack.
* page/Console.cpp:
(WebCore::Console::addMessage):
* page/Console.h:
(Console):
    Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
    through to 'InspectorInstrumentation::addMessageToConsole'.
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::addMessage):
(WebCore::WorkerContext::addMessageToWorkerConsole):
* workers/WorkerContext.h:
(WorkerContext):
    Add a 'requestIdentifier' parameter (defaulting to 0), and pipe it
    through to 'InspectorInstrumentation::addMessageToConsole'.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Qt] Enable hover and mouse events in flickable WebView
https://bugs.webkit.org/show_bug.cgi?id=100296

Reviewed by Kenneth Rohde Christiansen.

Flickable WebView is now allowed to handle both hover and mouse
events. Flickable was initially meant to be the mobile interface and
was only handling touch events, but now the idea is that it will be
the WebView for both mobile and desktop environments.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize): refactored hover and mouse
event handling from children classes.
(QQuickWebViewLegacyPrivate::initialize):
(QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Add CustomFilterRenderer to reuse this class by Accelerated Compositing.
https://bugs.webkit.org/show_bug.cgi?id=98989

Patch by Huang Dongsung <luxtella@company100.net> on 2012-10-30
Reviewed by Dean Jackson.

Extract CustomFilterRenderer class from the rendering part of FECustomFilter.
FECustomFilter now plays a role in extending FilterEffect and delegates
rendering CSS Shaders to CustomFilterRenderer.

CustomFilterRenderer does not know Filter and FilterEffect. We can
create a CustomFilterRenderer instance with only GraphicsContext3D and
CustomFilterValidatedProgram. It means that Accelerated Compositing can
create the CustomFilterRenderer instance if Accelerated Compositing has
GraphicsContext3D and CustomFilterOperation, and it is already possible.

This patch prepares to enable CSS Shaders on Accelerated Compositing.

No new tests. Covered by css3/filters/custom

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/CustomFilterRenderer.cpp: Added.
(WebCore):
(WebCore::orthogonalProjectionMatrix):
(WebCore::CustomFilterRenderer::create):
(WebCore::CustomFilterRenderer::CustomFilterRenderer):
(WebCore::CustomFilterRenderer::~CustomFilterRenderer):
(WebCore::CustomFilterRenderer::premultipliedAlpha):
(WebCore::CustomFilterRenderer::programNeedsInputTexture):
(WebCore::CustomFilterRenderer::draw):
(WebCore::CustomFilterRenderer::prepareForDrawing):
(WebCore::CustomFilterRenderer::initializeCompiledProgramIfNeeded):
(WebCore::CustomFilterRenderer::initializeMeshIfNeeded):
(WebCore::CustomFilterRenderer::bindVertexAttribute):
(WebCore::CustomFilterRenderer::unbindVertexAttribute):
(WebCore::CustomFilterRenderer::bindProgramArrayParameters):
(WebCore::CustomFilterRenderer::bindProgramNumberParameters):
(WebCore::CustomFilterRenderer::bindProgramTransformParameter):
(WebCore::CustomFilterRenderer::bindProgramParameters):
(WebCore::CustomFilterRenderer::bindProgramAndBuffers):
(WebCore::CustomFilterRenderer::unbindVertexAttributes):
* platform/graphics/filters/CustomFilterRenderer.h: Copied from Source/WebCore/platform/graphics/filters/FECustomFilter.h.
(WebCore):
(CustomFilterRenderer):
  CustomFilterRenderer renders custom filters in GPU using a
  GraphicsContext3D.
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::FECustomFilter):
(WebCore::FECustomFilter::create):
(WebCore::FECustomFilter::deleteRenderBuffers):
(WebCore::FECustomFilter::drawFilterMesh):
(WebCore::FECustomFilter::prepareForDrawing):
(WebCore::FECustomFilter::applyShader):
(WebCore::FECustomFilter::resolveMultisampleBuffer):
(WebCore::FECustomFilter::resizeMultisampleBuffers):
(WebCore::FECustomFilter::resizeContext):
* platform/graphics/filters/FECustomFilter.h:
(WebCore):
(FECustomFilter):
* rendering/FilterEffectRenderer.cpp:
(WebCore::createCustomFilterEffect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Unreviewed evening gardening, skip failing tests to paint the bot green.

* platform/qt-5.0-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ensureAuxiliaryContext
https://bugs.webkit.org/show_bug.cgi?id=99975

Patch by Dan Carney <dcarney@google.com> on 2012-10-30
Reviewed by Adam Barth.

Source/WebCore:

Removed auxilliaryContext as use if it is problematic in IDB.

No new tests. No change in functionality.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::setValueReady):
* Modules/indexeddb/IDBCursor.h:
(IDBCursor):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::generateIndexKeysForValue):
(WebCore::IDBObjectStore::put):
(WebCore):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::dispatchEvent):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromScriptValueAndKeyPath):
(WebCore::deserializeIDBValue):
(WebCore::injectIDBKeyIntoScriptValue):
* bindings/v8/IDBBindingUtilities.h:
(WebCore):
* bindings/v8/V8Binding.cpp:
(WebCore::toV8Context):
(WebCore):
* bindings/v8/V8Binding.h:
(WebCore):
* bindings/v8/V8PerIsolateData.cpp:
(WebCore):
* bindings/v8/V8PerIsolateData.h:

Source/WebKit/chromium:

Updated tests to use correct v8 context.

* tests/IDBBindingUtilitiesTest.cpp:
(WebKit::checkKeyFromValueAndKeyPathInternal):
(WebKit::checkKeyPathNullValue):
(WebKit::injectKey):
(WebKit::checkInjection):
(WebKit::checkInjectionFails):
(WebKit::checkKeyPathStringValue):
(WebKit::checkKeyPathNumberValue):
(WebKit::scriptExecutionContext):
(WebKit):
(WebKit::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip new crashing tests to paint the bot green.

* platform/qt/TestExpectations:

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