[EFL] Change the reversed expected and actual parameter in WebKit1 unit tests
https://bugs.webkit.org/show_bug.cgi?id=98276

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-10-03
Reviewed by Laszlo Gombos.

Expected value should be at first and actual value be followed in ASSERT_STREQ().

* tests/test_ewk_view.cpp:
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory
https://bugs.webkit.org/show_bug.cgi?id=98217

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.exp.in:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

Source/WebKit/blackberry:

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

Source/WebKit/chromium:

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::NonCompositedContentHost):

Source/WebKit/gtk:

* WebCoreSupport/AcceleratedCompositingContextGL.cpp:
(WebKit::AcceleratedCompositingContext::initialize):

Source/WebKit/win:

* WebView.cpp:
(WebView::setAcceleratedCompositing):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::createPageOverlayLayer):
* WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
(WebKit::LayerTreeHostCA::initialize):
(WebKit::LayerTreeHostCA::createPageOverlayLayer):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Delayed structure sweep can leak structures without bound
https://bugs.webkit.org/show_bug.cgi?id=96546

Reviewed by Geoffrey Garen.

This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only
allocators. We now have separate allocators for our three types of objects: those objects with no destructors,
those objects with destructors and with immortal structures, and those objects with destructors that don't have 
immortal structures. All of the objects of the third type (destructors without immortal structures) now 
inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores 
the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction.

Source/JavaScriptCore: 

* API/JSCallbackConstructor.cpp: Use JSDestructibleObject for JSCallbackConstructor.
(JSC):
(JSC::JSCallbackConstructor::JSCallbackConstructor):
* API/JSCallbackConstructor.h:
(JSCallbackConstructor):
* API/JSCallbackObject.cpp: Inherit from JSDestructibleObject for normal JSCallbackObjects and use a finalizer for 
JSCallbackObject<JSGlobalObject>, since JSGlobalObject also uses a finalizer.
(JSC):
(JSC::::create): We need to move the create function for JSCallbackObject<JSGlobalObject> out of line so we can add 
the finalizer for it. We don't want to add the finalizer is something like finishCreation in case somebody decides 
to subclass this. We use this same technique for many other subclasses of JSGlobalObject.
(JSC::::createStructure):
* API/JSCallbackObject.h:
(JSCallbackObject):
(JSC):
* API/JSClassRef.cpp: Change all the JSCallbackObject<JSNonFinalObject> to use JSDestructibleObject instead.
(OpaqueJSClass::prototype):
* API/JSObjectRef.cpp: Ditto.
(JSObjectMake):
(JSObjectGetPrivate):
(JSObjectSetPrivate):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
* API/JSValueRef.cpp: Ditto.
(JSValueIsObjectOfClass):
* API/JSWeakObjectMapRefPrivate.cpp: Ditto.
* JSCTypedArrayStubs.h:
(JSC):
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGSpeculativeJIT.h: Use the proper allocator type when doing inline allocation in the DFG.
(JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject):
(JSC::DFG::SpeculativeJIT::emitAllocateJSFinalObject):
* heap/Heap.cpp:
(JSC):
* heap/Heap.h: Add accessors for the various types of allocators now. Also remove the isSafeToSweepStructures function 
since it's always safe to sweep Structures now.
(JSC::Heap::allocatorForObjectWithNormalDestructor): 
(JSC::Heap::allocatorForObjectWithImmortalStructureDestructor):
(Heap):
(JSC::Heap::allocateWithNormalDestructor):
(JSC):
(JSC::Heap::allocateWithImmortalStructureDestructor):
* heap/IncrementalSweeper.cpp: Remove all the logic to detect when it's safe to sweep Structures from the 
IncrementalSweeper since it's always safe to sweep Structures now.
(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::sweepNextBlock):
(JSC::IncrementalSweeper::startSweeping):
(JSC::IncrementalSweeper::willFinishSweeping):
(JSC):
* heap/IncrementalSweeper.h:
(IncrementalSweeper):
* heap/MarkedAllocator.cpp: Remove the logic that was preventing us from sweeping Structures if it wasn't safe. Add 
tracking of the specific destructor type of allocator. 
(JSC::MarkedAllocator::tryAllocateHelper):
(JSC::MarkedAllocator::allocateBlock):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::destructorType):
(MarkedAllocator):
(JSC::MarkedAllocator::MarkedAllocator):
(JSC::MarkedAllocator::init):
* heap/MarkedBlock.cpp: Add all the destructor type stuff to MarkedBlocks so that we do the right thing when sweeping. 
We also use the stored destructor type to determine the right thing to do in all JSCell::classInfo() calls.
(JSC::MarkedBlock::create):
(JSC::MarkedBlock::MarkedBlock):
(JSC):
(JSC::MarkedBlock::specializedSweep):
(JSC::MarkedBlock::sweep):
(JSC::MarkedBlock::sweepHelper):
* heap/MarkedBlock.h:
(JSC):
(JSC::MarkedBlock::allocator):
(JSC::MarkedBlock::destructorType):
* heap/MarkedSpace.cpp: Add the new destructor allocators to MarkedSpace.
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::canonicalizeCellLivenessData):
(JSC::MarkedSpace::isPagedOut):
(JSC::MarkedSpace::freeBlock):
* heap/MarkedSpace.h:
(MarkedSpace):
(JSC::MarkedSpace::immortalStructureDestructorAllocatorFor):
(JSC::MarkedSpace::normalDestructorAllocatorFor):
(JSC::MarkedSpace::allocateWithImmortalStructureDestructor):
(JSC::MarkedSpace::allocateWithNormalDestructor):
(JSC::MarkedSpace::forEachBlock):
* heap/SlotVisitor.cpp: Add include because the symbol was needed in an inlined function.
* jit/JIT.h: Make sure we use the correct allocator when doing inline allocations in the baseline JIT.
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject):
(JSC::JIT::emitAllocateJSFinalObject):
(JSC::JIT::emitAllocateJSArray):
* jsc.cpp: 
(GlobalObject::create): Add finalizer here since JSGlobalObject needs to use a finalizer instead of inheriting from 
JSDestructibleObject.
* runtime/Arguments.cpp: Inherit from JSDestructibleObject.
(JSC):
* runtime/Arguments.h:
(Arguments):
(JSC::Arguments::Arguments):
* runtime/ErrorPrototype.cpp: Added an assert to make sure we have a trivial destructor.
(JSC):
* runtime/Executable.h: Indicate that all of the Executable* classes have immortal Structures.
(JSC):
* runtime/InternalFunction.cpp: Inherit from JSDestructibleObject.
(JSC):
(JSC::InternalFunction::InternalFunction):
* runtime/InternalFunction.h:
(InternalFunction):
* runtime/JSCell.h: Added two static bools, needsDestruction and hasImmortalStructure, that classes can override 
to indicate at compile time which part of the heap they should be allocated in.
(JSC::allocateCell): Use the appropriate allocator depending on the destructor type.
* runtime/JSDestructibleObject.h: Added. New class that stores the ClassInfo of any subclass so that it can be 
accessed safely when the object is being destroyed.
(JSC):
(JSDestructibleObject):
(JSC::JSDestructibleObject::classInfo):
(JSC::JSDestructibleObject::JSDestructibleObject):
(JSC::JSCell::classInfo): Checks the current MarkedBlock to see where it should get the ClassInfo from so that it's always safe.
* runtime/JSGlobalObject.cpp: JSGlobalObject now uses a finalizer instead of a destructor so that it can avoid forcing all 
of its relatives in the inheritance hierarchy (e.g. JSScope) to use destructors as well.
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObject.h:
(JSGlobalObject):
(JSC::JSGlobalObject::createRareDataIfNeeded): Since we always create a finalizer now, we don't have to worry about adding one 
for the m_rareData field when it's created.
(JSC::JSGlobalObject::create):
(JSC):
* runtime/JSGlobalThis.h: Inherit from JSDestructibleObject.
(JSGlobalThis):
(JSC::JSGlobalThis::JSGlobalThis):
* runtime/JSPropertyNameIterator.h: Has an immortal Structure.
(JSC):
* runtime/JSScope.cpp:
(JSC):
* runtime/JSString.h: Has an immortal Structure.
(JSC):
* runtime/JSWrapperObject.h: Inherit from JSDestructibleObject.
(JSWrapperObject):
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/MathObject.cpp: Cleaning up some of the inheritance stuff.
(JSC):
* runtime/NameInstance.h: Inherit from JSDestructibleObject.
(NameInstance):
* runtime/RegExp.h: Has immortal Structure.
(JSC):
* runtime/RegExpObject.cpp: Inheritance cleanup.
(JSC):
* runtime/SparseArrayValueMap.h: Has immortal Structure.
(JSC):
* runtime/Structure.h: Has immortal Structure.
(JSC):
* runtime/StructureChain.h: Ditto.
(JSC):
* runtime/SymbolTable.h: Ditto.
(SharedSymbolTable):
(JSC):

Source/WebCore: 

No new tests.

* ForwardingHeaders/runtime/JSDestructableObject.h: Added.
* bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject.
(JSDOMWrapper):
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject,
e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true.
(GenerateHeader):
* bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject.
(ObjcFallbackObjectImp):
* bridge/objc/objc_runtime.mm:
(Bindings):
(JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
* bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject.
(JSC):
(JSC::RuntimeArray::destroy):
* bridge/runtime_array.h:
(JSC::RuntimeArray::create):
(JSC):
* bridge/runtime_object.cpp: Inherit from JSDestructibleObject.
(Bindings):
(JSC::Bindings::RuntimeObject::RuntimeObject):
* bridge/runtime_object.h:
(RuntimeObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening -- added expectations for 3 time-suggestion-picker-appearance tests.

* platform/chromium-linux/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-expected.png: Added.
* platform/chromium-linux/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl-expected.png: Added.
* platform/chromium-linux/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviwed gardening -- adjusted expectations for tiny-layer-rotated.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of warning about non-existant platform name when loading garden-o-matic
https://bugs.webkit.org/show_bug.cgi?id=98282

Reviewed by Adam Barth.

If you loaded without a platform query parameter we'd return "null" as the platform name
instead of null.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speech JavaScript API: Remove resultdeleted event
https://bugs.webkit.org/show_bug.cgi?id=98272

Reviewed by Adam Barth.

Source/WebCore:

Remove the resultdeleted event. This was never used, and was removed
from the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449

The fast/speech/scripted/basics.html test is updated to reflect this.

* Modules/speech/SpeechRecognition.cpp:
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionEvent.cpp:
* Modules/speech/SpeechRecognitionEvent.h:
(SpeechRecognitionEvent):
* dom/EventNames.h:
(WebCore):

Source/WebKit/chromium:

Remove didDeleteResult. This was never used, and has been removed from
the spec draft.

* public/WebSpeechRecognizerClient.h:
* src/SpeechRecognitionClientProxy.cpp:
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

LayoutTests:

Update layout test not to check for onresultdeleted event handler.

* fast/speech/scripted/basics-expected.txt:
* fast/speech/scripted/basics.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speech JavaScript API: Add SpeechRecognition.interimResults attribute
https://bugs.webkit.org/show_bug.cgi?id=98279

Reviewed by Adam Barth.

Source/WebCore:

Add the interimResults attribute and pass it to the embedder. It was
added to the spec draft in
http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c

Tested in fast/speech/scripted/basics.html

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::start):
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/speech/SpeechRecognition.h:
(WebCore::SpeechRecognition::interimResults):
(WebCore::SpeechRecognition::setInterimResults):
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionClient.h:
(SpeechRecognitionClient):
* Modules/speech/SpeechRecognitionController.h:
(WebCore::SpeechRecognitionController::start):

Source/WebKit/chromium:

Plumb interimResults through to Chromium.

* public/WebSpeechRecognitionParams.h:
(WebKit::WebSpeechRecognitionParams::WebSpeechRecognitionParams):
(WebKit::WebSpeechRecognitionParams::interimResults):
(WebSpeechRecognitionParams):
* src/SpeechRecognitionClientProxy.cpp:
(WebKit::SpeechRecognitionClientProxy::start):
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

LayoutTests:

Update test to check for the interimResults attribute.

* fast/speech/scripted/basics-expected.txt:
* fast/speech/scripted/basics.html:


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