[chromium] Remove lingering unwrap<>() calls in GraphicsLayerChromium.cpp
https://bugs.webkit.org/show_bug.cgi?id=93319

Patch by James Robinson <jamesr@chromium.org> on 2012-08-06
Reviewed by Adrienne Walker.

Source/Platform:

Adds a few more entry points to WebLayer that are being used by GraphicsLayerChromium.

* chromium/public/WebLayer.h:
(WebLayer):

Source/WebCore:

Gets rid of all (but one) of the remaining unwrap<LayerChromium>() calls in GraphicsLayer chromium to avoid
punching through the WebLayer API.  Covered by many layout tests, mostly in compositing/

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::willBeDestroyed):
(WebCore::GraphicsLayerChromium::setName):
(WebCore::GraphicsLayerChromium::updateNames):
(WebCore::GraphicsLayerChromium::setMaskLayer):
(WebCore::GraphicsLayerChromium::setReplicatedByLayer):
(WebCore::GraphicsLayerChromium::setContentsToImage):
(WebCore::GraphicsLayerChromium::setContentsToCanvas):
(WebCore::GraphicsLayerChromium::setContentsToMedia):
(WebCore::GraphicsLayerChromium::updateChildList):
(WebCore::GraphicsLayerChromium::setupContentsLayer):
* platform/graphics/chromium/GraphicsLayerChromium.h:
(GraphicsLayerChromium):

Source/WebKit/chromium:

* src/WebLayer.cpp:
(WebKit::WebLayer::setChildren):
(WebKit):
(WebKit::WebLayer::setReplicaLayer):
(WebKit::WebLayer::setDebugName):
(WebKit::WebLayer::clearRenderSurface):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Remove IDBRequest::finishCursor() and plumbing
https://bugs.webkit.org/show_bug.cgi?id=93274

Reviewed by Tony Chang.

Delete an unused flag and code for setting it, rendered obsolete in r123275.

No new tests - no functional changes.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::close):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
* Modules/indexeddb/IDBRequest.h:
(IDBRequest):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in GenericEventQueue::timerFired since the owner of GenericEventQueue is deleted during dispatching events.
https://bugs.webkit.org/show_bug.cgi?id=92946

Reviewed by Eric Carlson.

Source/WebCore:

In GenericEventQueue::timerFired(), the owner of GenericEventQueue might be deleted.
We have to protect the owner of GenericEventQueue during dispatching events.

Test: media/event-queue-crash.html

* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::timerFired): Added a protection.

LayoutTests:

* media/event-queue-crash-expected.txt: Added.
* media/event-queue-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTest: fast/forms/input-set-composition-scroll.html is failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=93320

Patch by Roger Fong <roger_fong@apple.com> on 2012-08-06
Reviewed by Tim Horton.

fast/forms/input-set-composition-scroll.html is failing after r120145
because TestInputController::setComposition() method has not been implemented.
It was added to skip list on Mac, see https://bugs.webkit.org/show_bug.cgi?id=89845 but not on Windows.

* platform/win/Skipped:
Adding test to skip list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add gyp variable to control which compositor target is depended on
https://bugs.webkit.org/show_bug.cgi?id=93165

Patch by James Robinson <jamesr@chromium.org> on 2012-08-06
Reviewed by Adam Barth.

This adds a use_libcc_for_compositor gyp variable to control whether webcore_platform links in the compositor
code from the webcore_chromium_compositor target or from cc from the chromium repo.

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebSocket.send() should accept ArrayBufferView
https://bugs.webkit.org/show_bug.cgi?id=90877

Reviewed by Kent Tamura.

Source/WebCore:

Accept ArrayBufferView as an argument of WebSocket.send() to comply with recent change
in specification: <http://html5.org/tools/web-apps-tracker?from=7084&to=7085>.

Once WebSocket.send(ArrayBuffer) was removed from the specification, but added back
in <http://html5.org/tools/web-apps-tracker?from=7202&to=7203>. Thus the functionality
of send(ArrayBuffer) is kept as-is.

Tests: http/tests/websocket/tests/hybi/send-arraybufferview.html
       http/tests/websocket/tests/hybi/workers/send-arraybufferview.html

* Modules/websockets/ThreadableWebSocketChannel.h:
Change the signature of send() to receive offset and length so the clients can send
subrange of an ArrayBuffer.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::send):
WebSocket.send(ArrayBufferView) is added, which puts the sub region of the given
ArrayBuffer into the outgoing frame queue.
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocket.idl:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
* Modules/websockets/WebSocketChannel.h:
(WebSocketChannel):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::send):
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
Send only necessary part of data to the main thread.
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WorkerThreadableWebSocketChannel):
(Bridge):
* bindings/js/JSWebSocketCustom.cpp:
(WebCore::JSWebSocket::send): Accept ArrayBufferView in send().
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::sendCallback): Ditto.

Source/WebKit/chromium:

* src/WebSocketImpl.cpp:
(WebKit::WebSocketImpl::sendArrayBuffer):
Apply change in function signature of WebSocketChannel::send().

LayoutTests:

Two tests are added to check whether WebSocket.send(ArrayBufferView) works in the
main thread and in a worker.

* http/tests/websocket/tests/hybi/send-arraybufferview-expected.txt: Added.
* http/tests/websocket/tests/hybi/send-arraybufferview.html: Added.
* http/tests/websocket/tests/hybi/workers/resources/send-arraybufferview.js: Added.
* http/tests/websocket/tests/hybi/workers/send-arraybufferview-expected.txt: Added.
* http/tests/websocket/tests/hybi/workers/send-arraybufferview.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BindingSecurity::shouldAllowAccessToFrame shouldn't use a raw boolean parameter
https://bugs.webkit.org/show_bug.cgi?id=93323

Reviewed by Eric Seidel.

As requested by Eric. This patch also renames the function to match its
counterpart in the JavaScriptCore bindings.

* bindings/generic/BindingSecurity.cpp:
(WebCore::canAccessDocument):
(WebCore::BindingSecurity::shouldAllowAccessToFrame):
(WebCore::BindingSecurity::shouldAllowAccessToNode):
(WebCore::BindingSecurity::allowSettingFrameSrcToJavascriptUrl):
* bindings/generic/BindingSecurity.h:
(BindingSecurity):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateDomainSafeFunctionGetter):
(GenerateReplaceableAttrSetter):
(GenerateFunctionCallback):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
(WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::canAccessFromCurrentOrigin):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::WindowSetTimeoutImpl):
(WebCore::V8DOMWindow::eventAccessorGetter):
(WebCore::V8DOMWindow::eventAccessorSetter):
(WebCore::V8DOMWindow::openerAccessorSetter):
(WebCore::V8DOMWindow::addEventListenerCallback):
(WebCore::V8DOMWindow::removeEventListenerCallback):
(WebCore::V8DOMWindow::showModalDialogCallback):
(WebCore::V8DOMWindow::openCallback):
(WebCore::V8DOMWindow::namedSecurityCheck):
(WebCore::V8DOMWindow::indexedSecurityCheck):
* bindings/v8/custom/V8HistoryCustom.cpp:
(WebCore::V8History::indexedSecurityCheck):
(WebCore::V8History::namedSecurityCheck):
* bindings/v8/custom/V8InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::canAccessInspectedWindow):
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::reloadAccessorGetter):
(WebCore::V8Location::replaceAccessorGetter):
(WebCore::V8Location::assignAccessorGetter):
(WebCore::V8Location::toStringCallback):
(WebCore::V8Location::indexedSecurityCheck):
(WebCore::V8Location::namedSecurityCheck):


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