[BlackBerry] Scroll adjustments while typing scroll off page, then bounce back.
https://bugs.webkit.org/show_bug.cgi?id=104045

Patch by Andrew Lo <anlo@rim.com> on 2012-12-04
Reviewed by Rob Buis.
Internally reviewed by Mike Fenton & Jakob Petsovits.

Internal PR253845
The main frame's view should only be temporarily set to
not constrain scrolling to the content edge while the
scroll position is set at the end of the scroll animation.

Remove ensureFocusTextElementVisible from setSpannableTextAndRelativeCursor
in InputHandler since FrameSelection::revealSelection
already implements scroll adjustments due to typing.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::zoomBlock):
(BlackBerry::WebKit::WebPagePrivate::resetBlockZoom):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
(BlackBerry::WebKit::InputHandler::setSpannableTextAndRelativeCursor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
https://bugs.webkit.org/show_bug.cgi?id=103981

Reviewed by Adam Barth.

v8NonStringValueToWebCoreString() and v8NonStringValueToAtomicWebCoreString()
are equivalent to what StringResource does.

No tests. No change in behavior.

* bindings/v8/V8Binding.cpp:
* bindings/v8/V8Binding.h:
(WebCore::toWebCoreString):
(WebCore):
(WebCore::toWebCoreStringWithNullCheck):
(WebCore::toWebCoreStringWithUndefinedOrNullCheck):
(WebCore::toWebCoreAtomicString):
(WebCore::toWebCoreAtomicStringWithNullCheck):
* bindings/v8/V8StringResource.h:
(WebCore::V8StringResource::V8StringResource):
(V8StringResource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] V8Binding::v8ExternalString() is redundant
https://bugs.webkit.org/show_bug.cgi?id=103979

Reviewed by Adam Barth.

v8String(), v8StringOrNull() and v8StringOrUndefined() are enough.
We can remove V8Binding::v8ExternalString().

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::compileAndRunScript):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::compileScript):
* bindings/v8/V8Binding.h:
(WebCore):
(WebCore::v8String):
(WebCore::v8StringOrNull):
(WebCore::v8StringOrUndefined):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[v8] Improve worker.postMessage() string performance: avoid utf8 conversion
https://bugs.webkit.org/show_bug.cgi?id=102230

Reviewed by Eric Seidel.

Source/WebCore:

Avoid utf8 conversion when serializing strings with SerializedScriptValue. Provide
Ascii and UChar writers for v8 string serialization and provide a UChar reader for
deserialization. Define/use serialization StringUCharTag to indicate UChar strings
in the wire format. Increment the SerializedScriptValue wire format version.

In the wire format, StringUCharTag is followed by the string length in bytes, then
the length/2 UChars of the string.

Note the string length is VarInt encoded. During serialization, compute the number
of bytes used to encode the length and prepend a PaddingTag if needed so the UChar
data appears on an even-byte boundary. This prevents unaligned reads of UChar data
during deserialization (the deserialization buffer is even-byte aligned).

Testing transfers of large strings to and from workers indicates a 10X improvement
in transfer rate for strings, and strings within js objects, with this change. For
example, 500 MByte/s on my test machine (50 MByte/s without this change) for flat,
32 MByte string postMessage() transfers.

Covered by platform/chromium/fast/storage/serialized-script-value.html

* bindings/v8/SerializedScriptValue.cpp:

LayoutTests:

Update serialized-script-value-expected results for the new SerializedScriptValue
wire format version. Add test cases for UChar string serialization to verify that
the UChar string data appears on an even-byte boundary in the wire format, and to
test reading string data from the previous wire format is backward-compatible.

* platform/chromium/fast/storage/serialized-script-value-expected.txt:
* platform/chromium/fast/storage/serialized-script-value.html:


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