svg/animations/smil-leak-*.svg tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=114280

The tests were still flaky. Changed retry timeout from 0 to 100 ms as previously
suggested by Geoff.

* svg/animations/smil-leak-dynamically-added-element-instances.svg:
* svg/animations/smil-leak-element-instances-noBaseValRef.svg:
* svg/animations/smil-leak-element-instances.svg:
* svg/animations/smil-leak-elements.svg:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList
https://bugs.webkit.org/show_bug.cgi?id=121236

Reviewed by Geoffrey Garen.

Right now, after a collection all MarkedBlocks are in the Marked block state. When lazy sweeping 
happens, if a block returns an empty free list after being swept, we call didConsumeFreeList(), 
which moves the block into the Allocated block state. This happens to both the block that was 
just being allocated out of (i.e. m_currentBlock) as well as any blocks who are completely full. 
We should distinguish between these two cases: m_currentBlock should transition to 
Allocated (because we were just allocating out of it) and any subsequent block that returns an 
empty free list should transition back to the Marked state. This will make the block state more 
consistent with the actual state the block is in, and it will also allow us to speed up moving 
all blocks the the Marked state during generational collection.

Added new RAII-style HeapIterationScope class that notifies the Heap when it is about to be 
iterated and when iteration has finished. Any clients that need accurate liveness data when 
iterating over the Heap now need to use a HeapIterationScope so that the state of Heap can 
be properly restored after they are done iterating. No new GC-allocated objects can be created 
until this object goes out of scope.

* JavaScriptCore.xcodeproj/project.pbxproj:
* debugger/Debugger.cpp: 
(JSC::Debugger::recompileAllJSFunctions): Added HeapIterationScope for the Recompiler iteration.
* heap/Heap.cpp:
(JSC::Heap::willStartIterating): Callback used by HeapIterationScope to indicate that iteration of 
the Heap is about to begin. This will cause cell liveness data to be canonicalized by calling stopAllocating.
(JSC::Heap::didFinishIterating): Same, but indicates that iteration has finished.
(JSC::Heap::globalObjectCount): Used HeapIterationScope.
(JSC::Heap::objectTypeCounts): Ditto.
(JSC::Heap::markDeadObjects): Ditto.
(JSC::Heap::zombifyDeadObjects): Ditto.
* heap/Heap.h:
* heap/HeapIterationScope.h: Added. New RAII-style object for indicating to the Heap that it's about
to be iterated or that iteration has finished.
(JSC::HeapIterationScope::HeapIterationScope):
(JSC::HeapIterationScope::~HeapIterationScope):
* heap/HeapStatistics.cpp:
(JSC::HeapStatistics::showObjectStatistics): Used new HeapIterationScope.
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper): We now treat the case where we have just finished 
allocating out of the current block differently from the case where we sweep a block and it 
returns an empty free list. This was the primary point of this patch.
(JSC::MarkedAllocator::allocateSlowCase): ASSERT that nobody is currently iterating the Heap 
when allocating.
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::reset): All allocators are reset after every collection. We need to make 
sure that the m_lastActiveBlock gets cleared, which it might not always because we don't call 
takeCanonicalizedBlock on blocks in the large allocators.
(JSC::MarkedAllocator::stopAllocating): We shouldn't already have a last active block,
so ASSERT as much.
(JSC::MarkedAllocator::resumeAllocating): Do the opposite of what stopAllocating
does. So, if we don't have a m_lastActiveBlock then we don't have to worry about undoing anything
done by stopAllocating. If we do, then we call resumeAllocating on the block, which returns the FreeList
as it was prior to stopping allocation. We then set the current block to the last active block and 
clear the last active block. 
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::resumeAllocating): Any block resuming allocation should be in 
the Marked state, so ASSERT as much. We always allocate a m_newlyAllocated Bitmap if we're
FreeListed, so if we didn't allocate one then we know we were Marked when allocation was stopped,
so just return early with an empty FreeList. If we do have a non-null m_newlyAllocated Bitmap
then we need to be swept in order to rebuild our FreeList.
* heap/MarkedBlock.h:
(JSC::MarkedBlock::didConsumeEmptyFreeList): This is called if we ever sweep a block and get back
an empty free list. Instead of transitioning to the Allocated state, we now go straight back to the 
Marked state. This makes sense because we weren't actually allocated out of, so we shouldn't be in 
the allocated state. Also added some ASSERTs to make sure that we're in the state that we expect: all of
our mark bits should be set and we should not have a m_newlyAllocated Bitmap.
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::forEachAllocator): Added a new functor-style iteration method so that we can 
easily iterate over each allocator for, e.g., stopping and resuming allocators without
duplicating code. 
(JSC::StopAllocatingFunctor::operator()): New functors for use with forEachAllocator.
(JSC::MarkedSpace::stopAllocating): Ditto.
(JSC::ResumeAllocatingFunctor::operator()): Ditto.
(JSC::MarkedSpace::resumeAllocating): Ditto.
(JSC::MarkedSpace::willStartIterating): Callback that notifies MarkedSpace that it is being iterated.
Does some ASSERTs, sets a flag, canonicalizes cell liveness data by calling stopAllocating.
(JSC::MarkedSpace::didFinishIterating): Ditto, but to signal that iteration has completed.
* heap/MarkedSpace.h:
(JSC::MarkedSpace::iterationInProgress): Returns true if a HeapIterationScope is currently active.
(JSC::MarkedSpace::forEachLiveCell): Accepts a HeapIterationScope to enforce the rule that you have to 
create one prior to iterating over the Heap.
(JSC::MarkedSpace::forEachDeadCell): Ditto.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::haveABadTime): Changed to use new HeapIterationScope.
* runtime/VM.cpp:
(JSC::VM::releaseExecutableMemory): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build following <http://trac.webkit.org/changeset/155591>
(https://bugs.webkit.org/show_bug.cgi?id=121200)

Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateSizes): Substitute isWidget() for isRenderWidget()
as the latter is undefined.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fixing GObject bindings tests after r155850 by adding the *.symbols files that are now also generated.

* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestException.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestNode.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestObj.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.symbols: Added.
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.symbols: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: FrameTree::top() should return a reference.
<https://webkit.org/b/121445>

Reviewed by Anders Carlsson.

There's always a top frame in the tree.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, fixing the GTK WK2 build after r155888.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/API/gtk/PageClientImpl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: TypeError when updating ResourceTreeElement created in strange order
https://bugs.webkit.org/show_bug.cgi?id=121382

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-09-16
Reviewed by Timothy Hatcher.

Patch by Brian Burg. Fix an uncaught exception that can happen on navigations.

* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatus):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/animations/smil-leak-*.svg tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=114280

The tests are still flaky. Ran out of ideas, so marking them as such and leaving them there.

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTF::Deque should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121446

Reviewed by Andreas Kling.

Source/WTF:

* wtf/Deque.h:
Use std::move and std::forward where appropriate and get rid of the PassTraits include.

Tools:

* TestWebKitAPI/Tests/WTF/Deque.cpp:
(TestWebKitAPI::TEST):
Add a test.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MessageQueue should use a Deque of OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=121450

Reviewed by Andreas Kling.

Source/WebCore:

* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::SameDatabasePredicate::operator()):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
* fileapi/FileThread.cpp:
(WebCore::SameInstancePredicate::operator()):
* workers/WorkerRunLoop.cpp:
(WebCore::ModePredicate::operator()):

Source/WTF:

* wtf/MessageQueue.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Rendering stops when mouse is moving for some types of animations.
https://bugs.webkit.org/show_bug.cgi?id=121329

Reviewed by Anders Carlsson.

* WebView.cpp:
(WebView::WebView): Add new display flag.
(WebView::repaint): Mark view as needing a display operation.
(WebView::addToDirtyRegion): Ditto
(WebView::scrollBackingStore): Ditto
(WebView::sizeChanged): Ditto
(WebView::updateBackingStore): Ditto
(WebView::performLayeredWindowUpdate): Mark the WebView as having been
moved to screen.
(WebView::paintIntoWindow): Ditto
(WebView::WebViewWndProc): If the view needs display, and it was not done during
this message loop iteration, draw the screen.
* WebView.h:
(WebView::needsDisplay): Added


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Marked a few tests that are too slow in debug builds, and frequently fail.

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix creation of embedded JS and CSS files on cmake based ports.
https://bugs.webkit.org/show_bug.cgi?id=121448

Reviewed by Joseph Pecoraro.

Just a build fix, layout tests already test this issue.

* CMakeLists.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flaky Test: svg/batik/masking/maskRegions.svg
https://bugs.webkit.org/show_bug.cgi?id=114120

Fails in the same way as many other batik tests.

* platform/mac/TestExpectations: Marking as flaky.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace more uses of PassOwnPtr with OwnPtr in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=121453

Reviewed by Sam Weinig.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SecondaryThreadPendingSyncReply::SecondaryThreadPendingSyncReply):
(CoreIPC::Connection::createSyncMessageEncoder):
(CoreIPC::Connection::sendMessage):
(CoreIPC::Connection::sendSyncReply):
(CoreIPC::Connection::waitForMessage):
(CoreIPC::Connection::sendSyncMessage):
(CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
(CoreIPC::Connection::waitForSyncReply):
(CoreIPC::Connection::processIncomingSyncReply):
(CoreIPC::Connection::processIncomingMessage):
(CoreIPC::Connection::enqueueIncomingMessage):
(CoreIPC::Connection::dispatchMessage):
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::PendingSyncReply::PendingSyncReply):
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::sendOutgoingMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make FloatingObjects own it's FloatingObject instances
https://bugs.webkit.org/show_bug.cgi?id=121323

Reviewed by Alexandru Chiculita.

As part of decoupling FloatingObjects from RenderBlock, change
FloatingObjects to properly manage the FloatingObject instances it
contains.

No new tests, no behavior change.

* rendering/FloatingObjects.cpp:
(WebCore::FloatingObject::FloatingObject): Make the constructors
private so that FloatingObjects can only be created with an OwnPtr.
Also make a RenderBox required to create a FloatingObject.
(WebCore::FloatingObject::create): Factory method to create a vanilla
FloatingObject.
(WebCore::FloatingObject::copyToNewContainer): Factory method to copy
an existing FloatingObject in the case it is overhanging or intruding
and needs to be copied to the block that it overhangs or intrudes
into.
(WebCore::FloatingObject::unsafeClone): Rename this method so it is
more obvious that it really shouldn't be used, and to make it more
obvious that one should use the copyToNewContainer method for all
normal FloatingObject copies.
(WebCore::FloatingObjects::clear): Delete all the FloatingObjects in
the set before clearing it.
(WebCore::FloatingObjects::moveAllToFloatInfoMap): Move all of the
FloatingObjects in the set to a RendererToFloatInfoMap. This is used
in RenderBlockFlow::clearFloats to when it is readding floats after
clearing the set.
(WebCore::FloatingObjects::add): Take an OwnPtr.
(WebCore::FloatingObjects::remove): Delete the removed FloatingObject.
* rendering/FloatingObjects.h: Remove FloatingObject::setRenderer(),
since the RenderBox must be set in the constructor.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Rename clone
to unsafeClone.
(WebCore::RenderBlock::removeFloatingObjects): Don't delete anymore,
since clear does it.
(WebCore::RenderBlock::insertFloatingObject): Handle OwnPtr properly.
(WebCore::RenderBlock::removeFloatingObject): Don't delete anymore,
since remove does it.
(WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
(WebCore::RenderBlock::addOverhangingFloats): Use copyToNewContainer
and OwnPtr.
(WebCore::RenderBlock::addIntrudingFloats): Ditto.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats): Use exportToFloatInfoMap.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS build fix after r155638.

Unreviewed.

* editing/Editor.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: Element::createRenderer() should take references
https://bugs.webkit.org/show_bug.cgi?id=121449

Reviewed by Anders Carlsson.

*Many file elided*


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: ARIA tablist is disabled, but VoiceOver does not speak the tabs as dimmed
https://bugs.webkit.org/show_bug.cgi?id=121408

Reviewed by Darin Adler.

Source/WebCore: 

ARIA says that aria-disabled should propagate to children nodes.

Test: accessibility/aria-disabled-propagated-to-children.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isEnabled):

LayoutTests: 

* accessibility/aria-disabled-propagated-to-children-expected.txt: Added.
* accessibility/aria-disabled-propagated-to-children.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable OS X's unprefixed debug macro
https://bugs.webkit.org/show_bug.cgi?id=121460

Reviewed by Anders Carlsson.

* wtf/Platform.h: OS X defines a serie of platform macros for debugging.
Some of them are really annoying because they use common names (e.g. check()).

Disable those macros so that we are not limited how we name methods and functions.


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