Shrink EventTargetData by making firingEventListeners vector optional.
<http://webkit.org/b/99532>
<rdar://problem/12515099>

Reviewed by Anders Carlsson.

The majority of event listeners never actually fire, and EventTargetData::firingEventListeners
is just sitting there taking up space. Make it an OwnPtr instead, shrinking EventTargetData
by 48 bytes and progressing Membuster3 by 395kB.

* dom/EventTarget.cpp:
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::fireEventListeners):
(WebCore::EventTarget::removeAllEventListeners):
* dom/EventTarget.h:
(WebCore::EventTarget::isFiringEventListeners):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove legacy members from WebDraggableRegion
https://bugs.webkit.org/show_bug.cgi?id=99612

Reviewed by Adam Barth.

Those legacy members to support old syntax are not longer needed after
chromium side changes landed.

* public/WebDraggableRegion.h:
(WebDraggableRegion):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Prevent focus zoom on non-userscalable pages.
https://bugs.webkit.org/show_bug.cgi?id=99608

Reviewed by Rob Buis.

PR 222378.

Disable focus zoom when the page is non-user scalable.

Reviewed Internally by Nima Ghanavatian.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Always use fastRealloc when growing or shrinking the Vector buffer
https://bugs.webkit.org/show_bug.cgi?id=99616

Reviewed by Andreas Kling.

Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
vector buffer when possible; realloc should always be at least as fast as free+malloc.

* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Create an accessibility watchlist.

* Scripts/webkitpy/common/config/committers.py:
* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
plugins: Allow a plugin to dictate whether it can receive drag events or not.
https://bugs.webkit.org/show_bug.cgi?id=99355

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-10-17
Reviewed by Tony Chang.

Source/WebCore:

When doing a drag over a plugin, ask the plugin whether it can accept
drag/drop to decide whether drag/drop is possible or not. At present,
plugins do not receive drag events through WebCore (i.e. various
implementations of PluginView::handleMouseEvent ignores the
drop-events). This change makes it possible for the ports to ask the
plugin first to decide whether it can (or wants to) accept drag events.
The default implementation remains the same, i.e. plugins do not receive
drag events. For chromium, the overridden implementation uses the
WebPlugin interface to check whether the plugin can accept drag events.

* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::canProcessDrag):
(WebCore):
* html/HTMLPlugInElement.h:
(WebCore):
(HTMLPlugInElement):
* page/DragController.cpp:
(WebCore::DragController::canProcessDrag):
* plugins/PluginViewBase.h:
(WebCore):
(WebCore::PluginViewBase::canProcessDrag):

Source/WebKit/chromium:

Introduce WebPlugin::canProcessDrag() and use that to implement PluginViewBase::canProcessDrag.

* public/WebPlugin.h:
(WebKit::WebPlugin::canProcessDrag):
(WebPlugin):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::canProcessDrag):
(WebKit):
(WebKit::WebPluginContainerImpl::handleMouseEvent):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):

Tools:

Update the TestWebPlugin to implement the new |canProcessDrag| interface.

* DumpRenderTree/chromium/TestWebPlugin.h:
(TestWebPlugin::canProcessDrag):

LayoutTests:

Update test to not set contentEditable on the plugin anymore.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
GraphicsLayer visible rect computation needs to use the current animating transform
https://bugs.webkit.org/show_bug.cgi?id=99529

Reviewed by Dean Jackson.

Source/WebCore:

If we're running an accelerated animation of transform
on a GraphicsLayerCA, the current value of the transform won't
be reflected in the GraphicsLayer's m_transform. However,
we need the current value of the transform in order to correctly
compute the visible rect of this layer and descendants.

Add a function to GraphicsLayerClient to retrieve the current
value of the transform from the client.

RenderLayer's currentTransform() used to return a transform
with transform-origin baked in; GraphicsLayerClient needs one
that excludes transform-origin, so enhance RenderLayer::currentTransform()
to be able to produce either.

Tests: compositing/visible-rect/animated-from-none.html
       compositing/visible-rect/animated.html

* platform/graphics/GraphicsLayerClient.h:
(WebCore):
(GraphicsLayerClient):
(WebCore::GraphicsLayerClient::getCurrentTransform):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::computeVisibleRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::currentTransform):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::currentTransform):
* rendering/RenderLayerBacking.h:
(RenderLayerBacking):

LayoutTests:

Tests that exercise visible-rect computation on an animating layer.

* compositing/visible-rect/animated-expected.txt: Added.
* compositing/visible-rect/animated-from-none-expected.txt: Added.
* compositing/visible-rect/animated-from-none.html: Added.
* compositing/visible-rect/animated.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed watchlist addition.

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Uninitialized Members in WebDataSourcePrivate
https://bugs.webkit.org/show_bug.cgi?id=99617

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2012-10-17
Reviewed by David Kilzer.

Initialize BOOL member variables.

* WebView/WebDataSource.mm:
(WebDataSourcePrivate::WebDataSourcePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bind isolatedWorldSecurityOrigin to world
https://bugs.webkit.org/show_bug.cgi?id=99582

Patch by Dan Carney <dcarney@google.com> on 2012-10-17
Reviewed by Adam Barth.

Source/WebCore:

Security origin of isolated worlds was not previously set at the world
level, although it could have been.

No new tests. No change in functionality.

* bindings/v8/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::deallocate):
(WebCore):
(WebCore::isolatedWorldSecurityOrigins):
(WebCore::DOMWrapperWorld::isolatedWorldSecurityOrigin):
(WebCore::DOMWrapperWorld::setIsolatedWorldSecurityOrigin):
(WebCore::DOMWrapperWorld::clearIsolatedWorldSecurityOrigin):
* bindings/v8/DOMWrapperWorld.h:
(DOMWrapperWorld):
(WebCore::DOMWrapperWorld::isIsolatedWorldId):
(WebCore::DOMWrapperWorld::isIsolatedWorld):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::resetIsolatedWorlds):
(WebCore::ScriptController::evaluateInIsolatedWorld):
(WebCore::ScriptController::collectIsolatedContexts):
* bindings/v8/ScriptController.h:
(ScriptController):
(WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):
* bindings/v8/V8DOMWindowShell.h:
(V8DOMWindowShell):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):

Tools:

Added ability to unset isolatedWorldSecurityOrigin.

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::setIsolatedWorldSecurityOrigin):

LayoutTests:

Clean up of isolated worlds added after test completion.

* http/tests/security/isolatedWorld/cross-origin-xhr.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed watchlist email change.

* Scripts/webkitpy/common/config/watchlist:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow lazy initialization of SVG XML animated properties.
https://bugs.webkit.org/show_bug.cgi?id=84657

Reviewed by Tim Horton.

Source/WebCore:

When animating a property in the shadow tree, instance properties and tearoffs are created
but they simply reference the animated element's animating properties.

When starting an animation for the first time (see SVGAnimateElement::resetAnimatedType),
we initialize the root property and instance properties using startAnimValAnimation(...).
If an instance property is added while the root property is animating, this initialization
will not occur and we crash.

This patch updates the resetAnimValToBaseVal codepath to start (and initialize) an animated
property if it is not already animating. After this patch, instance properties can be added
in the middle of animation and they will be properly started/initialized.

Test: svg/animations/use-while-animating-crash.html

* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
(WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
(WebCore::SVGAnimatedTypeAnimator::executeAction):

LayoutTests:

* platform/mac/svg/animations/use-while-animating-crash-expected.txt: Added.
* svg/animations/use-while-animating-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Set WebCore_LIBRARIES earlier.
https://bugs.webkit.org/show_bug.cgi?id=99630

Reviewed by Rob Buis.

* CMakeLists.txt: Follow the style we use in other CMakeList.txt
files and set the Foo_LIBRARIES variables before we start checking
for optional features, as they might append other libraries to the
list (it already happens with WTF_USE_3D_GRAPHICS, for example).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove redundant OpenGL library addition from the build system.
https://bugs.webkit.org/show_bug.cgi?id=99629

Reviewed by Rob Buis.

* PlatformEfl.cmake: Do not add OPENGL_gl_LIBRARY to
WebCore_LIBRARIES, this is already done in CMakeLists.txt these
days.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline some windows tests now that the bot is providing results in the right place.

Unreviewed gardening.

* platform/chromium-win-xp/css1/basic/inheritance-expected.png: Removed.
* platform/chromium-win-xp/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.png: Removed.
* platform/chromium-win-xp/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png: Removed.
* platform/chromium-win-xp/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png: Removed.
* platform/chromium-win-xp/tables/mozilla/bugs/bug73321-expected.png: Removed.
* platform/chromium-win/css1/basic/inheritance-expected.png:
* platform/chromium-win/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.png:
* platform/chromium-win/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.png:
* platform/chromium-win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/chromium-win/tables/mozilla/bugs/bug73321-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, first set of GTK+ baselines for shadow DOM changes to RenderSlider.

* fast/forms/range/slider-thumb-stylability-expected.txt: Renamed from LayoutTests/platform/efl/fast/forms/range/slider-thumb-stylability-expected.txt.
* platform/chromium-mac-snowleopard/fast/hidpi/video-controls-in-hidpi-expected.txt: Removed.
* platform/chromium-mac-snowleopard/fast/multicol/client-rects-expected.txt: Removed.
* platform/chromium-win-xp/fast/multicol/client-rects-expected.txt: Removed.
* platform/gtk/TestExpectations:
* platform/gtk/fast/dom/HTMLInputElement/input-slider-update-expected.txt:
* platform/gtk/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt: Added.
* platform/gtk/fast/forms/box-shadow-override-expected.txt:
* platform/gtk/fast/forms/input-appearance-height-expected.txt:
* platform/gtk/fast/forms/range/input-appearance-range-expected.txt:
* platform/gtk/fast/forms/range/range-thumb-height-percentage-expected.txt: Added.
* platform/gtk/fast/forms/range/slider-padding-expected.txt:
* platform/gtk/fast/forms/range/slider-thumb-shared-style-expected.txt:
* platform/gtk/fast/forms/range/slider-thumb-stylability-expected.png: Removed.
* platform/gtk/fast/forms/range/slider-thumb-stylability-expected.txt:
* platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/gtk/fast/layers/video-layer-expected.txt:
* platform/gtk/fast/multicol/client-rects-expected.txt:
* platform/gtk/fast/repaint/slider-thumb-drag-release-expected.txt:
* platform/gtk/fast/repaint/slider-thumb-float-expected.txt: Added.
* platform/mac/fast/forms/range/slider-thumb-stylability-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, mark inspector/styles/styles-history.html as flaky on Linux.
https://bugs.webkit.org/show_bug.cgi?id=99519

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Performance test should support asynchronous tests
https://bugs.webkit.org/show_bug.cgi?id=95668

Reviewed by Dirk Pranke.

Added PerfTestRunner.prepareToMeasureValuesAsync and PerfTestRunner.measureValueAsync,
and deployed it in Animation/balls.

* Animation/balls.html:
* resources/runner.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, Chromium baselines for shadow DOM changes to RenderSlider.

* platform/chromium-linux-x86/fast/multicol/client-rects-expected.txt: Removed.
* platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
* platform/chromium-mac-snowleopard/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt.
* platform/chromium-mac-snowleopard/fast/forms/box-shadow-override-expected.png:
* platform/chromium-mac-snowleopard/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
* platform/chromium-mac-snowleopard/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
* platform/chromium-mac-snowleopard/fast/forms/input-appearance-height-expected.png:
* platform/chromium-mac-snowleopard/fast/forms/range/slider-thumb-stylability-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/forms/range/slider-thumb-stylability-expected.txt.
* platform/chromium-mac-snowleopard/fast/repaint/slider-thumb-float-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/repaint/slider-thumb-float-expected.txt.
* platform/chromium-mac/fast/dom/HTMLInputElement/input-slider-update-expected.txt: Added.
* platform/chromium-mac/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt.
* platform/chromium-mac/fast/forms/box-shadow-override-expected.png:
* platform/chromium-mac/fast/forms/box-shadow-override-expected.txt:
* platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
* platform/chromium-mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
* platform/chromium-mac/fast/forms/input-appearance-height-expected.png:
* platform/chromium-mac/fast/forms/input-appearance-height-expected.txt:
* platform/chromium-mac/fast/forms/range/input-appearance-range-expected.txt:
* platform/chromium-mac/fast/forms/range/range-thumb-height-percentage-expected.txt: Added.
* platform/chromium-mac/fast/forms/range/slider-padding-expected.txt: Added.
* platform/chromium-mac/fast/forms/range/slider-thumb-shared-style-expected.txt: Added.
* platform/chromium-mac/fast/forms/range/slider-thumb-stylability-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/forms/range/slider-thumb-stylability-expected.txt.
* platform/chromium-mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/chromium-mac/fast/layers/video-layer-expected.txt:
* platform/chromium-mac/fast/multicol/client-rects-expected.txt:
* platform/chromium-mac/fast/repaint/slider-thumb-drag-release-expected.txt: Added.
* platform/chromium-mac/fast/repaint/slider-thumb-float-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/repaint/slider-thumb-float-expected.txt.
* platform/chromium-mac/media/audio-controls-rendering-expected.txt:
* platform/chromium-mac/media/audio-repaint-expected.txt:
* platform/chromium-mac/media/controls-after-reload-expected.txt:
* platform/chromium-mac/media/controls-strict-expected.txt:
* platform/chromium-mac/media/controls-styling-expected.txt:
* platform/chromium-mac/media/controls-styling-strict-expected.txt:
* platform/chromium-mac/media/controls-without-preload-expected.txt:
* platform/chromium-mac/media/media-controls-clone-expected.txt:
* platform/chromium-mac/media/media-document-audio-repaint-expected.txt:
* platform/chromium-mac/media/track/track-cue-rendering-horizontal-expected.txt:
* platform/chromium-mac/media/track/track-cue-rendering-vertical-expected.txt:
* platform/chromium-mac/media/video-controls-rendering-expected.txt:
* platform/chromium-mac/media/video-display-toggle-expected.txt:
* platform/chromium-mac/media/video-empty-source-expected.txt:
* platform/chromium-mac/media/video-no-audio-expected.txt:
* platform/chromium-mac/media/video-playing-and-pause-expected.txt:
* platform/chromium-mac/media/video-zoom-controls-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi-expected.txt: Copied from LayoutTests/platform/chromium-mac/fast/hidpi/video-controls-in-hidpi-expected.txt.
* platform/chromium-win-xp/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt.
* platform/chromium-win-xp/fast/forms/datalist/input-appearance-range-with-datalist-expected.png: Removed.
* platform/chromium-win-xp/fast/forms/range/slider-thumb-stylability-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/forms/range/slider-thumb-stylability-expected.txt.
* platform/chromium-win-xp/fast/repaint/slider-thumb-float-expected.txt: Copied from LayoutTests/platform/chromium-win/fast/repaint/slider-thumb-float-expected.txt.
* platform/chromium-win/fast/dom/HTMLInputElement/input-slider-update-expected.txt:
* platform/chromium-win/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt:
* platform/chromium-win/fast/forms/box-shadow-override-expected.txt:
* platform/chromium-win/fast/forms/datalist/input-appearance-range-with-datalist-expected.png:
* platform/chromium-win/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png:
* platform/chromium-win/fast/forms/input-appearance-height-expected.txt:
* platform/chromium-win/fast/forms/range/input-appearance-range-expected.png:
* platform/chromium-win/fast/forms/range/input-appearance-range-expected.txt:
* platform/chromium-win/fast/forms/range/range-thumb-height-percentage-expected.txt:
* platform/chromium-win/fast/forms/range/slider-padding-expected.txt:
* platform/chromium-win/fast/forms/range/slider-thumb-shared-style-expected.txt:
* platform/chromium-win/fast/forms/range/slider-thumb-stylability-expected.txt:
* platform/chromium-win/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/chromium-win/fast/multicol/client-rects-expected.txt:
* platform/chromium-win/fast/repaint/slider-thumb-drag-release-expected.txt:
* platform/chromium-win/fast/repaint/slider-thumb-float-expected.txt:
* platform/chromium-win/media/track/track-cue-rendering-vertical-expected.txt:
* platform/chromium-win/platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi-expected.txt: Renamed from LayoutTests/platform/chromium-linux/fast/hidpi/video-controls-in-hidpi-expected.txt.
* platform/chromium/TestExpectations:
* platform/mac-lion/media/audio-repaint-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Integer overflows/underflows in all Gamepad controller api calls.
https://bugs.webkit.org/show_bug.cgi?id=97262

Patch by Scott Graham <scottmg@chromium.org> on 2012-10-17
Reviewed by Abhishek Arya.

Tools:

Range check controller inputs. This code is not exposed to the web,
but makes fuzzers try less hard to break uninteresting code.

* DumpRenderTree/chromium/TestRunner/GamepadController.cpp:
(GamepadController::setButtonCount):
(GamepadController::setButtonData):
(GamepadController::setAxisCount):
(GamepadController::setAxisData):

LayoutTests:

* gamepad/gamepad-out-of-range-crasher.html: Added.
* gamepad/gamepad-out-of-range-crasher-expected.txt: Added.

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