[chromium/mac] Delete WebImageCG.cpp
https://bugs.webkit.org/show_bug.cgi?id=92910

Reviewed by James Robinson.

It's been unused since the switch to skia.
Also remove now-unneeded *CG.cpp exclusion rule.

* WebKit.gyp:
* src/WebImageCG.cpp: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Fix lost context handling on hud layer
https://bugs.webkit.org/show_bug.cgi?id=92915

Reviewed by Adrienne Walker.

On lost context we need to release CCScopedTextures, otherwise later on
we will try to re-allocate it using a stale CCResourceProvider.

Test CCLayerTreeHostImplTest.dontUseOldResourcesAfterLostContext
extended.

Source/WebCore:

* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
(WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h:

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] TypedArray binding performance improvements
https://bugs.webkit.org/show_bug.cgi?id=92557

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

Improve TypedArray bindings performance:
- create arrays with createUninitialized when possible. Typed Array
construction is about 10% faster.
- when creating a typed array from a same typed array, memcpy data
from source to target.

In order to detect if argument array is the same type as
implementation array, we pass the javascript wrapper type as a new
type argument to template function constructWebGLArray.

Introduce wrapArrayBufferView which wraps typed array into a v8::Value

No new tests: Performance tests are already handled by
Bindings/typed-array-construct-from-same-type.html and
Bindings/typed-array-construct-from-typed.html

* bindings/v8/custom/V8ArrayBufferViewCustom.h:
(WebCore):
(WebCore::constructWebGLArray):
* bindings/v8/custom/V8Float32ArrayCustom.cpp:
(WebCore::V8Float32Array::constructorCallback):
* bindings/v8/custom/V8Float64ArrayCustom.cpp:
(WebCore::V8Float64Array::constructorCallback):
* bindings/v8/custom/V8Int16ArrayCustom.cpp:
(WebCore::V8Int16Array::constructorCallback):
* bindings/v8/custom/V8Int32ArrayCustom.cpp:
(WebCore::V8Int32Array::constructorCallback):
* bindings/v8/custom/V8Int8ArrayCustom.cpp:
(WebCore::V8Int8Array::constructorCallback):
* bindings/v8/custom/V8Uint16ArrayCustom.cpp:
(WebCore::V8Uint16Array::constructorCallback):
* bindings/v8/custom/V8Uint32ArrayCustom.cpp:
(WebCore::V8Uint32Array::constructorCallback):
* bindings/v8/custom/V8Uint8ArrayCustom.cpp:
(WebCore::V8Uint8Array::constructorCallback):
* bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
(WebCore::V8Uint8ClampedArray::constructorCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some of the test results for LayoutTests/accessibility/canvas-accessibilitynodeobject.html do not show up on Windows.
https://bugs.webkit.org/show_bug.cgi?id=92916

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

Adding a failing test result and filing a bug.

* platform/win/accessibility/canvas-accessibilitynodeobject-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove apparent merge goof from JavaScriptCore/ChangeLog

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add new CSS property "-webkit-widget-region" to expose dashboard region support for other port
https://bugs.webkit.org/show_bug.cgi?id=90298

Reviewed by Adam Barth.

.:

* configure.ac: Add ENABLE_WIDGET_REGION define.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.

Source/WebCore:

The css property "-webkit-widget-region" is essentially a synonym of
"-webkit-dashboard-region" that allows us to expose dashboard region
support for other port. This patch also adds a new feature define
ENABLE(WIDGET_REGION) such that "-webkit-dashboard-region" is only
provided under ENABLE(DASHBOARD_SUPPORT) as it is now and
"-webkit-widget-region" is only exposed under ENABLE(WIDGET_REGION).

Change almost all the code pieces guarded by ENABLE(DASHBOARD_SUPPORT)
to make them also guarded by ENABLE(WIDGET_REGION), except those
that are specific to Apple/WebKit.

Currently ENABLE(WIDGET_REGION) has been turned on by default for
Mac/WebKit and chromium ports.

Test: fast/css/widget-region-parser.html

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.
* DerivedSources.make:
* GNUmakefile.am: Add ENABLE_WIDGET_REGION define.
* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp: Handle CSSPropertyWebkitWidgetRegion.
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp: Parse "-webkit-widget-region".
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseDashboardRegions):
* css/CSSProperty.cpp: Handle CSSPropertyWebkitWidgetRegion.
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPrimitiveValue.cpp:
(WebCore):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPropertyNames.in: Add "-webkit-widget-region" property.
* css/DashboardRegion.h:
(DashboardRegion):
* css/StyleResolver.cpp: Handle CSSPropertyWebkitWidgetRegion.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore):
* dom/Document.h:
(WebCore):
(Document):
* page/Chrome.cpp:
(WebCore):
* page/ChromeClient.h:
(ChromeClient):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore):
(WebCore::FrameView::paintContents):
* page/FrameView.h:
(FrameView):
* rendering/RenderInline.cpp:
(WebCore):
* rendering/RenderInline.h:
(RenderInline):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::setHasVerticalScrollbar):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange):
(WebCore):
* rendering/RenderObject.h:
(RenderObject):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
(WebCore):
* rendering/style/RenderStyle.h:
* rendering/style/StyleDashboardRegion.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(WebCore):
(StyleRareNonInheritedData):

Source/WebKit/chromium:

* features.gypi: Add ENABLE_WIDGET_REGION define.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Add ENABLE_WIDGET_REGION define.

LayoutTests:

Added a new test to test the new CSS property.

* fast/css/widget-region-parser-expected.txt: Added.
* fast/css/widget-region-parser.html: Added.
* platform/efl/Skipped: Skip the new test.
* platform/gtk/TestExpectations: Skip the new test.
* platform/qt/Skipped: Skip the new test.
* platform/win/Skipped: Skip the new test.
* platform/wincario/Skipped: Skip the new test.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable codec tests in TestExpectations and update expected mp3 files
https://bugs.webkit.org/show_bug.cgi?id=92886

Patch by Raymond Toy <rtoy@google.com> on 2012-08-01
Reviewed by Chris Rogers.

Update expected results caused by ffmpeg now removing pre-roll samples.
* platform/chromium-linux/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav:
* platform/chromium-mac/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav:
* platform/chromium-win/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav:

Enable codec tests.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix for drawing invalid layers in WebViewBenchmarkSupportImpl
https://bugs.webkit.org/show_bug.cgi?id=92920

Patch by Daniel Murphy <dmurph@chromium.org> on 2012-08-01
Reviewed by Adrienne Walker.

The GraphicsLayers without content needed to be skipped.

* src/WebViewBenchmarkSupportImpl.cpp:
(WebKit::WebViewBenchmarkSupportImpl::acceleratedPaintUnclipped):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] factor out the optimization pass in CCRenderSurfaceFilters::apply
https://bugs.webkit.org/show_bug.cgi?id=92453

Reviewed by James Robinson.

This separates the "optimization" pass in CCRenderSurfaceFilters::apply
to resolve a succession of color matrix filters into a single operation.
This allows testing of that code.
This introduces a new generic color matrix WebFilterOperation, which can
also be used on its own.

Source/Platform:

* Platform.gypi:
* chromium/public/WebFilterOperation.h:
(WebKit::WebFilterOperation::matrix):
(WebKit::WebFilterOperation::createColorMatrixFilter):
(WebFilterOperation):
(WebKit::WebFilterOperation::WebFilterOperation):
* chromium/src/WebFilterOperation.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.h.
(WebKit):
(WebKit::WebFilterOperation::equals):
(WebKit::WebFilterOperation::WebFilterOperation):
* chromium/src/WebFilterOperations.cpp:
(WebKit::WebFilterOperations::hasFilterThatAffectsOpacity):

Source/WebCore:

New test: CCRenderSurfaceFiltersTest.

* platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
(WebCore::CCRenderSurfaceFilters::optimize):
(WebCore):
(WebCore::CCRenderSurfaceFilters::apply):
* platform/graphics/chromium/cc/CCRenderSurfaceFilters.h:
(CCRenderSurfaceFilters):

Source/WebKit/chromium:

* WebKit.gypi:
* tests/CCRenderSurfaceFiltersTest.cpp: Added.
(WebKit):
(WebKit::isCombined):
(WebKit::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Small part of "Out-of-process plug-ins should support asynchronous initialization."
<rdar://problem/10598594> and https://bugs.webkit.org/show_bug.cgi?id=92919

Reviewed by Anders Carlsson.

Add API-level preferences for:
- Is asynchronous plug-in initialization enabled.
- Is an artificial initialization delay (for testing purposes) enabled.

* Shared/WebPreferencesStore.h:
(WebKit):

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAsynchronousPluginInitializationEnabled):
(WKPreferencesGetAsynchronousPluginInitializationEnabled):
(WKPreferencesSetArtificialPluginInitializationDelayEnabled):
(WKPreferencesGetArtificialPluginInitializationDelayEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::asynchronousPluginInitializationEnabled):
(WebKit::WebPage::artificialPluginInitializationDelayEnabled):
(WebPage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Make WebKit API support draggable region change update
https://bugs.webkit.org/show_bug.cgi?id=92813

Reviewed by Adam Barth.

Source/Platform:

Add WebDraggableRegion for chromium's usage.

* Platform.gypi:

Source/WebKit/chromium:

Introduce WebDraggableRegion and delegate the draggable region update
call to the new method draggableRegionsChanged in WebViewClient.

* public/WebDocument.h:
(WebDocument):
* public/WebDraggableRegion.h: Added.
(WebKit):
(WebDraggableRegion):
* public/WebViewClient.h:
(WebViewClient):
(WebKit::WebViewClient::draggableRegionsChanged):
* src/ChromeClientImpl.cpp:
(WebKit):
(WebKit::ChromeClientImpl::dashboardRegionsChanged):
* src/ChromeClientImpl.h:
(ChromeClientImpl):
* src/WebDocument.cpp:
(WebKit::WebDocument::draggableRegions):
(WebKit):

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