[chromium] When computing surface content scale, use top level device scale
https://bugs.webkit.org/show_bug.cgi?id=92328

Reviewed by Kenneth Russell.

Previously, surface scale was calculated with layer->contentsScale(),
however this value is 1 for any layer that is not ContentLayerChromium
because of layer->needsContentsScale(). This would cause any surface
created with a non-content owner layer to look fuzzy on a high DPI
device. Fix by using the top level device scale.

Additionally, remove contentsScale from CCLayerImpl as it is no longer
used.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::pushPropertiesTo):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsInternal):
(WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Remove synchronous spellchecking code
https://bugs.webkit.org/show_bug.cgi?id=92415

Removing synchronous spellchecking code path.

Patch by Nima Ghanavatian <nghanavatian@rim.com> on 2012-07-26
Reviewed by Rob Buis.

Internally reviewed by Mike Fenton.

* Api/WebPageClient.h:
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::checkSpellingOfString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] Initial size of canvas can be larger than MAX_VIEWPORT_DIMS.
https://bugs.webkit.org/show_bug.cgi?id=91976

Reviewed by Kenneth Russell.

From section 2.2 of the spec the WebGL implementation says initial size of
the canvas can be larger than MAX_VIEWPORT_DIMS. With the current WebGL
implementation, we get error when initial size if greater than MAX_VIEWPORT_DIMS.
This change limits the width and height of drawingbuffer to MAX_VIEWPORT_DIMS
when given initial size exceeds it.

Source/WebCore:

Added tests to LayoutTests/fast/canvas/webgl/drawingbuffer-test.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
(WebCore::WebGLRenderingContext::initializeNewContext):
(WebCore::WebGLRenderingContext::markContextChanged):

LayoutTests:

* fast/canvas/webgl/drawingbuffer-test-expected.txt:
* fast/canvas/webgl/drawingbuffer-test.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSObject::reallocateStorageIfNecessary is neither used nor defined
https://bugs.webkit.org/show_bug.cgi?id=92417

Reviewed by Mark Rowe.

* runtime/JSObject.h:
(JSObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added binding and updated chromium tests.

[CSS Filters] Add V8 binding for WebKitCSSFilterValue
https://bugs.webkit.org/show_bug.cgi?id=92391

Patch by Max Vujovic <mvujovic@adobe.com> on 2012-07-26
Reviewed by Adam Barth.

Source/WebCore:

No new tests. This fixes test cases in:
    platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt
    platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt
    platform/chromium/css3/filters/filter-property-computed-style-expected.txt
    platform/chromium/css3/filters/filter-property-parsing-expected.txt

* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::toV8):

LayoutTests:

* platform/chromium-linux/css3/filters/custom/custom-filter-property-computed-style-expected.txt:
Removed. The chromium-linux expectations are (and were) exactly the same as the chromium expectations.
* platform/chromium-linux/css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt:
Removed. Ditto.
* platform/chromium-linux/css3/filters/custom/custom-filter-property-parsing-expected.txt:
Removed. Ditto.
* platform/chromium/css3/filters/custom/custom-filter-property-computed-style-expected.txt:
Many test cases are now expected to pass instead of fail.
* platform/chromium/css3/filters/custom/custom-filter-property-parsing-expected.txt:
Ditto.
* platform/chromium/css3/filters/filter-property-computed-style-expected.txt:
Removed. We can use the platform-independent results now.
* platform/chromium/css3/filters/filter-property-parsing-expected.txt:
Many test cases are now expected to pass instead of fail.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
constructing TypedArray from another TypedArray is slow
https://bugs.webkit.org/show_bug.cgi?id=90838

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-26
Reviewed by Kenneth Russell.

PerformanceTests:

* Bindings/typed-array-construct-from-same-type.html: Added.
* Bindings/typed-array-construct-from-typed.html: Added.

Source/WebCore:

When constructing a typed array from an array like element, try to
determine if the argument is a typed array. If so, cast the argument
to a typed array, and read each element with .item() method. That
avoid reading the value as a JSValue, and speedups construction by
approximatively 3x (even 30x if TypedArrays are both the same type).

In order to achieve that, we use virtual getType method. We can use
this information to cast the TypedArray to the actual type, and then
read the values from the source.

Introduce constructArrayBufferViewWithTypedArrayArgument template
function which returns a new typed array if first argument is a typed
array, or 0 otherwise.

This patch also replaces previous is<Type>Array() calls with new
getType method.

* bindings/js/JSArrayBufferViewHelper.h:
(WebCore::constructArrayBufferViewWithTypedArrayArgument):
(WebCore):
(WebCore::constructArrayBufferView):
* bindings/v8/SerializedScriptValue.cpp:
* html/canvas/DataView.h:
(DataView):
(WebCore::DataView::getType):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::readPixels):
(WebCore::WebGLRenderingContext::validateTexFuncData):
* page/Crypto.cpp:

Source/WTF:

Introduce virtual method getType on ArrayBufferView. It returns the actual
type of the view. This method replaces previous is<Type>Array() methods.

* wtf/ArrayBufferView.h:
* wtf/Float32Array.h:
(WTF::Float32Array::getType):
(Float32Array):
* wtf/Float64Array.h:
(WTF::Float64Array::getType):
(Float64Array):
* wtf/Int16Array.h:
(WTF::Int16Array::getType):
(Int16Array):
* wtf/Int32Array.h:
(WTF::Int32Array::getType):
(Int32Array):
* wtf/Int8Array.h:
(WTF::Int8Array::getType):
(Int8Array):
* wtf/IntegralTypedArrayBase.h:
* wtf/TypedArrayBase.h:
(TypedArrayBase):
(WTF::TypedArrayBase::item):
* wtf/Uint16Array.h:
(WTF::Uint16Array::getType):
(Uint16Array):
* wtf/Uint32Array.h:
(WTF::Uint32Array::getType):
(Uint32Array):
* wtf/Uint8Array.h:
(WTF::Uint8Array::getType):
(Uint8Array):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::getType):
(Uint8ClampedArray):

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