CodeBlock::prepareForExecution() is silly
https://bugs.webkit.org/show_bug.cgi?id=120453

Reviewed by Oliver Hunt.
        
Instead of saying:
        
    codeBlock->prepareForExecution(stuff, BaselineJIT, more stuff)
        
we should just say:
        
    JIT::compile(stuff, codeBlock, more stuff);
        
And similarly for the LLInt and DFG.
        
This kills a bunch of code, since CodeBlock::prepareForExecution() is just a
wrapper that uses the JITType argument to call into the appropriate execution
engine, which is what the user wanted to do in the first place.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
(JSC::DFG::compile):
* dfg/DFGDriver.h:
(JSC::DFG::tryCompile):
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGWorklist.cpp:
(JSC::DFG::globalWorklist):
* dfg/DFGWorklist.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compile):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntEntrypoint.cpp: Copied from Source/JavaScriptCore/llint/LLIntEntrypoints.cpp.
(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
(JSC::LLInt::setEntrypoint):
* llint/LLIntEntrypoint.h: Copied from Source/JavaScriptCore/llint/LLIntEntrypoints.h.
* llint/LLIntEntrypoints.cpp: Removed.
* llint/LLIntEntrypoints.h: Removed.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reverting a change that was made in https://bugs.webkit.org/show_bug.cgi?id=120472.

* media/track/track-cue-rendering-on-resize-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove code behind ENABLE(DIALOG_ELEMENT)
https://bugs.webkit.org/show_bug.cgi?id=120467

Reviewed by Darin Adler.

It is incomplete and no one is building it.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* css/html.css:
* dom/ContextFeatures.cpp:
* dom/ContextFeatures.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
* dom/Element.h:
(WebCore::Element::isDisabledFormControl):
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
* html/HTMLDialogElement.cpp: Removed.
* html/HTMLDialogElement.h: Removed.
* html/HTMLDialogElement.idl: Removed.
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* rendering/RenderDialog.cpp: Removed.
* rendering/RenderDialog.h: Removed.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderLayer.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isCounter):
* rendering/RenderingAllInOne.cpp:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
https://bugs.webkit.org/show_bug.cgi?id=120483

Reviewed by Anders Carlsson.

* editing/Editor.cpp:
(WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
function on Mac instead of Pasteboard::writeSelection.
(WebCore::Editor::copy): Ditto.

* editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.

* editing/mac/EditorMac.mm:
(WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
for each platform.

* page/DragController.cpp:
(WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
function on Mac instead of Pasteboard::writeSelection.

* platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
that don't belong in this class because they are layering violations; this becomes the to do list for
the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.

* platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
Pasteboard::writeSelectionForTypes, and writeSelection functions.
(WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
(WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeBlock's magic for scaling tier-up thresholds should be more reusable
https://bugs.webkit.org/show_bug.cgi?id=120486

Reviewed by Oliver Hunt.
        
Removed the counterValueForBlah() methods and exposed the reusable scaling logic
as a adjustedCounterValue() method.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::adjustedCounterValue):
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::optimizeAfterLongWarmUp):
(JSC::CodeBlock::optimizeSoon):
* bytecode/CodeBlock.h:
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Kill code that became dead after http://trac.webkit.org/changeset/154833

Rubber stamped by Oliver Hunt.

* dfg/DFGDriver.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r153222, 32-bit): NULL JSValue() seen when running peacekeeper benchmark.
https://bugs.webkit.org/show_bug.cgi?id=120080

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-08-29
Reviewed by Michael Saboff.

* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_get_argument_by_val): Revert changes introduced by r153222 in this function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
According to DOM4, all DocType nodes should have a document
https://bugs.webkit.org/show_bug.cgi?id=99244

Reviewed by Darin Adler.

Source/WebCore:

Doctypes now always have a node document and can be moved across document boundaries as per
the latest DOM4 specification:
http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
http://dom.spec.whatwg.org/#dom-node-ownerdocument

This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
new DocumentType Node to the associated document of the current "context" object. In
DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
document boundaries so that the node can be added to a Document after being created.

This means we will no longer need to special case DocumentType nodes in the code and
Node::document() can no longer return NULL, which means that we'll be able to remove
NULL checks in call sites.

Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).

Test: fast/dom/createDocumentType-ownerDocument.html

* dom/ContainerNode.cpp:
(WebCore::checkAcceptChild):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocumentType):
(WebCore::DOMImplementation::createDocument):
* dom/Node.h:
(WebCore::Node::document):

LayoutTests:

Add layout test to check that DocumentType Nodes have a document after being
created. Also update a few existing test cases to reflect this change.

* fast/dom/DOMImplementation/createDocument-with-used-doctype-expected.txt:
* fast/dom/DOMImplementation/createDocument-with-used-doctype.html:
* fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html:
* fast/dom/XMLSerializer-doctype2-expected.txt:
* fast/dom/XMLSerializer-doctype2.html:
* fast/dom/createDocumentType-ownerDocument-expected.txt: Added.
* fast/dom/createDocumentType-ownerDocument.html: Added.
* fast/dom/move-nodes-across-documents.html:
* fast/dom/node-iterator-with-doctype-root-expected.txt:
* fast/dom/node-iterator-with-doctype-root.html:
* fast/events/dispatch-event-no-document-expected.txt:
* fast/events/dispatch-event-no-document.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Should enable WebGL by default on MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=120420

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Enable WebGL by default on MiniBrowser.

* MiniBrowser/gtk/main.c:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
https://bugs.webkit.org/show_bug.cgi?id=120490

Marking as [ Pass Failure ] for the moment.

* TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inspector: Use a bit of RefPtr::release() in generated code.
<https://webkit.org/b/120485>

Reviewed by Darin Adler.

Just something I spotted while reading InspectorBackendDispatcher.cpp.
Avoid 3 cases of reference count churnery.

* inspector/CodeGeneratorInspectorStrings.py:


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