[chromium] Move ubercomp quads back into CC
https://bugs.webkit.org/show_bug.cgi?id=93062

Patch by Alexandre Elias <aelias@google.com> on 2012-08-03
Reviewed by James Robinson.

Because GTFO is almost done, we can move back the quad types
to CC and pickle them there.  This patch moves everything back
to where it was before and changes types like WebRect to IntRect.

As a bonus, I also added CCRenderPassDrawQuad and CCYUVVideoDrawQuad
(which had been left in the CC files) to CCDrawQuad::size(), so now
every quad type is ready for serialization.

Source/Platform:

* Platform.gypi:
* chromium/public/WebCompositorCheckerboardQuad.h: Removed.
* chromium/public/WebCompositorDebugBorderQuad.h: Removed.
* chromium/public/WebCompositorIOSurfaceQuad.h: Removed.
* chromium/public/WebCompositorQuad.h: Removed.
* chromium/public/WebCompositorSharedQuadState.h: Removed.
* chromium/public/WebCompositorSolidColorQuad.h: Removed.
* chromium/public/WebCompositorStreamVideoQuad.h: Removed.
* chromium/public/WebCompositorTextureQuad.h: Removed.
* chromium/public/WebCompositorTileQuad.h: Removed.

Source/WebCore:

No new tests (no-op refactoring).

* WebCore.gypi:
* platform/chromium/support/WebCompositorStreamVideoQuad.cpp: Removed.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawQuad):
* platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCQuadSink.h.
(WebCore):
(WebCore::CCCheckerboardDrawQuad::create):
(WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad):
(WebCore::CCCheckerboardDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h:
(WebCore):
(CCCheckerboardDrawQuad):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorDebugBorderQuad.cpp.
(WebCore):
(WebCore::CCDebugBorderDrawQuad::create):
(WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
(WebCore::CCDebugBorderDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
(WebCore):
(CCDebugBorderDrawQuad):
(WebCore::CCDebugBorderDrawQuad::color):
(WebCore::CCDebugBorderDrawQuad::width):
* platform/graphics/chromium/cc/CCDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorQuad.cpp.
(WebCore):
(WebCore::CCDrawQuad::CCDrawQuad):
(WebCore::CCDrawQuad::opaqueRect):
(WebCore::CCDrawQuad::setQuadVisibleRect):
(WebCore::CCDrawQuad::size):
(WebCore::CCDrawQuad::setSharedQuadState):
* platform/graphics/chromium/cc/CCDrawQuad.h:
(WebCore):
(CCDrawQuad):
(WebCore::CCDrawQuad::quadRect):
(WebCore::CCDrawQuad::quadTransform):
(WebCore::CCDrawQuad::visibleContentRect):
(WebCore::CCDrawQuad::scissorRect):
(WebCore::CCDrawQuad::opacity):
(WebCore::CCDrawQuad::needsBlending):
(WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
(WebCore::CCDrawQuad::quadVisibleRect):
(WebCore::CCDrawQuad::isDebugQuad):
(WebCore::CCDrawQuad::material):
(WebCore::CCDrawQuad::sharedQuadState):
(WebCore::CCDrawQuad::sharedQuadStateId):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
(WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorIOSurfaceQuad.cpp.
(WebCore):
(WebCore::CCIOSurfaceDrawQuad::create):
(WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
(WebCore::CCIOSurfaceDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
(WebCore):
(CCIOSurfaceDrawQuad):
(WebCore::CCIOSurfaceDrawQuad::ioSurfaceSize):
(WebCore::CCIOSurfaceDrawQuad::ioSurfaceTextureId):
(WebCore::CCIOSurfaceDrawQuad::orientation):
* platform/graphics/chromium/cc/CCQuadCuller.h:
(CCQuadCuller):
* platform/graphics/chromium/cc/CCQuadSink.h:
(WebCore):
(CCQuadSink):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
(WebCore::CCRenderPassDrawQuad::create):
(WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
(WebCore::CCRenderPassDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
(CCRenderPassDrawQuad):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorSharedQuadState.cpp.
(WebCore):
(WebCore::CCSharedQuadState::CCSharedQuadState):
(WebCore::CCSharedQuadState::create):
(WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
* platform/graphics/chromium/cc/CCSharedQuadState.h:
(WebCore):
(CCSharedQuadState):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorSolidColorQuad.cpp.
(WebCore):
(WebCore::CCSolidColorDrawQuad::create):
(WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
(WebCore::CCSolidColorDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
(WebCore):
(CCSolidColorDrawQuad):
(WebCore::CCSolidColorDrawQuad::color):
* platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorCheckerboardQuad.cpp.
(WebCore):
(WebCore::CCStreamVideoDrawQuad::create):
(WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
(WebCore::CCStreamVideoDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h:
(WebCore):
(CCStreamVideoDrawQuad):
(WebCore::CCStreamVideoDrawQuad::textureId):
(WebCore::CCStreamVideoDrawQuad::matrix):
* platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorTextureQuad.cpp.
(WebCore):
(WebCore::CCTextureDrawQuad::create):
(WebCore::CCTextureDrawQuad::CCTextureDrawQuad):
(WebCore::CCTextureDrawQuad::setNeedsBlending):
(WebCore::CCTextureDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCTextureDrawQuad.h:
(WebCore):
(CCTextureDrawQuad):
(WebCore::CCTextureDrawQuad::uvRect):
(WebCore::CCTextureDrawQuad::resourceId):
(WebCore::CCTextureDrawQuad::premultipliedAlpha):
(WebCore::CCTextureDrawQuad::flipped):
* platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Renamed from Source/WebCore/platform/chromium/support/WebCompositorTileQuad.cpp.
(WebCore):
(WebCore::CCTileDrawQuad::create):
(WebCore::CCTileDrawQuad::CCTileDrawQuad):
(WebCore::CCTileDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCTileDrawQuad.h:
(WebCore):
(CCTileDrawQuad):
(WebCore::CCTileDrawQuad::resourceId):
(WebCore::CCTileDrawQuad::textureOffset):
(WebCore::CCTileDrawQuad::textureSize):
(WebCore::CCTileDrawQuad::textureFilter):
(WebCore::CCTileDrawQuad::swizzleContents):
(WebCore::CCTileDrawQuad::leftEdgeAA):
(WebCore::CCTileDrawQuad::topEdgeAA):
(WebCore::CCTileDrawQuad::rightEdgeAA):
(WebCore::CCTileDrawQuad::bottomEdgeAA):
(WebCore::CCTileDrawQuad::isAntialiased):
* platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp:
(WebCore::CCYUVVideoDrawQuad::create):
(WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
(WebCore::CCYUVVideoDrawQuad::materialCast):
* platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h:
(CCYUVVideoDrawQuad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Move some WebContext messages to WebProcessProxy
        https://bugs.webkit.org/show_bug.cgi?id=93046

        Reviewed by Anders Carlsson.

        * UIProcess/WebContext.cpp: (WebKit::WebContext::didReceiveSyncMessage): Unrelated
        fix - use actual process argument instead of second-guessing where the message came
        from.

        * UIProcess/WebContext.h: (WebKit::WebContext::historyClient): Expose history client,
        since WebProcessProxy now needs it.

        * UIProcess/WebContext.messages.in:
        * UIProcess/WebProcessProxy.cpp:
        (WebKit::WebProcessProxy::didNavigateWithNavigationData):
        (WebKit::WebProcessProxy::didPerformClientRedirect):
        (WebKit::WebProcessProxy::didPerformServerRedirect):
        (WebKit::WebProcessProxy::didUpdateHistoryTitle):
        * UIProcess/WebProcessProxy.h:
        * UIProcess/WebProcessProxy.messages.in:
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::updateGlobalHistory):
        (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
        (WebKit::WebFrameLoaderClient::setTitle):
        Move the messages.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: eliminate visitBaseClass method from NMI. It introduces unnecessary complexity.
https://bugs.webkit.org/show_bug.cgi?id=93129

Reviewed by Yury Semikhatsky.

Source/WebCore:

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
(WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
* dom/CharacterData.cpp:
(WebCore::CharacterData::reportMemoryUsage):
* dom/ContainerNode.h:
(WebCore::ContainerNode::reportMemoryUsage):
* dom/Document.cpp:
(WebCore::Document::reportMemoryUsage):
* dom/Element.h:
(WebCore::Element::reportMemoryUsage):
* dom/MemoryInstrumentation.h:
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):

Source/WebKit/chromium:

* tests/MemoryInstrumentationTest.cpp:
(WebCore::InstrumentedWithOwnPtr::reportMemoryUsage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove v8StringToAtomicWebCoreString()
https://bugs.webkit.org/show_bug.cgi?id=93086

Reviewed by Dimitri Glazkov.

There should be only one API that converts V8 String to
AtomicString. v8ValueToAtomicWebCoreString() does it.
We can remove v8StringToAtomicWebCoreString().

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
(WebCore::v8ValueToAtomicWebCoreString):
* bindings/v8/V8Binding.h:
(WebCore):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::getter):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::namedPropertyGetter):
* bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
(WebCore::V8HTMLAllCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLCollectionCustom.cpp:
(WebCore::V8HTMLCollection::namedPropertyGetter):
* bindings/v8/custom/V8HTMLFormElementCustom.cpp:
(WebCore::V8HTMLFormElement::namedPropertyGetter):
* bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp:
(WebCore::V8HTMLFrameSetElement::namedPropertyGetter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] There's no way to test the gesture tap on WTR
https://bugs.webkit.org/show_bug.cgi?id=92895

Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Add an instance of QtViewportHandler to QQuickWebViewPrivate, so it's
now available on mobile and desktop modes, as a side effect gesture tap
events can now be created and sent to WebCore.

This is needed to test tap gestures and to get tap gestures working
when you have a WebView (in desktop mode) on notebooks equipped with
touch screens.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::onComponentComplete):
(QQuickWebViewFlickablePrivate::onComponentComplete): Implementation
moved to QQuickWebViewPrivate::onComponentComplete.
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate):
(QQuickWebViewFlickablePrivate):

Tools:

WTR doesn't create the QQuickItem from C++, not from QML, so a call
to componentComplete() was added to mimic the QML behaviour.

* WebKitTestRunner/qt/PlatformWebViewQt.cpp:
(WTR::PlatformWebView::PlatformWebView):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in Notification when setting a non-object as an event listener (91881)
https://bugs.webkit.org/show_bug.cgi?id=91881
<rdar://problem/11923341>

Reviewed by Oliver Hunt.

Source/WebCore:

Check to make sure that the value being retrieved is an object. This is similar
to the isObject() check done in the bindings code.

Test: fast/notifications/notifications-event-listener-crash.html

* bindings/js/Dictionary.h:
(WebCore::Dictionary::getEventListener):

LayoutTests:

* fast/notifications/notifications-event-listener-crash-expected.txt: Added.
* fast/notifications/notifications-event-listener-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove v8StringToWebCoreString()
https://bugs.webkit.org/show_bug.cgi?id=93087

Reviewed by Adam Barth.

There should be only one API that converts V8 String
to WebCore String. v8ValueToWebCoreString() does it.
We can remove v8StringToWebCoreString().

No tests. No change in behavior.

* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
* bindings/v8/V8Binding.cpp:
(WebCore::v8ValueToWebCoreString):
* bindings/v8/V8Binding.h:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] MediaStream API: Add MockWebRTCPeerConnectionHandler
https://bugs.webkit.org/show_bug.cgi?id=93091

Reviewed by Adam Barth.

Add a skeleton MockWebRTCPeerConnectionHandler to DumpRenderTree,
to complete the infrastructure for RTCPeerConnection.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp:
(MockWebKitPlatformSupport::createRTCPeerConnectionHandler):
* DumpRenderTree/chromium/MockWebKitPlatformSupport.h:
(MockWebKitPlatformSupport):
* DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
* DumpRenderTree/chromium/MockWebMediaStreamCenter.h:
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h.
(MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
(MockWebRTCPeerConnectionHandler::initialize):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h.
(WebKit):
(MockWebRTCPeerConnectionHandler):
(MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Implement v8Undefined()
https://bugs.webkit.org/show_bug.cgi?id=93093

Reviewed by Adam Barth.

There are a couple of equivalent ways to create an undefined value,
e.g. v8::Undefined(), v8::Undefined(isolate), v8::Handle<v8::Value>(), etc.
We should implement v8Undefined() and use it everywhere.

In this bug, we implement v8Undefined() and use it in CodeGeneratorV8.pm.
We can implement v8Undefined() like this:

    v8::Handle<v8::Value> v8Undefined() { v8::Handle<v8::Value>(); }

This is based on the following performance results:

// 14.5 ns
v8::Handle<v8::Value> xxxAttrGetter(..., info) {
    return v8::Undefined();
}

// 8.24 ns (This cannot be used where isolate can be 0.)
v8::Handle<v8::Value> xxxAttrGetter(..., info) {
    return v8::Undefined(info.GetIsolate());
}

// 8.54 ns
v8::Handle<v8::Value> xxxAttrGetter(..., info) {
    v8::Isolate* isolate = info.GetIsolate();
    return isolate ? v8::Handle<v8::Value>(v8::Undefined(isolate)) : v8::Handle<v8::Value>();
}

// 8.52 ns
v8::Handle<v8::Value> xxxAttrGetter(..., info) {
    return v8::Handle<v8::Value>();
}

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateConstructorGetter):
(GenerateNormalAttrGetter):
(GenerateNewFunctionTemplate):
(GenerateEventListenerCallback):
(GenerateFunctionCallback):
(GenerateCallWith):
(GenerateParametersCheck):
(GenerateEventConstructorCallback):
(GenerateNonStandardFunction):
(GenerateImplementation):
(NativeToJSValue):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::ConfigureV8Float64ArrayTemplate):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
(WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
(WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
(WebCore::ConfigureV8TestActiveDOMObjectTemplate):
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::constructorCallback):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::TestEventTargetV8Internal::addEventListenerCallback):
(WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
(WebCore::ConfigureV8TestEventTargetTemplate):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalMethod1Callback):
(WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
(WebCore::TestInterfaceV8Internal::supplementalMethod4Callback):
(WebCore::ConfigureV8TestInterfaceTemplate):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
(WebCore::TestObjV8Internal::withScriptStateAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
(WebCore::TestObjV8Internal::cachedAttribute1AttrGetter):
(WebCore::TestObjV8Internal::cachedAttribute2AttrGetter):
(WebCore::TestObjV8Internal::TestObjConstructorGetter):
(WebCore::TestObjV8Internal::voidMethodCallback):
(WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
(WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
(WebCore::TestObjV8Internal::serializedValueCallback):
(WebCore::TestObjV8Internal::idbKeyCallback):
(WebCore::TestObjV8Internal::optionsObjectCallback):
(WebCore::TestObjV8Internal::methodWithExceptionCallback):
(WebCore::TestObjV8Internal::addEventListenerCallback):
(WebCore::TestObjV8Internal::removeEventListenerCallback):
(WebCore::TestObjV8Internal::withScriptStateVoidCallback):
(WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
(WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback):
(WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
(WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
(WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
(WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
(WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
(WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
(WebCore::TestObjV8Internal::methodWithCallbackArgCallback):
(WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
(WebCore::TestObjV8Internal::methodWithCallbackAndOptionalArgCallback):
(WebCore::TestObjV8Internal::conditionalMethod2Callback):
(WebCore::TestObjV8Internal::conditionalMethod3Callback):
(WebCore::TestObjV8Internal::overloadedMethod1Callback):
(WebCore::TestObjV8Internal::overloadedMethod2Callback):
(WebCore::TestObjV8Internal::overloadedMethod3Callback):
(WebCore::TestObjV8Internal::overloadedMethod4Callback):
(WebCore::TestObjV8Internal::overloadedMethod5Callback):
(WebCore::TestObjV8Internal::overloadedMethod6Callback):
(WebCore::TestObjV8Internal::overloadedMethod7Callback):
(WebCore::TestObjV8Internal::overloadedMethod8Callback):
(WebCore::TestObjV8Internal::overloadedMethod9Callback):
(WebCore::TestObjV8Internal::overloadedMethod10Callback):
(WebCore::TestObjV8Internal::classMethodCallback):
(WebCore::TestObjV8Internal::overloadedMethod11Callback):
(WebCore::TestObjV8Internal::overloadedMethod12Callback):
(WebCore::TestObjV8Internal::classMethodWithClampCallback):
(WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
(WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
(WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
(WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
(WebCore::TestObjV8Internal::convert1Callback):
(WebCore::TestObjV8Internal::convert2Callback):
(WebCore::TestObjV8Internal::convert3Callback):
(WebCore::TestObjV8Internal::convert4Callback):
(WebCore::TestObjV8Internal::convert5Callback):
(WebCore::TestObjV8Internal::orangeCallback):
(WebCore::ConfigureV8TestObjTemplate):
(WebCore::V8TestObj::installPerContextProperties):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
(WebCore::TestSerializedScriptValueInterfaceV8Internal::multiTransferListCallback):
(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
* bindings/v8/V8Binding.h:
(WebCore::v8Undefined):
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove unused methods in V8Proxy
https://bugs.webkit.org/show_bug.cgi?id=93106

Reviewed by Adam Barth.

In preparation for removing V8Proxy, we can remove unused methods in V8Proxy.

No tests. No change in behavior.

* bindings/v8/V8Proxy.h:
(V8Proxy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash when a clip path referencing a clip path changes documents
https://bugs.webkit.org/show_bug.cgi?id=93023

Reviewed by Dirk Schulze.

Source/WebCore: 

The SVGClipPathElement is set to not need pending resource handling,
when in fact it can have pending resources. The result is a crash when
the element is moved to a new document (which deletes all resources
and leaves them pending) and then immediately deleted (which asserts
that there are no pending resources). There is code to remove pending
resources upon deletion and removal from the DOM, but it was not
executing for clips because of the aforementioned code claiming that
clips don't require such handling.

The assertion that there be no pending resources is necessary to
prevent caches of pending resources from trying to access the deleted
element.

This change removes the check for needsPendingResourceHandling in
SVGStyledElement upon deletion and removal from the DOM. Pending resources
will always be checked in such cases to ensure we do not introduce
security issues.

Test: svg/custom/clip-path-document-change-assert.html

* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::~SVGStyledElement): Removed needsPendingResourceHandling in the conditional to clean up resources.
(WebCore::SVGStyledElement::removedFrom): Removed needsPendingResourceHandling in the conditional to clean up resources.

LayoutTests: 

Test that asserts in debug DRT without this change. Any attempt to
delete a clip that references another clip after changing the document
results in a crash.

* svg/custom/clip-path-document-change-assert-expected.txt: Added.
* svg/custom/clip-path-document-change-assert.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add a test to WebFrameTest for selectRange and visiblePositionForWindowPoint.
https://bugs.webkit.org/show_bug.cgi?id=93108

Patch by Oli Lan <olilan@chromium.org> on 2012-08-03
Reviewed by Adam Barth.

Adds a new test WebFrameTest.SelectRange. This tests WebFrameImpl::selectRange, and also
serves to test WebFrameImpl::visiblePositionForWindowPoint as it is used by selectRange.

The test uses sample files that contain selected text on load. The test uses
WebViewImpl::selectionBounds to retrieve the ends of the selection, then unselects
and calls WebFrameImpl::selectRange to attempt to reselect the same text.

Three cases are tested: the normal case, the case where the selected text is offscreen
due to a scroll, and the case where the selected text is in an iframe. This allows the
problem cases and fix in https://bugs.webkit.org/show_bug.cgi?id=79117 to be tested.

* tests/WebFrameTest.cpp:
* tests/data/select_range_basic.html: Added.
* tests/data/select_range_iframe.html: Added.
* tests/data/select_range_scroll.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid dispatching gesture events of unknown types
https://bugs.webkit.org/show_bug.cgi?id=93060

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

WebCore gesture events do not always correspond 1-to-1 to the Platform gesture events. So
avoid dispatching the unknown gesture events to nodes.

* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Add an IsExecutionTerminating() check to setDOMException()
https://bugs.webkit.org/show_bug.cgi?id=93101

Reviewed by Adam Barth.

In preparation for moving exception related code from V8Proxy to V8Binding,
I am going to remove throwError(ExceptionCode, v8::Isolate*) from V8Proxy.
throwError(ExceptionCode, v8::Isolate*) will be replaced with
setDOMException(ExceptionCode, v8::Isolate*). By this refactoring,
the way to throw JavaScript errors and DOM exceptions becomes simple:
"Throw JavaScript errors by throwError(). Throw DOM exceptions by setDOMException()".
(Currently some DOM exceptions are being thrown by throwError().)

To keep the current behavior of throwError(ExceptionCode, v8::Isolate*),
before the replacement, we need to insert the IsExecutionTerminating()
check to setDOMException(). This will add an extra check to the current
setDOMException(), but I don't think it's a problem.

No tests. No change in behavior.

* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::setDOMException):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Limited the number of queried cached build infos in URLs used by Garden-o-matic.
https://bugs.webkit.org/show_bug.cgi?id=92992.

Patch by Ádám Kallai <kadam@inf.u-szeged.hu> on 2012-08-03
Reviewed by Adam Barth.

I added a limit to the cached builds that are included in the URL to avoid too long URLs in Garden-o-matic.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders.js:
(.):
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Blocking a plugin via CSP should result in one (and only one) console message.
https://bugs.webkit.org/show_bug.cgi?id=92649

Patch by Mike West <mkwst@chromium.org> on 2012-08-03
Reviewed by Adam Barth.

Source/WebCore:

Currently, blocking a plugin via Content Security Policy results in some
leakage of console log messages between tests. I'm unclear as to the
root cause, but the symptoms exhibited include
`SubframeLoader::requestPlugin` being called multiple times for a single
element, which in turn causes multiple console logs to be sent. These
messages tend to appear in the subsequent test, making the
`http/test/security/contentSecurityPolicy/object-src-*` set of tests
flakey indeed.

This patch addresses the issue by marking elements' plugins as
unavailable when they're blocked by CSP. No new tests have been added:
this patch should simply make the current tests actually pass.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestPlugin):
    We check the CSP status in `SubframeLoader::loadPlugin`, which is
    called at the end of this function. Checking CSP status in both
    locations is redundant.
(WebCore::SubframeLoader::loadPlugin):
    If the plugin is blocked by CSP, tell the element's embedded object
    renderer that the plugin is unavailable.
* platform/LocalizedStrings.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/LocalizedStrings.h:
(WebCore):
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
    Return appropriate text when the plugin is blocked by CSP.

Source/WebKit/chromium:

* src/LocalizedStrings.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
    Adding a stub for the newly added string.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, adding self to committers.py after becoming committer.

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-08-03

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Create and interface for TextEditor
https://bugs.webkit.org/show_bug.cgi?id=93126

Patch by Jan Keromnes <janx@linux.com> on 2012-08-03
Reviewed by Pavel Feldman.

For more extensibility, TextEditor needs to be an interface that other
classes can implement, e.g. the new class DefaultTextEditor.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.set mimeType):
(WebInspector.TextEditor.prototype.setReadOnly):
(WebInspector.TextEditor.prototype.readOnly):
(WebInspector.TextEditor.prototype.defaultFocusedElement):
(WebInspector.TextEditor.prototype.revealLine):
(WebInspector.TextEditor.prototype.addDecoration):
(WebInspector.TextEditor.prototype.removeDecoration):
(WebInspector.TextEditor.prototype.markAndRevealRange):
(WebInspector.TextEditor.prototype.highlightLine):
(WebInspector.TextEditor.prototype.clearLineHighlight):
(WebInspector.TextEditor.prototype.freeCachedElements):
(WebInspector.TextEditor.prototype.elementsToRestoreScrollPositionsFor):
(WebInspector.TextEditor.prototype.inheritScrollPositions):
(WebInspector.TextEditor.prototype.beginUpdates):
(WebInspector.TextEditor.prototype.endUpdates):
(WebInspector.TextEditor.prototype.onResize):
(WebInspector.TextEditor.prototype._textChanged):
(WebInspector.TextEditor.prototype.editRange):
(WebInspector.TextEditor.prototype.scrollToLine):
(WebInspector.TextEditor.prototype.selection):
(WebInspector.TextEditor.prototype.lastSelection):
(WebInspector.TextEditor.prototype.setSelection):
(WebInspector.TextEditor.prototype.setText):
(WebInspector.TextEditor.prototype.text):
(WebInspector.TextEditor.prototype.range):
(WebInspector.TextEditor.prototype.line):
(WebInspector.TextEditor.prototype.get linesCount):
(WebInspector.TextEditor.prototype.setAttribute):
(WebInspector.TextEditor.prototype.getAttribute):
(WebInspector.TextEditor.prototype.removeAttribute):
(WebInspector.TextEditor.prototype.wasShown):
(WebInspector.TextEditor.prototype._handleFocused):
(WebInspector.TextEditor.prototype.willHide):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] InspectorOverlay class duplicated in WebCore
https://bugs.webkit.org/show_bug.cgi?id=93124

Reviewed by Rob Buis.

Changed namespace of InspectorOverlay from WebCore to
BlackBerry::WebKit

* Api/WebPage.cpp:
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/InspectorClientBlackBerry.h:
* WebCoreSupport/InspectorOverlay.cpp:
(BlackBerry::WebKit::InspectorOverlay::create):
(BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
(BlackBerry::WebKit::InspectorOverlay::paintContents):
(BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
(BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
(BlackBerry::WebKit::InspectorOverlay::contentsVisible):
(BlackBerry::WebKit::InspectorOverlay::update):
* WebCoreSupport/InspectorOverlay.h:
(WebKit):
(InspectorOverlayClient):
(InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Add stubs for the find-in-page match rects API
https://bugs.webkit.org/show_bug.cgi?id=93110

Reviewed by Adam Barth.

The Android port allows tapping on the find-in-page result tickmarks taking
the user to the corresponding matches. This patch introduces stubs for the
new required methods in order to achieve WebKit API compatibility for this
port as soon as possible. The implementation of these methods will be added
later in https://bugs.webkit.org/show_bug.cgi?id=93111.

* public/WebFrame.h:
(WebKit):
(WebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::findMatchMarkersVersion):
(WebKit):
(WebKit::WebFrameImpl::activeFindMatchRect):
(WebKit::WebFrameImpl::findMatchRects):
(WebKit::WebFrameImpl::selectNearestFindMatch):
* src/WebFrameImpl.h:
(WebFrameImpl):


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