[Chromium] Unreviewed build fix after r124879.

Patch by Florin Malita <fmalita@chromium.org> on 2012-08-07

* WebCore.gypi: Remove deleted file references.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix GTK+ build with GTK2 after r120918.

* tests/testwebview.c:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Reuse precompiled shaders across elements
https://bugs.webkit.org/show_bug.cgi?id=88427

Reviewed by Dean Jackson.

Source/WebCore:

Added CustomFilterProgramInfo as a link between the CustomFilterProgram and the CustomFilterCompiledProgram.
CustomFilterGlobalContext now acts as a cache for the compiled shaders. Note that only the shaders displayed on the page
are cached, making it useful in animations or when more elements share the same shader filter.

For CSS Shaders we need two files, vertex and fragment shaders, so that's why we have a CustomFilterProgram.
CustomFilterProgram is the platform object, so StyleCustomFilterProgram implements it and is referenced from the RenderStyle.

StyleCustomFilterProgram is also the one that actually keeps references to the CachedShaders and has all the loading logic.
The only problem is that there might be multiple StyleCustomFilterProgram with the same set of CachedShaders.
That's why in this patch I've added CustomFilterProgramInfo as a simple class to be used as a key in a hash map.

For now CustomFilterProgramInfo should act similar to a pair<String, String>. There's only one exception: one of the strings
is allowed to be null. A null string is the placeholder for the default shader.

Note that alpha compositing and blending will be added to the CustomFilterProgramInfo after the mix()
function parsing will land in https://bugs.webkit.org/show_bug.cgi?id=90101 .

Test: css3/filters/custom/custom-filter-shader-reuse.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/CustomFilterCompiledProgram.cpp:
(WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
(WebCore::CustomFilterCompiledProgram::getDefaultShaderString): Returns the default shader based on the type.
(WebCore):
(WebCore::CustomFilterCompiledProgram::compileShader): Added check for isNull and used the default shader in that case.
(WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram): Added call to CustomFilterGlobalContext::removeCompiledProgram.
* platform/graphics/filters/CustomFilterCompiledProgram.h:
(WebCore::CustomFilterCompiledProgram::detachFromGlobalContext): Called from ~CustomFilterGlobalContext, so that it doesn't call into a deleted object later when ~CustomFilterCompiledProgram is called. It should only happen when CustomFilterGlobalContext dies before the
CustomFilterCompiledPrograms that it caches.
(WebCore):
* platform/graphics/filters/CustomFilterGlobalContext.cpp:
(WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
(WebCore::CustomFilterGlobalContext::getCompiledProgram): Gets or creates a compiled shader for a specific CustomFilterProgramInfo.
(WebCore):
(WebCore::CustomFilterGlobalContext::removeCompiledProgram): Called by ~CustomFilterCompiledProgram.
* platform/graphics/filters/CustomFilterGlobalContext.h:
(WebCore):
(CustomFilterGlobalContext):
* platform/graphics/filters/CustomFilterProgram.cpp:
(WebCore::CustomFilterProgram::programInfo):
* platform/graphics/filters/CustomFilterProgram.h:
(WebCore):
* platform/graphics/filters/CustomFilterProgramInfo.cpp: Added.
(WebCore):
(WebCore::hashPossiblyNullString): We need to allow null strings in the hash, so this is a helper to check for isNull
before asking for the hash.
(WebCore::CustomFilterProgramInfo::CustomFilterProgramInfo):
(WebCore::CustomFilterProgramInfo::isEmptyValue):
(WebCore::CustomFilterProgramInfo::isHashTableDeletedValue):
(WebCore::CustomFilterProgramInfo::hash):
(WebCore::CustomFilterProgramInfo::operator==):
* platform/graphics/filters/CustomFilterProgramInfo.h: Added.
(WebCore):
(CustomFilterProgramInfo):
(WebCore::CustomFilterProgramInfo::vertexShaderString):
(WebCore::CustomFilterProgramInfo::fragmentShaderString):
(WebCore::CustomFilterProgramInfoHash::hash):
(WebCore::CustomFilterProgramInfoHash::equal):
(CustomFilterProgramInfoHash): Structures needed to make this a key in the hash map.
(CustomFilterProgramInfoHashTraits):
(WebCore::CustomFilterProgramInfoHashTraits::isEmptyValue): I've used the deleted strings value to mark a deleted
CustomFilterProgramInfo object. Those are not safe to compare to deleted, so there's a need to set safeToCompareToEmptyOrDeleted to false, meaning that there's a need to manually check for empty values.
(WTF):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::initializeContext): Moved to using the cached shader instead.

LayoutTests:

Added a new test to check for cases when CSS Shaders are removed and readded. Two cases are verified in the new test:
1. When all the shaders are removed.
2. When only some of the shaders are removed.

* css3/filters/custom/custom-filter-shader-reuse-expected.txt: Added.
* css3/filters/custom/custom-filter-shader-reuse.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add CCDelayBasedTimeSource::setTimebaseAndInterval
https://bugs.webkit.org/show_bug.cgi?id=92825

Patch by Brian Anderson <brianderson@chromium.org> on 2012-08-07
Reviewed by James Robinson.

Allows CCDelayBaseTimeSource to have it's timebase and interval updated
on the fly.  Accounts for double ticking due to jitter or resetting the
timer multiple times quickly.

CCDelayBasedTimeSourceTest updated with two tests for proper handling
of jittery timebase/interval source and immediate handling of
significant timebase/interval changes.

* platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp:
(WebCore::CCDelayBasedTimeSource::CCDelayBasedTimeSource):
(WebCore::CCDelayBasedTimeSource::nextTickTime):
(WebCore):
(WebCore::CCDelayBasedTimeSource::onTimerFired):
(WebCore::CCDelayBasedTimeSource::setTimebaseAndInterval):
(WebCore::CCDelayBasedTimeSource::postNextTickTask):
* platform/graphics/chromium/cc/CCDelayBasedTimeSource.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, adding back platform-specific expectations that
somehow got removed in r124874.

* platform/gtk/fast/multicol/vertical-rl/nested-columns-expected.png: Added.
* platform/gtk/fast/multicol/vertical-rl/nested-columns-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move test cases related to link prerender to Skipped list except for chromium port
https://bugs.webkit.org/show_bug.cgi?id=93355

Reviewed by Adam Barth.

Below two test cases have tested by each port, which doesn't enable LINK_PRERENDER macro.
These test cases need to be moved to Skipped file until this feature is supported by each port.

fast/dom/HTMLLinkElement/prerender-insert-after-stop.html
fast/dom/HTMLLinkElement/prerender-remove-after-stop.html

* platform/efl/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:
* platform/wk2/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
reimplement fastMod w/o (soon to be) private skia macros
https://bugs.webkit.org/show_bug.cgi?id=93370

Reviewed by Adrienne Walker.

fastMod() reimplemented (same functionality) to stop using soon-to-be private macros in
SkMath.h. The new version is functionally identical.

No new tests -- existing layouttests exercise GraphicsContext::strokeArc(), the only caller

* platform/graphics/skia/GraphicsContextSkia.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r124865): It broke the ARM Chromium build
https://bugs.webkit.org/show_bug.cgi?id=93364

Patch by Joshua Bell <jsbell@chromium.org> on 2012-08-07
Reviewed by Csaba Osztrogonác.

Mark large constant with LL to satisfy a picky compiler.

* tests/IDBLevelDBCodingTest.cpp:
(IDBLevelDBCoding::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Turn on CSS Variables
https://bugs.webkit.org/show_bug.cgi?id=93376

Reviewed by Antonio Gomes.

Turn on CSS Variables for BlackBerry port.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Add support for the Gamepad API
https://bugs.webkit.org/show_bug.cgi?id=90637

Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-08-07
Reviewed by Alexis Menard.

Source/WebCore:

Adds support for Gamepad API on the Qt port.

The implementation of this class relies on the Linux
kernel joystick API.

Gamepad devices are recognized through the GamepadsQt
class, which uses the udev library to watch for connection,
disconnection and other gamepad related events.

Tests for this feature already exist.

* DerivedSources.pri:
* Target.pri:
* WebCore.pri:
* platform/qt/GamepadsQt.cpp: Added.
(WebCore):
(GamepadDeviceLinuxQt):
(WebCore::GamepadDeviceLinuxQt::create):
(WebCore::GamepadDeviceLinuxQt::GamepadDeviceLinuxQt):
(WebCore::GamepadDeviceLinuxQt::~GamepadDeviceLinuxQt):
(WebCore::GamepadDeviceLinuxQt::readCallback):
(GamepadsQt):
(WebCore::GamepadsQt::GamepadsQt):
(WebCore::GamepadsQt::~GamepadsQt):
(WebCore::GamepadsQt::isGamepadDevice):
(WebCore::GamepadsQt::onGamePadChange):
(WebCore::GamepadsQt::registerDevice):
(WebCore::GamepadsQt::unregisterDevice):
(WebCore::GamepadsQt::updateGamepadList):
(WebCore::sampleGamepads):

Tools:

If the libudev library is present, the GAMEPAD flag is
turned on by default for the Qt port.

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.prf:

LayoutTests:

This does not unskip the gamepad tests for the Qt port, since the flag is
optional the test would not pass without it. The user may unskip it manually.

On the other hand, the gamepad-polling-access.html test is still expected
to fail because it requires additional test infrastructure.
See https://bugs.webkit.org/show_bug.cgi?id=92873

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] InspectorOverlay class duplicated in WebCore
https://bugs.webkit.org/show_bug.cgi?id=93124

Reviewed by Rob Buis.

Source/WebKit:

Updated InspectorOverlay build path.

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

Moved files to better align with namespace names.

* WebKitSupport/InspectorOverlay.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.cpp.
(WebKit):
(BlackBerry::WebKit::InspectorOverlay::create):
(BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
(BlackBerry::WebKit::InspectorOverlay::paintContents):
(BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
(BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
(BlackBerry::WebKit::InspectorOverlay::~InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::clear):
(BlackBerry::WebKit::InspectorOverlay::update):
* WebKitSupport/InspectorOverlay.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/InspectorOverlay.h.
(WebCore):
(WebKit):
(InspectorOverlay):
(InspectorOverlayClient):
(BlackBerry::WebKit::InspectorOverlay::setClient):
(BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add support to DumpRenderTree [EventSender] for GestureTapDown events.
https://bugs.webkit.org/show_bug.cgi?id=93286

Reviewed by James Robinson.

Tools:

Adds support to generate GestureTapDown events from EventSender, to facilitate
link highlighting layout tests.

Added a GestureTapEvent to one existing test, more tests to follow when LinkHighlight CLs start to land.

* DumpRenderTree/chromium/TestRunner/EventSender.cpp:
(EventSender::EventSender):
(EventSender::gestureTapDown):
(EventSender::gestureEvent):
* DumpRenderTree/chromium/TestRunner/EventSender.h:
(EventSender):

LayoutTests:

Adds support to generate GestureTapDown events from EventSender, to facilitate
link highlighting layout tests.

Added a GestureTapEvent to one existing test, more tests to follow when LinkHighlight CLs start to land.

* platform/chromium/plugins/gesture-events-expected.txt:
* platform/chromium/plugins/gesture-events.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed, TestExpectations update.
https://bugs.webkit.org/show_bug.cgi?id=72039

* platform/chromium/TestExpectations: Adding back the possible failure that was removed in http://trac.webkit.org/changeset/124734

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsLayerAnimation shouldn't use HashMap<String>
https://bugs.webkit.org/show_bug.cgi?id=93284

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Use a vector containing all the animations instead of a map of String to Vector.
The HashMap contains very few elements, which makes it inefficient relatively to a vector.
This has been shown to be a bottleneck in valgrind.

Covered by existing animation tests.

* platform/graphics/GraphicsLayerAnimation.cpp:
(WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
(WebCore::GraphicsLayerAnimations::hasActiveAnimationsOfType):
(WebCore::GraphicsLayerAnimations::hasRunningAnimations):
(WebCore::GraphicsLayerAnimations::add):
(WebCore::GraphicsLayerAnimations::pause):
(WebCore::GraphicsLayerAnimations::remove):
(WebCore::GraphicsLayerAnimations::apply):
* platform/graphics/GraphicsLayerAnimation.h:
(GraphicsLayerAnimation):
(WebCore::GraphicsLayerAnimation::name):
(GraphicsLayerAnimations):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):

Source/WebKit2:

Apply the changes to GraphicsLayerAnimation API.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android][NRWT] Fix 2 FIXMEs in chromium_android.py
https://bugs.webkit.org/show_bug.cgi?id=93381

Reviewed by Adam Barth.

* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver.__init__):
(ChromiumAndroidDriver._push_executable): Remove temporary lines as the chromium change has been landed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150371
(ChromiumAndroidDriver._setup_performance): Update all scaling governor files.
(ChromiumAndroidDriver._teardown_performance): Update all scaling governor files.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add missing include in FrameLoaderClienBlackBerry after Base64 moved.
https://bugs.webkit.org/show_bug.cgi?id=93383

Reviewed by Rob Buis.

Base64 moved from platform/text to wtf/text, need to add mssing
include.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry][FullScreen] Remove the set/reset of touch modes code when entering/leaving fullscreen
https://bugs.webkit.org/show_bug.cgi?id=92520
PR #184511

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>

Internally reviewed by Gen Mak.

Remove touch mode set/reset when entering/leaving fullscreen
for media elements through the new FULLSCREEN_API code path.
The client now handles it.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
(BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
* Api/WebPage_p.h:
(WebPagePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] [FullScreen] No need to scroll 'x' to 0 before entering fullscreen
https://bugs.webkit.org/show_bug.cgi?id=91750
PR #178293

Reviewed by Rob Buis.
Patchby Antonio Gomes <agomes@rim.com>

We are not adjusting the 'left' CSS property of the fullscreen wrapper
properly, so no need to scroll 'x' to 0 anymore.

Internally reviewed by Jacky Jiang.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in ContainerNode::cloneChildNodes.
https://bugs.webkit.org/show_bug.cgi?id=93378

Reviewed by Levi Weintraub.

Source/WebCore:

Re-enabling the editing delete button controller in cloneChildNode was causing style changes,
thereby causing load events to fire. The load event can blow our nodes from underneath. This causes
crashes when we are nested inside cloneChildNodes. The patch just skips the delete button controller's
container element from being cloned and removes the hacky enable/disable logic.

Test: fast/dom/clone-node-load-event-crash.html

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes):

LayoutTests:

* fast/dom/clone-node-load-event-crash-expected.txt: Added.
* fast/dom/clone-node-load-event-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r124723-r124741): 5 inspector/debugger tests failing on Apple Lion Debug WK1 (Tests)
https://bugs.webkit.org/show_bug.cgi?id=93387

Unreviewed. Temporarily skipping failing tests on Mac.

* platform/mac/TestExpectations:

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