[chromium] Transform mouse/gesture event coordinates to account for pinch-zoom in compositor.
https://bugs.webkit.org/show_bug.cgi?id=100542

Reviewed by James Robinson.

Pinch-zoom in the compositor applies a transformation that WebCore does not know about.
We need to adjust mouse and gesture event coordinates to account for this in order that
hit testing work properly for these types while zoomed.

Source/Platform:

* chromium/public/WebLayerTreeView.h:
(WebLayerTreeView):
(WebKit::WebLayerTreeView::adjustPointForZoom): Adjusts point coordinated to account for zoom in compositor.

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleInputEvent): Modified to adjoint event coordinates to account for zoom.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132927.
http://trac.webkit.org/changeset/132927
https://bugs.webkit.org/show_bug.cgi?id=100558

Compile error on Chromium builders

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::filtersCanBeComposited):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::filtersCanBeComposited):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::hasCustomFilter):
(WebCore::FilterOperations::getOutsets):
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Removed.
* platform/graphics/filters/ValidatedCustomFilterOperation.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed: Additional webgl test suppression to go along with earlier ones.
https://bugs.webkit.org/show_bug.cgi?id=100784

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Teach RenderTable how to use Vector::insert and Vector::append instead of its own custom memmove code
https://bugs.webkit.org/show_bug.cgi?id=100428

Reviewed by Julien Chaffraix.

RenderTable is now like all other clients of Vector instead of being
needlessly different. :)

insert, append and grow all use the same expandCapacity logic under the covers
and Vector::insert uses TypeOperations::moveOverlapping which should use memmove
by default for unknown types.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::splitColumn):
(WebCore::RenderTable::appendColumn):
* rendering/RenderTable.h:
(WebCore::RenderTable::ColumnStruct::ColumnStruct):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in WebProcess at com.apple.WebCore: WebCore::ResourceLoader::start
<rdar://problem/12596761> and https://webkit.org/b/100792

Reviewed by Tim Hatcher.

In release builds we can sometimes end up with a null ResourceLoader due to a race condition
with the WebProcess telling the NetworkProcess to remove a resource load at the very same time
the NetworkProcess is about to start that load.

Until we can resolve that race condition an early return will be necessary.

* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::startResourceLoad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Regression(r132887): Caused segfault in a EWK2UnitTestBase.ewk_view_text_find
https://bugs.webkit.org/show_bug.cgi?id=100781

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-30
Reviewed by Kenneth Rohde Christiansen.

Make sure we pass a pointer to zero instead of a NULL pointer
as parameter to the "text,found" in case the text could not
be found. This prevents crashing in
EWK2UnitTestBase.ewk_view_text_find when trying to dereference
the parameter pointer.

* UIProcess/efl/FindClientEfl.cpp:
(WebKit::FindClientEfl::didFailToFindString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
StylePropertySet: Convert more logic to use PropertyReference.
<http://webkit.org/b/100779>

Reviewed by Antti Koivisto.

Rewrite more of the StylePropertySet logic to use PropertyReference instead of CSSProperty.
This is cleanup before changing the internal storage layout of immutable StylePropertySet.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
* css/CSSComputedStyleDeclaration.h:
* css/CSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
* css/PropertySetCSSStyleDeclaration.h:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::appendFontLonghandValueIfExplicit):
(WebCore::StylePropertySet::fontValue):
(WebCore::StylePropertySet::get4Values):
(WebCore::StylePropertySet::getPropertyCSSValue):
(WebCore::StylePropertySet::removeProperty):
(WebCore::StylePropertySet::propertyIsImportant):
(WebCore::StylePropertySet::getPropertyShorthand):
(WebCore::StylePropertySet::isPropertyImplicit):
(WebCore::StylePropertySet::setProperty):
(WebCore::StylePropertySet::mergeAndOverrideOnConflict):
(WebCore::StylePropertySet::findPropertyIndex):
(WebCore::StylePropertySet::findMutableCSSPropertyWithID):
(WebCore::StylePropertySet::propertyMatches):
(WebCore::StylePropertySet::removeEquivalentProperties):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::PropertyReference::shorthandID):
(WebCore::StylePropertySet::PropertyReference::isImplicit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Arrays can change IndexingType in the middle of sorting
https://bugs.webkit.org/show_bug.cgi?id=100773

Reviewed by Filip Pizlo.

Instead of giving up, we just fetch the appropriate vector based on the current
IndexingType of the array.

* runtime/JSArray.cpp:
(JSC::JSArray::sortVector):
* runtime/JSObject.h:
(JSObject):
(JSC::JSObject::currentIndexingData):
(JSC::JSObject::currentRelevantLength):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
test-webkitpy: fix import of coverage so that it works in a clean install
https://bugs.webkit.org/show_bug.cgi?id=100780

Reviewed by Tony Chang.

The coverage module is written so that the parent directory needs
to be in PYTHONPATH; work around that ...

* Scripts/webkitpy/test/main_unittest.py:
(TestStubs.test_empty):
(TesterTest.test_individual_names_are_not_run_twice):
(TesterTest):
(TesterTest.integration_test_coverage_works):
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_coverage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
clean up tests for webkit-patch rebaseline* commands
https://bugs.webkit.org/show_bug.cgi?id=100793

Reviewed by Ojan Vafai.

The tests in rebaseline_unittest.py had a lot of code cloning,
and many of the tests tested whether things passed or failed by
looking at what was logged instead of what was actually done;
as a result the tests were kinda hard to understand and harder to
maintain.

This patch adds hooks to MockWeb() and MockExecutive() so we can
directly see which URLs were fetched and calls invoked, and
then reworks all of the unit tests to be easier to follow and
maintain and not sensitive to the logging. Also there were a
couple of tests that were redundant.

There are no functional changes in this patch, and I verified that
the coverage remains the same.

* Scripts/webkitpy/common/net/web_mock.py:
(MockWeb.__init__):
(MockWeb.get_binary):
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.__init__):
(MockExecutive.run_command):
(MockExecutive.kill_all):
(MockExecutive):
(MockExecutive.kill_process):
(MockExecutive.popen):
(MockExecutive.run_in_parallel):
(MockExecutive2):
(MockExecutive2.__init__):
(MockExecutive2.run_command):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(_BaseTestCase):
(_BaseTestCase.setUp):
(_BaseTestCase._expand):
(_BaseTestCase._read):
(_BaseTestCase._write):
(_BaseTestCase._zero_out_test_expectations):
(TestRebaselineTest):
(TestRebaselineTest.test_baseline_directory):
(TestRebaselineTest.test_rebaseline_updates_expectations_file_noop):
(test_rebaseline_updates_expectations_file):
(test_rebaseline_does_not_include_overrides):
(test_rebaseline_test):
(test_rebaseline_test_and_print_scm_changes):
(test_rebaseline_and_copy_test):
(test_rebaseline_and_copy_test_no_existing_result):
(test_rebaseline_and_copy_test_with_lion_result):
(test_rebaseline_and_copy_no_overwrite_test):
(test_rebaseline_test_internal_with_move_overwritten_baselines_to):
(TestRebaselineJson):
(TestRebaselineJson.setUp):
(TestRebaselineJson.tearDown):
(TestRebaselineJson.test_rebaseline_all):
(TestRebaselineJson.test_rebaseline_debug):
(TestRebaseline):
(TestRebaseline.test_tests_to_update):
(TestRebaseline.test_rebaseline):
(TestRebaseline.test_rebaseline.rebaseline_stub):
(TestRebaselineExpectations):
(TestRebaselineExpectations.setUp):
(TestRebaselineExpectations.test_rebaseline_expectations):
(TestRebaselineExpectations.test_rebaseline_expectations_noop):
(TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Sync up FeatureDefine Configuration Files
https://bugs.webkit.org/show_bug.cgi?id=100171

Reviewed by David Kilzer.

Ensure an identical FeatureDefine files across all projects. Changes:

  - ENABLE_CSS_BOX_DECORATION_BREAK should be in all
  - ENABLE_PDFKIT_PLUGIN should be in all
  - ENABLE_RESOLUTION_MEDIA_QUERY should be in all
  - ENABLE_ENCRYPTED_MEDIA should be in all
  - ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING with corrected value
  - Some alphabetical ordering cleanup

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkit-patch rebaseline*: add more helpful logging
https://bugs.webkit.org/show_bug.cgi?id=100562

Reviewed by Ojan Vafai.

This change rewires the garden-o-matic and rebaseline* commands
in webkit-patch so that --verbose propagates through all the
subcommand invocations properly, and cleans up the logging so
that you can actually tell what is happening. For now, we
leave all of the logging at the logging.DEBUG level, which
means that it gets mixed in will all the other debug logging noise
and is harder to read, but we'll fix that in subsequent patches.

* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
(BaselineOptimizer._platform):
(BaselineOptimizer._move_baselines):
(BaselineOptimizer.optimize):
* Scripts/webkitpy/tool/commands/gardenomatic.py:
(GardenOMatic.execute):
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest._copy_existing_baseline):
(RebaselineTest._rebaseline_test):
(OptimizeBaselines._optimize_baseline):
(OptimizeBaselines.execute):
(AbstractParallelRebaselineCommand._run_webkit_patch):
(AbstractParallelRebaselineCommand._rebaseline_commands):
(AbstractParallelRebaselineCommand._files_to_add):
(AbstractParallelRebaselineCommand._optimize_baselines):
(AbstractParallelRebaselineCommand._rebaseline):
(RebaselineExpectations._add_tests_to_rebaseline_for_port):
(Rebaseline.execute):
* Scripts/webkitpy/tool/servers/gardeningserver.py:
(GardeningHTTPServer.__init__):
(GardeningHTTPRequestHandler):
(GardeningHTTPRequestHandler._run_webkit_patch):
(GardeningHTTPRequestHandler.rebaselineall):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Add the ValidatedCustomFilterOperation class
https://bugs.webkit.org/show_bug.cgi?id=100558

Reviewed by Dean Jackson.

Added the ValidatedCustomFilterOperation class. The file is now almost empty,
but more is going to come in the following patches.

Added the a filter operation type VALIDATED_CUSTOM and updated the compositors to ignore
such operations for now.

No new tests, there is no new functionality yet.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::filtersCanBeComposited):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::filtersCanBeComposited):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::hasCustomFilter):
(WebCore::FilterOperations::getOutsets):
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Added.
(WebCore):
(WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::~ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::blend):
* platform/graphics/filters/ValidatedCustomFilterOperation.h: Added.
(WebCore):
(ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::create):
(WebCore::ValidatedCustomFilterOperation::affectsOpacity):
(WebCore::ValidatedCustomFilterOperation::movesPixels):
(WebCore::ValidatedCustomFilterOperation::blendingNeedsRendererSize):
(WebCore::ValidatedCustomFilterOperation::operator==):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix potential overflow in jpeg exif reader. Found by aedla@google.com.
https://bugs.webkit.org/show_bug.cgi?id=100320

Reviewed by Eric Seidel.

Adding more than 1 element past an array is undefined, so don't do it.

No test, since in practice ifd will just overflow and `end - ifd` will
become much larget than 2 and the `if (end - ifd < 2)` a few lines
down will catch that case.

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::readImageOrientation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip another failing accessibility test on Windows: accessibility/svg-remote-element.html.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Sync up FeatureDefine Configuration Files
https://bugs.webkit.org/show_bug.cgi?id=100171

Reviewed by David Kilzer.

Follow up to better coordinate with iOS feature defines. Make:

  - ENABLE_FILTERS always on
  - ENABLE_INPUT_* iphonesimulator values point to the iphoneos values

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Test should not be run on Apple Windows port: fast/images/exif-orientation-image-document.html

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Temporarily restrict use of ImageBufferSkia::copyToPlatformTexture until bugs resolved
https://bugs.webkit.org/show_bug.cgi?id=100714

Reviewed by Stephen White.

For the moment, only use ImageBuffer::copyToPlatformTexture when
copying to RGBA/UNSIGNED_BYTE textures, and document restriction
in header. Restriction will be lifted once the implementations
(currently only Chromium has one) have been fixed; see bug 100715.

No new tests; manually ran WebGL conformance test
tex-image-and-sub-image-2d-with-canvas-rgba5551.html on NVIDIA
hardware on Mac OS.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::texImage2D):
* platform/graphics/ImageBuffer.h:
(ImageBuffer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cssText for cursor property doesn't include hotspot
https://bugs.webkit.org/show_bug.cgi?id=99530

Patch by Rick Byers <rbyers@chromium.org> on 2012-10-30
Reviewed by Darin Adler.

Source/WebCore:

Implement customCssText in CSSCursorImageValue to include the hotspot when present.
Also explicitly track whether or not a hotspot was supplied in the parser,
while still using the existing convention of (-1,-1) to denote no hotspot
in the rest of the system.

Test: fast/css/cursor-parsing.html

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::customCssText):
* css/CSSCursorImageValue.h:
(CSSCursorImageValue):

LayoutTests:

Add simple test for parsing of CSS cursor property.

* fast/css/cursor-parsing-expected.txt: Added.
* fast/css/cursor-parsing.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] update form theme for BB10.
https://bugs.webkit.org/show_bug.cgi?id=100760

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-10-30
Reviewed by Rob Buis.

RIM PR:222126
Introduce slide function to paint new theme for the form controls.

No new tests.

* css/themeBlackBerry.css:
(select):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::drawControl): Added.
(WebCore::drawThreeSlice): Added.
(WebCore::drawNineSlice): Added.
(WebCore::loadImage): Added.
(WebCore::RenderThemeBlackBerry::systemFont): Modified.
(WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField): Modified.
(WebCore::RenderThemeBlackBerry::paintCheckbox): Modified.
(WebCore::RenderThemeBlackBerry::paintRadio): Modified.
(WebCore::RenderThemeBlackBerry::paintButton): Modified.
(WebCore::RenderThemeBlackBerry::paintMenuList): Modified.
(WebCore::RenderThemeBlackBerry::paintMenuListButton): Modified.
(WebCore::RenderThemeBlackBerry::paintSliderTrackRect): Modified.
(WebCore::RenderThemeBlackBerry::paintSliderThumb): Modified.
* platform/blackberry/RenderThemeBlackBerry.h:
(RenderThemeBlackBerry):

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