Simplify ScriptFunctionCall by removing dead code.
https://bugs.webkit.org/show_bug.cgi?id=125274

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

* bindings/js/ScriptFunctionCall.cpp:
(WebCore::ScriptFunctionCall::call):
* bindings/js/ScriptFunctionCall.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove Staging Workaround
https://bugs.webkit.org/show_bug.cgi?id=125354

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

* inspector/CodeGeneratorInspector.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL should support all of ValueToInt32
https://bugs.webkit.org/show_bug.cgi?id=125283

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore: 

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileValueToInt32):
(JSC::FTL::LowerDFGToLLVM::compilePutByVal):
(JSC::FTL::LowerDFGToLLVM::lowCell):
(JSC::FTL::LowerDFGToLLVM::isCell):

LayoutTests: 

* js/regress/put-by-val-machine-int-expected.txt: Added.
* js/regress/put-by-val-machine-int.html: Added.
* js/regress/script-tests/put-by-val-machine-int.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] ShapeOutsideInfo needs to use the parent's writing mode when calculating offsets
https://bugs.webkit.org/show_bug.cgi?id=124680

Patch by Rob Buis <rob.buis@samsung.com> on 2013-12-06
Reviewed by Dirk Schulze.

Source/WebCore:

Do not take the writing-mode property on the float into account for shape-outside.
Add a virtual method writingMode() in order to do this for shape-outside but
keep old behavior (element writingMode) for shape-inside.

Change existing test floats/shape-outside-floats-different-writing-modes.html to test the
new behavior.

* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::writingMode):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::writingMode):
* rendering/shapes/ShapeOutsideInfo.h:

LayoutTests:

Make sure the writing-mode property on the float is not taken into account for shape-outside.
Adapt highlight-shape-outside.html so it sets the writing-mode on the container div, not the float.
However because of earlier unreliability in EFL/GTK, skip the test for now.

* TestExpectations:
* fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html:
* inspector-protocol/model/highlight-shape-outside-expected.txt:
* inspector-protocol/model/highlight-shape-outside.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split sizing of VarArgs frames from loading arguments for the frame
https://bugs.webkit.org/show_bug.cgi?id=125331

Reviewed by Filip Pizlo.

Split loadVarargs into sizeAndAllocFrameForVarargs() and loadVarargs() in
preparation for moving onto the C stack.  sizeAndAllocFrameForVarargs() will
compute the size of the callee frame and allocate it, while loadVarargs()
actually loads the argument values.

As part of moving onto the C stack, sizeAndAllocFrameForVarargs() will be
changed to a function that just computes the size.  The caller will use that
size to allocate the new frame on the stack before calling loadVargs() and
actually making the call.

* interpreter/Interpreter.cpp:
(JSC::sizeAndAllocFrameForVarargs):
(JSC::loadVarargs):
* interpreter/Interpreter.h:
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileLoadVarargs):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/VM.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/15606872> REGRESSION (r160148): Mail throws an exception during launch
https://bugs.webkit.org/show_bug.cgi?id=125362

Reviewed by Sam Weinig.

There were two problems in how WKConnection was made to work with WKObject: first,
API::Object::newObject() was not updated to allocate the correct wrapper class, and second,
WebConnection has subclasses with additional data members, which don’t fit in the object
storage ivar.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Changed to allocate a WKConnection of the required size.
* UIProcess/API/Cocoa/WKConnection.mm:
Removed _connection ivar.
(-[WKConnection dealloc]): Changed to use -_connection accessor instead of ivar.
(-[WKConnection setDelegate:]): Ditto.
(-[WKConnection sendMessageWithName:body:]): Ditto.
(-[WKConnection remoteObjectRegistry]): Ditto.
(-[WKConnection _connection]): Added.
(-[WKConnection _apiObject]): Changed to return the object in the instance extra storage.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL should support hole/OOB array accesses
https://bugs.webkit.org/show_bug.cgi?id=118077

Reviewed by Oliver Hunt and Mark Hahnenberg.

Source/JavaScriptCore: 

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::LowerDFGToLLVM::baseIndex):

LayoutTests: 

* js/regress/double-get-by-val-out-of-bounds-expected.txt: Added.
* js/regress/double-get-by-val-out-of-bounds.html: Added.
* js/regress/get-by-val-out-of-bounds-expected.txt: Added.
* js/regress/get-by-val-out-of-bounds.html: Added.
* js/regress/script-tests/double-get-by-val-out-of-bounds.js: Added.
(foo):
* js/regress/script-tests/get-by-val-out-of-bounds.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Strip out extraneous logging from AppleGVA in media tests.
https://bugs.webkit.org/show_bug.cgi?id=125357

Reviewed by Simon Fraser.

Add a mechanism for stripping out abritrary regular expressions from test input and output.

* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._run_compare_test): Strip out logging
* Scripts/webkitpy/port/base.py:
(Port.logging_patterns_to_strip): Return an empty list by default.
* Scripts/webkitpy/port/driver.py:
(DriverOutput.strip_patterns): Apply the port specific patterns to the text.
* Scripts/webkitpy/port/mac.py:
(MacPort.logging_patterns_to_strip): Return a complete list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove Image::decodedSize()
https://bugs.webkit.org/show_bug.cgi?id=125327

Reviewed by Simon Fraser.

Missed a comment when removing this code.

* svg/graphics/SVGImage.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening; revert r160237 after r160247 made it unnecessary.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some duplicate checks from SerializedScriptValue
https://bugs.webkit.org/show_bug.cgi?id=125358

Reviewed by Geoffrey Garen.

There is no need to call inherits() before WebCore's toXXX(JSValue) functions.

Also, the result of toArrayBuffer() is a raw pointer, not a RefPtr (it's confusing
because toArrayBufferView returns a RefPtr).

* bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation, MediaPlayerPrivateMediaSourceAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=123378

Reviewed by Eric Carlson.

Add an AVFoundation implementation of MediaPlayerPrivate which creates and uses
MediaSourcePrivate and SourceBufferPrivate subclasses.

Add the new media engine to the list of installed engines:
* platform/MediaSample.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines):
* platform/graphics/MediaPlayer.h:

Add the new files to the project:
* WebCore.xcodeproj/project.pbxproj:

Drive by fix for ports who implement seekDouble():
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekWithTolerance):

Add new Video and AudioTrackPrivate types which handle their own enable state:
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: Added
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::assetTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Added
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.cpp: Added.
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::assetTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::setSelected):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: Added.

Add a new MediaPlayerPrivate which can handle MediaSource objects:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Added.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareToPlay):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformMedia):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsScanning):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::networkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::readyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsAcceleratedRendering):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareForRendering):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::languageOfPrimaryAudioTrack):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::extraMemoryCost):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateDuration):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateStates):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):

Add a new MediaSourcePrivate implementation:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: Added.
(WebCore::MediaSourcePrivateAVFObjC::player):
(WebCore::MediaSourcePrivateAVFObjC::activeSourceBuffers):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Added.
(WebCore::MediaSourcePrivateAVFObjC::create):
(WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::duration):
(WebCore::MediaSourcePrivateAVFObjC::setDuration):
(WebCore::MediaSourcePrivateAVFObjC::markEndOfStream):
(WebCore::MediaSourcePrivateAVFObjC::unmarkEndOfStream):
(WebCore::MediaSourcePrivateAVFObjC::readyState):
(WebCore::MediaSourcePrivateAVFObjC::setReadyState):
(WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState):
(WebCore::MediaSourcePrivateAVFObjCHasAudio):
(WebCore::MediaSourcePrivateAVFObjC::hasAudio):
(WebCore::MediaSourcePrivateAVFObjCHasVideo):
(WebCore::MediaSourcePrivateAVFObjC::hasVideo):
(WebCore::MediaSourcePrivateAVFObjC::seekToTime):

Add a new SourceBufferPrivate implementation:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]):
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::~MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::platformSample):
(WebCore::CMSampleBufferIsRandomAccess):
(WebCore::MediaSampleAVFObjC::flags):
(WebCore::MediaDescriptionAVFObjC::create):
(WebCore::MediaDescriptionAVFObjC::~MediaDescriptionAVFObjC):
(WebCore::MediaDescriptionAVFObjC::MediaDescriptionAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
(WebCore::callProcessCodedFrameForEachSample):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::didReachEndOfTrackWithTrackID):
(WebCore::SourceBufferPrivateAVFObjC::setClient):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
(WebCore::SourceBufferPrivateAVFObjC::readyState):
(WebCore::SourceBufferPrivateAVFObjC::setReadyState):
(WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames):
(WebCore::SourceBufferPrivateAVFObjC::isFull):
(WebCore::SourceBufferPrivateAVFObjC::hasVideo):
(WebCore::SourceBufferPrivateAVFObjC::hasAudio):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::createNonDisplayingCopy):
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::setActive):
(WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
(WebCore::SourceBufferPrivateAVFObjC::seekToTime):
* platform/mac/PlatformClockCM.h:

Add a SOFT_LINK_CLASS_OPTIONAL macro:
* platform/mac/SoftLinking.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL should support generic ByVal accesses
https://bugs.webkit.org/show_bug.cgi?id=125368

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore: 

* dfg/DFGGraph.h:
(JSC::DFG::Graph::isStrictModeFor):
(JSC::DFG::Graph::ecmaModeFor):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::LowerDFGToLLVM::compilePutByVal):

LayoutTests: 

* js/regress/by-val-generic-expected.txt: Added.
* js/regress/by-val-generic.html: Added.
* js/regress/script-tests/by-val-generic.js: Added.
(foo):



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