Add AsyncScrollingCoordinator, which is a base class for threaded and future remote ScrollingCoordinators
https://bugs.webkit.org/show_bug.cgi?id=126389

Source/WebCore:

Reviewed by Tim Horton.

Add AsyncScrollingCoordinator, a ScrollingCoordinator that knows about ScrollingStateTrees
and ScrollingTrees, but leaves it up to subclasses to decide when and how to commit.

* WebCore.xcodeproj/project.pbxproj: Added AsyncScrollingCoordinator.*
* page/scrolling/AsyncScrollingCoordinator.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm.
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::~AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::detachFromStateTree):
(WebCore::AsyncScrollingCoordinator::clearStateTree):
(WebCore::AsyncScrollingCoordinator::syncChildPositions):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::AsyncScrollingCoordinator::updateScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
(WebCore::AsyncScrollingCoordinator::setScrollLayerForNode):
(WebCore::AsyncScrollingCoordinator::setCounterScrollingLayerForNode):
(WebCore::AsyncScrollingCoordinator::setHeaderLayerForNode):
(WebCore::AsyncScrollingCoordinator::setFooterLayerForNode):
(WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionForNode):
(WebCore::AsyncScrollingCoordinator::setWheelEventHandlerCountForNode):
(WebCore::AsyncScrollingCoordinator::setScrollBehaviorForFixedElementsForNode):
(WebCore::AsyncScrollingCoordinator::setScrollbarPaintersFromScrollbarsForNode):
(WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
(WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
(WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
(WebCore::AsyncScrollingCoordinator::isRubberBandInProgress):
(WebCore::AsyncScrollingCoordinator::setScrollPinningBehavior):
(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
* page/scrolling/AsyncScrollingCoordinator.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
(WebCore::AsyncScrollingCoordinator::scrollingTree):
(WebCore::AsyncScrollingCoordinator::setScrollingTree):
(WebCore::AsyncScrollingCoordinator::scrollingStateTree):
(WebCore::AsyncScrollingCoordinator::releaseScrollingTree):
* page/scrolling/ScrollingCoordinator.h: Add casting support.
(WebCore::ScrollingCoordinator::isAsyncScrollingCoordinator):
* page/scrolling/ThreadedScrollingTree.h: commitNewTreeState() needs to be public.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm: Lots of code moved to AsyncScrollingCoordinator.
(WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::~ScrollingCoordinatorMac):
(WebCore::ScrollingCoordinatorMac::pageDestroyed):
(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorMac::handleWheelEvent):
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::commitTreeState):
(WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator):

Source/WebKit2:

Reviewed by Tim Horton.

Add AsyncScrollingCoordinator, a ScrollingCoordinator that knows about ScrollingStateTrees
and ScrollingTrees, but leaves it up to subclasses to decide when and how to commit.

* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage): The ScrollingTree is exposed on
AsyncScrollingCoordinator now, not ScrollingCoordinator, so we have to cast here.
* WebProcess/WebPage/WebPage.cpp: m_useThreadedScrolling -> m_useAsyncScrolling terminology change.
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences): Cast to AsyncScrollingCoordinator in order
to get to the ScrollingTree.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=126391
Accessing Trac from build.webkit.org/dashboard should enable XMLHttpRequest.withCredentials

Rubber-stamped by Dan Bernstein.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
(loadXML): Quick and dirty fix, with a FIXME.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [CMake] run-gtk-tests should run with the cmake build
https://bugs.webkit.org/show_bug.cgi?id=126341

Reviewed by Carlos Garcia Campos.

* Scripts/run-gtk-tests:
(TestRunner.__init__): Use the new calling conventions for the common script.
(TestRunner._setup_testing_environment): Ditto.
* gtk/common.py:
(set_build_types): Added set_build_types, to avoid having build_type arguments
for all functions in common.
(binary_build_path): Added this function which gets the path to the built binaries.
(get_build_path): Removed the build_types argument.
(build_path): Removed the build_types argument and call get_build_path directly now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r160846.
http://trac.webkit.org/changeset/160846
https://bugs.webkit.org/show_bug.cgi?id=126395

Breaks build scripts for Windows when Visual Studio is not
installed in Program Files (Requested by rfong on #webkit).

* Scripts/webkitdirs.pm:
(visualStudioInstallDir):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Accessing Trac from build.webkit.org/dashboard should enable XMLHttpRequest.withCredentials
https://bugs.webkit.org/show_bug.cgi?id=126391

Reviewed by Dan Bernstein.

Make it conditional, as trac.webkit.org doesn't work when withCredentials is enabled.
One can request credentials use via Initialization.js.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
(Trac):
(Trac.prototype.update):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
(loadXML):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rationalize DFG DCE
https://bugs.webkit.org/show_bug.cgi?id=125523

Reviewed by Mark Hahnenberg.
        
Adds the ability to DCE more things. It's now the case that if a node is completely
pure, we clear NodeMustGenerate and the node becomes a DCE candidate.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::cleanVariables):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::clobbersWorld):
* dfg/DFGNodeType.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileAdd):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileValueAdd):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor PutPropertySlot to be aware of custom properties
https://bugs.webkit.org/show_bug.cgi?id=126187

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Refactor PutPropertySlot, making the constructor take the thisValue
used as a target.  This results in a wide range of boilerplate changes
to pass the new parameter.

* API/JSObjectRef.cpp:
(JSObjectSetProperty):
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Arguments.cpp:
(JSC::Arguments::putByIndex):
* runtime/ArrayPrototype.cpp:
(JSC::putProperty):
(JSC::arrayProtoFuncPush):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitiveByIndex):
* runtime/JSCell.cpp:
(JSC::JSCell::putByIndex):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):
* runtime/JSONObject.cpp:
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::putByIndex):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::deleteProperty):
* runtime/JSObject.h:
(JSC::JSObject::putDirect):
* runtime/Lookup.h:
(JSC::putEntry):
(JSC::lookupPut):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::setCustomProperty):
(JSC::PutPropertySlot::thisValue):
(JSC::PutPropertySlot::isCacheable):

Source/WebCore:

Update the bindings code generation and custom objects
to the new function signatures

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject setValue:forKey:]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::putByIndex):
* bridge/NP_jsobject.cpp:
(_NPN_SetProperty):

Source/WebKit/mac:

Update for new method signatures.

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::setProperty):

Source/WebKit2:

Update for new method signatures.

* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::setProperty):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Fix mismatched header guards in private WK1 header files
https://bugs.webkit.org/show_bug.cgi?id=126390

Reviewed by Martin Robinson.

Fix three mismatched header guards that are producing warnings when building with Clang.

* webkit/webkitsecurityoriginprivate.h:
* webkit/webkitviewportattributesprivate.h:
* webkit/webkitwebnavigationactionprivate.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update bindings test results

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge didMoveOnscreen / page visibility to isVisible
https://bugs.webkit.org/show_bug.cgi?id=126268

Reviewed by Tim Horton.

The onscreen state most closely tracks view visibility (though currently
also tracks a mix of in-window state). Make more consistent, simplify,
and move all animation suspension logic to Page, so it can be controlled
by the PageThrottler.

Source/WebCore: 

* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
* page/FrameView.cpp:
(WebCore::FrameView::shouldSetCursor):
* page/Page.cpp:
(WebCore::Page::Page):
    - initialize new variables.
(WebCore::Page::setIsVisible):
    - merge setVisibilityState, didMoveOnscreen, willMoveOffscreen.
(WebCore::Page::setIsPrerender):
    - switches visibility state from hidden to prerender.
(WebCore::Page::visibilityState):
    - computed from m_isVisible, m_isPrerender.
(WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
    - m_visibilityState -> m_isVisible.
* page/Page.h:
    - remove didMoveOnscreen/willMoveOffscreen
      m_isOnscreen & m_visibilityState -> m_isVisible & m_isPrerender
      setVisibilityState -> setIsVisible & setIsPrerender.
(WebCore::Page::isVisible):
    - isOnscreen -> isVisible.

Source/WebKit/blackberry: 

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
    - setVisibilityState -> setIsVisible.

Source/WebKit/efl: 

* ewk/ewk_view.cpp:
(ewk_view_visibility_state_set):
    - setVisibilityState -> setIsVisible/setIsPrerender.

Source/WebKit/gtk: 

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setPageVisibility):
    - setVisibilityState -> setIsVisible/setIsPrerender.

Source/WebKit/mac: 

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _updateVisibilityState]):
    - _setVisibilityState:isInitialState: -> _setIsVisibile:isInitialState:.
(-[WebView _setIsVisible:isInitialState:]):
    - added.
(-[WebView _setVisibilityState:isInitialState:]):
    - setVisibilityState -> setIsVisible/setIsPrerender.
(-[WebView viewWillMoveToWindow:]):
(-[WebView viewDidMoveToWindow]):
    - remove redundant calls to willMoveOffscreen/didMoveOnscreen
      (this is handled by _updateVisibilityState).

Source/WebKit2: 

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewIsVisible):
    - updateVisibilityState -> setIsVisible.
(WebKit::WebPage::setIsInWindow):
    - remove redundant willMoveOffscreen/didMoveOnscreen calls - this is handled
      by setIsVisible.
(WebKit::WebPage::setMayStartMediaWhenInWindow):
    - isOnscreen -> isInWindow. We start media when the view is in a window, not
      when the view is visible.
(WebKit::WebPage::setVisibilityStatePrerender):
    - setVisibilityState -> setIsPrerender.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge didMoveOnscreen / page visibility to isVisible
https://bugs.webkit.org/show_bug.cgi?id=126268

Build fix.

* UIProcess/WebContext.h: Removed some accidental input.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor ViewState handling for drawing area / plugins
https://bugs.webkit.org/show_bug.cgi?id=126272

Reviewed by Tim Horton.

Instead of all ViewState changes being handled by the WebPage, notify the DrawingArea & PluginView to better encapsulate.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewStateDidChange):
(WebKit::PluginView::platformViewStateDidChange):
    - added, handle changes in ViewState relevant to PluginView.
(WebKit::PluginView::didInitializePlugin):
    - helper function removed.
* WebProcess/Plugins/PluginView.h:
    - added/removed function declarations.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
    - declare viewStateDidChange.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setActive):
    - no need to notify plugin.
(WebKit::WebPage::setViewIsVisible):
    - no need to notify drawing area.
(WebKit::WebPage::setViewState):
    - send viewStateDidChange to drawing area / plugin.
(WebKit::WebPage::setWindowIsVisible):
    - no need to notify plugin.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::layerHostingMode):
    - removed setLayerHostingMode.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
    - declare viewStateDidChange.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
    - added, handle changes in ViewState relevant to DrawingArea.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Tapping any link crashes in WebCore::EventHandler::mouseMoved()
(also crashes when scrolling certain sites)
https://bugs.webkit.org/show_bug.cgi?id=126401
<rdar://problem/15739334>

Reviewed by Tim Horton.

* page/ios/EventHandlerIOS.mm:
(WebCore::currentEventSlot): Make the shared variable have static-storage duration.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [iOS] Tapping any link crashes in WebCore::EventHandler::mouseMoved()
(also crashes when scrolling certain sites)
https://bugs.webkit.org/show_bug.cgi?id=126401
<rdar://problem/15739334>

Patch by Daniel Bates <dabates@apple.com> on 2014-01-02
Reviewed by Tim Horton.

* page/ios/EventHandlerIOS.mm:
(WebCore::currentEventSlot): Make the shared variable have static-storage duration.

Source/WebKit/mac: Remove WindowIsVisible
https://bugs.webkit.org/show_bug.cgi?id=126270

Reviewed by Tim Horton.

We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
The latter detects that the content is hidden in fewer cases than the former, and as such, the
former is always preferable.

This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
Plugin::windowVisibilityChanged.

* WebView/WebView.mm:
(-[WebView _windowWillOrderOnScreen:]):
(-[WebView _windowWillOrderOffScreen:]):
    - rename ContainingWindowIsVisible -> ContentIsVisible.

Source/WebKit2: Remove WindowIsVisible
https://bugs.webkit.org/show_bug.cgi?id=126270

Reviewed by Tim Horton.

We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
The latter detects that the content is hidden in fewer cases than the former, and as such, the
former is always preferable.

This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
Plugin::windowVisibilityChanged.

* Shared/ViewState.h:
    - remove WindowIsVisible.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
    - remove isWindowVisible.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidMiniaturize:]):
(-[WKView _windowDidDeminiaturize:]):
(-[WKView _windowDidOrderOffScreen:]):
(-[WKView _windowDidOrderOnScreen:]):
    - remove ViewState::WindowIsVisible.
* UIProcess/PageClient.h:
    - remove isWindowVisible.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateViewState):
    - remove handling of ViewState::WindowIsVisible.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setIsVisible):
(WebKit::PluginView::didInitializePlugin):
* WebProcess/Plugins/PluginView.h:
    - setWindowIsVisible -> setIsVisible.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewIsVisible):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::windowAndWebPageAreFocused):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isVisible):
    - remove m_windowIsVisible, setWindowIsVisible (implementation moved to setViewIsVisible).



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Storing new CopiedSpace memory into a JSObject should fire a write barrier
https://bugs.webkit.org/show_bug.cgi?id=126025

Reviewed by Filip Pizlo.

Technically this is creating a pointer between a (potentially) old generation object and a young
generation chunk of memory, thus there needs to be a barrier.

* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGOperations.cpp:
* heap/CopyWriteBarrier.h: Added. This class functions similarly to the WriteBarrier class. It
acts as a proxy for pointers to CopiedSpace. Assignments to the field cause a write barrier to
fire for the object that is the owner of the CopiedSpace memory. This is to ensure during nursery
collections that objects with new backing stores are visited, even if they are old generation objects.
(JSC::CopyWriteBarrier::CopyWriteBarrier):
(JSC::CopyWriteBarrier::operator!):
(JSC::CopyWriteBarrier::operator UnspecifiedBoolType*):
(JSC::CopyWriteBarrier::get):
(JSC::CopyWriteBarrier::operator*):
(JSC::CopyWriteBarrier::operator->):
(JSC::CopyWriteBarrier::set):
(JSC::CopyWriteBarrier::setWithoutWriteBarrier):
(JSC::CopyWriteBarrier::clear):
* heap/Heap.h:
* runtime/JSArray.cpp:
(JSC::JSArray::unshiftCountSlowCase):
(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::unshiftCountWithArrayStorage):
* runtime/JSCell.h:
(JSC::JSCell::unvalidatedStructure):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory):
* runtime/JSObject.cpp:
(JSC::JSObject::copyButterfly):
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::putByIndex):
(JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
(JSC::JSObject::createInitialIndexedStorage):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::deletePropertyByIndex):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
(JSC::JSObject::countElements):
(JSC::JSObject::increaseVectorLength):
(JSC::JSObject::ensureLengthSlow):
* runtime/JSObject.h:
(JSC::JSObject::butterfly):
(JSC::JSObject::setStructureAndButterfly):
(JSC::JSObject::setButterflyWithoutChangingStructure):
(JSC::JSObject::JSObject):
(JSC::JSObject::putDirectInternal):
(JSC::JSObject::putDirectWithoutTransition):
* runtime/MapData.cpp:
(JSC::MapData::ensureSpaceForAppend):
* runtime/Structure.cpp:
(JSC::Structure::materializePropertyMap):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Video-seek-with-negative-playback was flaky.
https://bugs.webkit.org/show_bug.cgi?id=126379

Patch by Piotr Grad <p.grad@samsung.com> on 2014-01-02
Reviewed by Eric Carlson.

No new tests. Covered by existing tests.

m_player->setRate() should be called before updating m_playbackRate, because potentiallyPlaying() depends
on endedPlayback(), which checks m_playbackRate.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setPlaybackRate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
"+" is very confusing at http://build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=126400

Reviewed by Tim Horton.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
(BuildbotQueueView.prototype._appendPendingRevisionCount): Instead of listing open
source and internal counts separately, simply add them. One can always open a popover
for more detail.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow ImageBuffer to re-use IOSurfaces
https://bugs.webkit.org/show_bug.cgi?id=125477

Source/WebCore:

Reviewed by Geoff Garen. Modifications reviewed by Tim Horton.

This patch is taken from r160945, but the modifications to ImageBufferCG.cpp
have been reverted.

This test adds a static class, ImageBufferBackingStoreCache, that vends
IOSurfaces. It remembers IOSurfaces that have been returned to it until
a configurable timeout.

The storage used by this class is in the form of a HashMap from a
bucketed size to the IOSurface. There are many other data structures
that could be used, but this implementation gives a 80% hit rate on
normal browsing of some example sites with Canvas and
text-decoration-skip: ink. Because the buckets are fairly
small (rounding the width and height up to multiples of 8), traversing the
bucket contents takes on average 2 steps.

Test: fast/canvas/canvas-backing-store-reuse.html

* WebCore.xcodeproj/project.pbxproj: Added new caching class
* platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Added.
(WebCore::createIOSurface): Copied from ImageBufferCG.cpp
(WebCore::ImageBufferBackingStoreCache::timerFired): Forget the cache
contents
(WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer):
(WebCore::ImageBufferBackingStoreCache::get): Static getter
(WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache):
(WebCore::ImageBufferBackingStoreCache::insertIntoCache): Memory-management
creation function
(WebCore::ImageBufferBackingStoreCache::takeFromCache): Memory-management
deletion function
(WebCore::ImageBufferBackingStoreCache::isAcceptableSurface): Does this cached
IOSurface fit the bill?
(WebCore::ImageBufferBackingStoreCache::tryTakeFromCache): Lookup
a bucket and walk through its contents
(WebCore::ImageBufferBackingStoreCache::getOrAllocate): Public function
for clients who want a IOSurface from the cache
(WebCore::ImageBufferBackingStoreCache::deallocate): Public
function for clients to return an IOSurface to the pool
* platform/graphics/cg/ImageBufferBackingStoreCache.h: Added.
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::~ImageBuffer):

PerformanceTests:

Reviewed by Geoff Garen.

This test times creating a variety of different sizes of canvases
once some have already been created. The second creation of the
canvases should re-use the existing IOSurfaces.

* Canvas/reuse.html: Added.

LayoutTests:

Reviewed by Geoff Garen.

Now that we're re-using the backing store of canvases, this
test makes sure that if we draw to a canvas, then destroy it,
then create a new canvas (which should share the same backing
store) that it doesn't have the stale data in it

* fast/canvas/canvas-backing-store-reuse-expected.txt: Added.
* fast/canvas/canvas-backing-store-reuse.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bindings tests results links are broken at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=126402

Reviewed by Tim Horton.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.bindingsTestResultsURLForIteration): Fixed a typo that was there
since the beginning.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ImageBufferBackingStoreCache should use DeferrableOneShotTimer
https://bugs.webkit.org/show_bug.cgi?id=126155

Reviewed by Anders Carlsson.

Since ImageBufferBackingStoreCache's purge timer is pushed out every time
a backing store is deallocated, we can easily waste a lot of time rescheduling
the timer. Since it's a cache purge timer and doesn't need that kind of precision,
adopt DeferrableOneShotTimer, which is much more performant when deferred frequently.

* platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
(WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache):
(WebCore::ImageBufferBackingStoreCache::timerFired):
(WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer):
* platform/graphics/cg/ImageBufferBackingStoreCache.h:


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