Cleanup the Modules group in the WebCore.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=123009

Rubberstamped by Antti Koivisto.

* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix J_JITOperation_EAapJ call for MIPS and ARM EABI.
https://bugs.webkit.org/show_bug.cgi?id=123023

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

* jit/JITInlines.h:
(JSC::JIT::callOperation): EncodedJSValue parameter do not need alignment
using EABI_32BIT_DUMMY_ARG here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for --no-svg option.
m_svgStyle of RenderStyle is guarded with the ENABLE_SVG flag.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::RenderStyle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed the __MAC_OS_X_VERSION_MIN_REQUIRED condition from the definition of WK_API_ENABLED.

Rubber-stamped by Anders Carlsson.

* Shared/API/Cocoa/WKFoundation.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change native function call stubs to use JIT operations instead of ctiVMHandleException
https://bugs.webkit.org/show_bug.cgi?id=122982

Reviewed by Geoffrey Garen.

Change ctiVMHandleException to operationVMHandleException.  Change all exception operations to
return the catch callFrame and entryPC via vm.callFrameForThrow and vm.targetMachinePCForThrow.
This removed calling convention headaches, fixing https://bugs.webkit.org/show_bug.cgi?id=122980
in the process.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileExceptionHandlers):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::jumpToExceptionHandler):
* jit/JIT.cpp:
(JSC::JIT::privateCompileExceptionHandlers):
* jit/JIT.h:
* jit/JITExceptions.cpp:
(JSC::genericUnwind):
* jit/JITExceptions.h:
* jit/JITInlines.h:
(JSC::JIT::callOperationNoExceptionCheck):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_throw):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_throw):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARM64.h:
* jit/JITStubsARMv7.h:
* jit/JITStubsMIPS.h:
* jit/JITStubsMSVC64.asm:
* jit/JITStubsSH4.h:
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:
* jit/Repatch.cpp:
(JSC::tryBuildGetByIDList):
* jit/SlowPathCall.h:
(JSC::JITSlowPathCall::call):
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::nativeForGenerator):
* runtime/VM.h:
(JSC::VM::callFrameForThrowOffset):
(JSC::VM::targetMachinePCForThrowOffset):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a FlushLiveness problem.
https://bugs.webkit.org/show_bug.cgi?id=122984

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-18
Reviewed by Filip Pizlo.

Source/JavaScriptCore:

* dfg/DFGFlushLivenessAnalysisPhase.cpp:
(JSC::DFG::FlushLivenessAnalysisPhase::process):

LayoutTests:

* js/regress/script-tests/stepanov_container.js: Added.
* js/regress/stepanov_container-expected.txt: Added.
* js/regress/stepanov_container.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup webkit.org/team.html
https://bugs.webkit.org/show_bug.cgi?id=123022

Patch by Tibor Meszaros <tmeszaros@inf.u-szeged.hu> on 2013-10-18
Reviewed by Alexey Proskuryakov.

Removed the annoteWithWikiData function, because data it tries to fetch does not exists.

* team.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Group 64-bit specific and 32-bit specific callOperation implementations.
https://bugs.webkit.org/show_bug.cgi?id=123024

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

This is not a big deal, but could be less confusing when reading the code.

* jit/JITInlines.h:
(JSC::JIT::callOperation):
(JSC::JIT::callOperationWithCallFrameRollbackOnException):
(JSC::JIT::callOperationNoExceptionCheck):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mixed content error when accessing webkit.org/team.html over https
https://bugs.webkit.org/show_bug.cgi?id=123020

Patch by Tibor Meszaros <tmeszaros@inf.u-szeged.hu> on 2013-10-18
Reviewed by Alexey Proskuryakov.

When the webkit.org/team.html page is accessed over https most browsers report
Mixed Content error, which is caused by the fact that the contributos.json file
is accessed over a plain http connection and not https.

* team.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add SPI to disable the garbage collector timer
https://bugs.webkit.org/show_bug.cgi?id=122921

Add null check to Heap::setGarbageCollectionTimerEnabled() that I inadvertently
omitted.

* heap/Heap.cpp:
(JSC::Heap::setGarbageCollectionTimerEnabled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rubber-banding is often not smooth on infinitely scrolling websites
https://bugs.webkit.org/show_bug.cgi?id=122985

Reviewed by Simon Fraser.

totalContentsSize is an important part of the calculation for 
maximumScrollPosition(). This function is called repeatedly throughout the curve 
of a rubber-band to determine the stretch amount. To keep the rubber-band 
animation smooth, it should be allowed to finish its animation using the old 
totalContentsSize. This patch does that by adding a new variable, 
m_totalContentsSizeForRubberBand. This value should almost always be equivalent to 
m_totalContentsSize. It will only vary if m_totalContentsSize has changed in the 
middle of a rubber-band, and in that case, it will stay equivalent to the old 
totalContentSize value until the rubber band animation finishes.

* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::totalContentsSizeForRubberBand):
(WebCore::ScrollingTreeScrollingNode::setTotalContentsSizeForRubberBand):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::stopSnapRubberbandTimer):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some Windows specific code from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=123034

Reviewed by Beth Dakin.

* Platform/PlatformProcessIdentifier.h:
* Shared/API/c/WKDeclarationSpecifiers.h:
* UIProcess/API/C/WKNativeEvent.h:
* UIProcess/API/C/WKPreferencesPrivate.h:
* config.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Generate API documentation for GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=121538

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-10-18
Reviewed by Gustavo Noronha Silva.

* GNUmakefile.am: Initialize gdom_symbol_files variable.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Frequent RELEASE_ASSERT crashes in Structure::checkOffsetConsistency on WebGL swizzler tests
https://bugs.webkit.org/show_bug.cgi?id=121661

Reviewed by Mark Hahnenberg.
        
This method shouldn't have been called from the concurrent JIT thread. That's hard to prevent
so I added a return-early check using isCompilationThread().
        
Here's why this makes sense. Structure has two ways to tell you about the layout of the objects
it is describing: m_offset and the property table. Most structures only have m_offset and report
null for the property table. If the property table is there, it will tell you additional
information and that information subsumes m_offset - but the m_offset is still there. So, when
we have a property table, we have to keep it in sync with the m_offset. There is a bunch of
machinery to do this.
        
Changing the property table only happens on the main thread.
        
Because the machinery to change the property table is so complex, especially with respect to
keeping it in sync with m_offset, we have the checkOffsetConsistency method. It's meant to be
called at key points before and after changes to the property table or the offset.

Most clients of Structure who care about object layout, including the concurrent thread, will
want to know m_offset and not the property table. If they want the property table, they will
already be super careful. The concurrent thread has special methods for this, like
Structure::getConcurrently(), which uses fine-grained locking to ensure that it sees a coherent
view of the property table.
        
Adding locking to checkOffsetConsistency() is probably a bad idea since that method may be
called when the relevant lock is already held. So, we'd have awkward recursive locking issues.
        
But right now, the concurrent JIT thread may call a method, like Structure::outOfLineCapacity(),
which has a call to checkOffsetConsistency(). The call to checkOffsetConsistency() is there
because we have found that it helps quickly identify situations where the property table and
m_offset get out of sync - mainly because code that changes either of those things will usually
also want to know the outOfLineCapacity(). But Structure::outOfLineCapacity() doesn't *actually*
need the property table; it uses the m_offset. The concurrent JIT is correct to call
outOfLineCapacity(), and is right to do so without holding any locks (since in all cases where
it calls outOfLineCapacity() it has already proven that m_offset is immutable). But because
outOfLineCapacity() calls checkOffsetConsistency(), and checkOffsetConsistency() doesn't grab
locks, and that same structure is having its property table modified by the main thread, we end
up with these spurious assertion failures. FWIW, the structure isn't *actually* having *its*
property table modified - instead what happens is that some downstream structure steals the
property table and then starts adding things to it. The concurrent thread loads the property
table before it's stolen, and hence the badness.
        
I suspect there are other code paths that lead to the concurrent JIT calling some Structure
method that it is fine and safe to call, but then that method calls checkOffsetConsistency(),
and then you have a possible crash.
        
The most sensible solution to this appears to be to make sure that checkOffsetConsistency() is
aware of its uselessness to the concurrent JIT thread. This change makes it return early if
it's in the concurrent JIT.
        
* runtime/StructureInlines.h:
(JSC::Structure::checkOffsetConsistency):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Rik Cabanier to list of committers
https://bugs.webkit.org/show_bug.cgi?id=123031

reviewed by Dirk Schulze.


* Tools/Scripts/webkitpy/common/config/contributors.json: Added name.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unable to upload <img src="foo.svg"> as WebGL texture
https://bugs.webkit.org/show_bug.cgi?id=123035

Reviewed by Tim Horton.

Source/WebCore:

If the HTMLImageElement passed to texture2D is an SVG
image, paint it first into a bitmap buffer and upload that.
Note that the SVG image still needs to have an intrinsic
or explicit size - see how the test case must set width and
height.

I also renamed the cache of ImageBuffers since it is
no longer only being used for video frames.

Test: fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::WebGLRenderingContext): Rename m_videoCache to m_generatedImageCache.
(WebCore::WebGLRenderingContext::drawImageIntoBuffer): New method that creates an ImageBuffer
of the appropriate size and renders into that.
(WebCore::WebGLRenderingContext::texImage2D): If we see an SVG image, render it first.
(WebCore::WebGLRenderingContext::videoFrameToImage): Renamed m_generatedImageCache.
(WebCore::WebGLRenderingContext::texSubImage2D): If we see an SVG image, render it first.
* html/canvas/WebGLRenderingContext.h: Renaming.

LayoutTests:

Test that creates an HTMLImageElement, sets its source
to an SVG file, and then uploads as a WebGLTexture. Based
on the existing WebGL conformance tests.

* fast/canvas/webgl/resources/red-green.svg: Added.
* fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-svg-image.js: Added.
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image-expected.txt: Added.
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-svg-image.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] WKBrowsingController accessors crash instead of returning nil
https://bugs.webkit.org/show_bug.cgi?id=123036

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(autoreleased): Return nil if the object is NULL.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: CSS Regions: Add the list of flows in the FrameTreeElement
https://bugs.webkit.org/show_bug.cgi?id=122924

Reviewed by Timothy Hatcher.

Added code to collect the flows from the backend into the DOMTree object
on the frontend. Added ContentFlow to represent the flows on the frontend
side and created ContentFlowTreeElement to display the flows in the FrameTreeElement.

* Localizations/en.lproj/localizedStrings.js:
* Scripts/copy-user-interface-resources.sh:
* UserInterface/CSSObserver.js:
(WebInspector.CSSObserver.prototype.namedFlowCreated):
(WebInspector.CSSObserver.prototype.namedFlowRemoved):
(WebInspector.CSSObserver.prototype.regionLayoutUpdated):
(WebInspector.CSSObserver.prototype.regionOversetChanged):
* UserInterface/ContentFlow.js: Added.
(WebInspector.ContentFlow):
(WebInspector.ContentFlow.prototype.get id):
(WebInspector.ContentFlow.prototype.get documentNodeIdentifier):
(WebInspector.ContentFlow.prototype.get name):
(WebInspector.ContentFlow.prototype.get overset):
(WebInspector.ContentFlow.prototype.set overset):
* UserInterface/ContentFlowIcon.css: Added.
(.content-flow-icon .icon):
* UserInterface/ContentFlowTreeElement.js: Added.
(WebInspector.ContentFlowTreeElement):
* UserInterface/DOMTree.js:
(WebInspector.DOMTree):
(WebInspector.DOMTree.prototype.get flowMap):
(WebInspector.DOMTree.prototype.get flowsCount):
(WebInspector.DOMTree.prototype._framePageExecutionContextChanged):
(WebInspector.DOMTree.prototype.requestContentFlowList):
(WebInspector.DOMTree.prototype._isContentFlowInCurrentDocument):
(WebInspector.DOMTree.prototype._contentFlowListWasUpdated):
(WebInspector.DOMTree.prototype._contentFlowWasAdded):
(WebInspector.DOMTree.prototype._contentFlowWasRemoved):
* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager):
(WebInspector.DOMTreeManager._flowPayloadHashKey):
(WebInspector.DOMTreeManager.prototype._buildHighlightConfig):
(WebInspector.DOMTreeManager.prototype._createContentFlowFromPayload):
(WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
(WebInspector.DOMTreeManager.prototype.getNamedFlowCollection):
(WebInspector.DOMTreeManager.prototype.namedFlowCreated):
(WebInspector.DOMTreeManager.prototype.namedFlowRemoved):
(WebInspector.DOMTreeManager.prototype._sendNamedFlowUpdateEvents):
(WebInspector.DOMTreeManager.prototype.regionLayoutUpdated):
(WebInspector.DOMTreeManager.prototype.regionOversetChanged):
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement):
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype.onexpand):
(WebInspector.FrameTreeElement.prototype._childContentFlowWasAdded):
(WebInspector.FrameTreeElement.prototype._childContentFlowWasRemoved):
(WebInspector.FrameTreeElement.prototype._rootDOMNodeInvalidated):
(WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject):
(WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject):
(WebInspector.FrameTreeElement.prototype._addTreeElementForRepresentedObject):
(WebInspector.FrameTreeElement.prototype._compareResourceTreeElements):
(WebInspector.FrameTreeElement.prototype._insertResourceTreeElement):
(WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject):
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
* UserInterface/Images/ContentFlow.svg: Added.
* UserInterface/Main.html:
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove excess reserved space in ctiTrampoline frames for X86 and X86_64.
https://bugs.webkit.org/show_bug.cgi?id=123037.

Reviewed by Geoffrey Garen.

* jit/JITStubsMSVC64.asm:
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of IDBFactoryBackendLevelDB and IDBTransactionBackendLevelDB in IDBDatabaseBackendLevelDB.
https://bugs.webkit.org/show_bug.cgi?id=123039

Reviewed by Anders Carlsson.

Source/WebCore:

Add a few concepts to the interfaces to make this work:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
(WebCore::IDBTransactionBackendInterface::id):
(WebCore::IDBTransactionBackendInterface::IDBTransactionBackendInterface):

Adapt to using Interface ptr’s instead of LevelDB ptr’s:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::create):
(WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
(WebCore::IDBDatabaseBackendLevelDB::createObjectStore):
(WebCore::IDBDatabaseBackendLevelDB::deleteObjectStore):
(WebCore::IDBDatabaseBackendLevelDB::createIndex):
(WebCore::IDBDatabaseBackendLevelDB::deleteIndex):
(WebCore::IDBDatabaseBackendLevelDB::get):
(WebCore::IDBDatabaseBackendLevelDB::put):
(WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
(WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
(WebCore::IDBDatabaseBackendLevelDB::openCursor):
(WebCore::IDBDatabaseBackendLevelDB::count):
(WebCore::IDBDatabaseBackendLevelDB::deleteRange):
(WebCore::IDBDatabaseBackendLevelDB::clear):
(WebCore::IDBDatabaseBackendLevelDB::transactionStarted):
(WebCore::IDBDatabaseBackendLevelDB::transactionFinished):
(WebCore::IDBDatabaseBackendLevelDB::transactionFinishedAndAbortFired):
(WebCore::IDBDatabaseBackendLevelDB::transactionFinishedAndCompleteFired):
(WebCore::IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:

* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
(WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:

* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
(WebCore::IDBTransactionBackendLevelDB::abort):
(WebCore::IDBTransactionBackendLevelDB::commit):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::removeIDBDatabaseBackend): Stub out this new interface method.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

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