1. 08 Dec, 2013 18 commits
    • fpizlo@apple.com's avatar
      Fold typedArray.length if typedArray is constant · ce995b22
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125252
      
      Source/JavaScriptCore: 
      
      Reviewed by Sam Weinig.
              
      This was meant to be easy. The problem is that there was no good place for putting
      the folding of typedArray.length to a constant. You can't quite do it in the
      bytecode parser because at that point you don't yet know if typedArray is really
      a typed array. You can't do it as part of constant folding because the folder
      assumes that it can opportunistically forward-flow a constant value without changing
      the IR; this doesn't work since we need to first change the IR to register a
      desired watchpoint and only after that can we introduce that constant. We could have
      done it in Fixup but that would have been awkward since Fixup's code for turning a
      GetById of "length" into GetArrayLength is already somewhat complex. We could have
      done it in CSE but CSE is already fairly gnarly and will probably get rewritten.
              
      So I introduced a new phase, called StrengthReduction. This phase should have any
      transformations that don't requite CFA or CSE and that it would be weird to put into
      those other phases.
              
      I also took the opportunity to refactor some of the other folding code.
              
      This also adds a test, but the test couldn't quite be a LayoutTests/js/regress so I
      introduced the notion of JavaScriptCore/tests/stress.
              
      The goal of this patch isn't really to improve performance or anything like that.
      It adds an optimization for completeness, and in doing so it unlocks a bunch of new
      possibilities. The one that I'm most excited about is revealing array length checks
      in DFG IR, which will allow for array bounds check hoisting and elimination.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * dfg/DFGAbstractInterpreterInlines.h:
      (JSC::DFG::::executeEffects):
      * dfg/DFGClobberize.h:
      (JSC::DFG::clobberize):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::fixupNode):
      * dfg/DFGGraph.cpp:
      (JSC::DFG::Graph::tryGetFoldableView):
      (JSC::DFG::Graph::tryGetFoldableViewForChild1):
      * dfg/DFGGraph.h:
      * dfg/DFGNode.h:
      (JSC::DFG::Node::hasTypedArray):
      (JSC::DFG::Node::typedArray):
      * dfg/DFGNodeType.h:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::compileInThreadImpl):
      * dfg/DFGPredictionPropagationPhase.cpp:
      (JSC::DFG::PredictionPropagationPhase::propagate):
      * dfg/DFGSafeToExecute.h:
      (JSC::DFG::safeToExecute):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
      (JSC::DFG::SpeculativeJIT::compileConstantIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGStrengthReductionPhase.cpp: Added.
      (JSC::DFG::StrengthReductionPhase::StrengthReductionPhase):
      (JSC::DFG::StrengthReductionPhase::run):
      (JSC::DFG::StrengthReductionPhase::handleNode):
      (JSC::DFG::StrengthReductionPhase::foldTypedArrayPropertyToConstant):
      (JSC::DFG::performStrengthReduction):
      * dfg/DFGStrengthReductionPhase.h: Added.
      * dfg/DFGWatchpointCollectionPhase.cpp:
      (JSC::DFG::WatchpointCollectionPhase::handle):
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::compileNode):
      (JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):
      (JSC::FTL::LowerDFGToLLVM::compilePutByVal):
      (JSC::FTL::LowerDFGToLLVM::typedArrayLength):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      (functionTransferArrayBuffer):
      * runtime/ArrayBufferView.h:
      * tests/stress: Added.
      * tests/stress/fold-typed-array-properties.js: Added.
      (foo):
      
      Tools: 
      
      Reviewed by Sam Weinig.
              
      Add Source/JavaScriptCore/tests/stress to the set of JS tests. This is where you
      should put tests that run just like JSRegress but don't run as part of LayoutTests.
      Currently I'm using it for tests that require some surgical support from jsc.cpp.
      
      * Scripts/run-javascriptcore-tests:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce995b22
    • weinig@apple.com's avatar
      [Cocoa] Remove webProcessPlugInInitialize: from the WKWebProcessPlugIn protocol · 5398143b
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125405
      
      Reviewed by Dan Bernstein.
      
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
      * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
      (WebKit::InjectedBundle::load):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5398143b
    • commit-queue@webkit.org's avatar
      [WK2] Guard include of SecItemShim.h with ENABLE(SEC_ITEM_SHIM) · b48afca6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125415
      
      Patch by Brian Holt <brian.holt@samsung.com> on 2013-12-08
      Reviewed by Gustavo Noronha Silva.
      
      * NetworkProcess/NetworkProcess.cpp:
      * UIProcess/Network/NetworkProcessProxy.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b48afca6
    • carlosgc@webkit.org's avatar
      [GTK] Do not skip attributes with only custom setter · 0fea17ca
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125417
      
      Reviewed by Gustavo Noronha Silva.
      
      For attributes with a custom setter, we now generate the code as a
      read-only attribute with a getter method, unless it also has a
      custom getter in which case the attribute is skipped.
      
      * bindings/gobject/GNUmakefile.am: Generate WebKitDOMMediaController
      that is now required by an attribute having a custom setter.
      * bindings/gobject/WebKitDOMCustom.cpp: Remove methods that are now generated.
      * bindings/gobject/WebKitDOMCustom.h: Ditto.
      * bindings/gobject/WebKitDOMCustom.symbols: Ditto.
      * bindings/gobject/webkitdom.symbols: Add new symbols.
      * bindings/scripts/CodeGeneratorGObject.pm:
      (SkipAttribute): Do not skip attributes having a custom setter.
      (GetWriteableProperties): Do not include attributes having a
      custom setter.
      (GenerateProperty): Do not return early for attributes having
      custom setter.
      (GenerateFunctions): Do not generate setter for attributes having
      a custom setter.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0fea17ca
    • carlosgc@webkit.org's avatar
      [GTK] Do not generate new dispatch_event methods marked as deprecated · 74c16407
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125416
      
      Reviewed by Gustavo Noronha Silva.
      
      * bindings/scripts/CodeGeneratorGObject.pm:
      (SkipFunction): Skip dispatch_event methods for objects
      implementing EventTarget interface unless they are already
      deprecated.
      (GenerateFunction): Pass also the parentNode to SkipFunction().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74c16407
    • zandobersek@gmail.com's avatar
      [gdb] Update printers for WTF::CString, JSC::JSString · f3fd8327
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124600
      
      Reviewed by Gustavo Noronha Silva.
      
      Update the two printers after they fell behind the changes in implementation.
      
      * gdb/webkit.py:
      (WTFCStringPrinter.to_string):
      (JSCJSStringPrinter.to_string):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3fd8327
    • zandobersek@gmail.com's avatar
      [webkitpy] Add a WestonDriver unit test · 8b66a49d
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125408
      
      Reviewed by Gustavo Noronha Silva.
      
      Add a webkitpy unit test for the Weston driver.
      
      * Scripts/webkitpy/port/westondriver_unittest.py: Added.
      (WestonDriverTest):
      (WestonDriverTest.make_driver): Sets up a new WestonDriver instance for testing purposes.
      (WestonDriverTest.test_start): Check that the Weston compositor is launched properly and that
      the server environment contains proper WAYLAND and GDK_BACKEND entries.
      (WestonDriverTest.test_stop): Check that the Weston compositor is terminated properly and that
      the driver cleans up the temporary directory.
      (WestonDriverTest.test_stop.FakeWestonProcess): A helper class that logs the expected termination.
      (WestonDriverTest.test_stop.FakeWestonProcess.terminate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8b66a49d
    • commit-queue@webkit.org's avatar
      [Gtk] install-dependencies doesn't install libgtk-3-dev · 760f2d60
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125320
      
      Patch by Brendan Long <b.long@cablelabs.com> on 2013-12-08
      Reviewed by Gustavo Noronha Silva.
      
      * gtk/install-dependencies: Add libgtk-3-dev, libsoup2.4 and subversion
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      760f2d60
    • zandobersek@gmail.com's avatar
      Unreviewed GTK gardening. · 6021aaf2
      zandobersek@gmail.com authored
      Removing the baseline added in r160283. It's not really required, the failure is originating
      in an unnecessary and wrong patch that's applied on the Freetype source tree that's used in the
      GTK's Jhbuild setup. That patch will be removed in the near future, but until then the failure
      of accessibility/press-targers-center-point.html should be handled through an expectation.
      
      * platform/gtk/TestExpectations:
      * platform/gtk/accessibility/press-targets-center-point-expected.txt: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6021aaf2
    • zandobersek@gmail.com's avatar
      Unreviewed GTK gardening. Adding expectations for the current test failures. · b061b3b0
      zandobersek@gmail.com authored
      Adding a GTK-specific baseline for a recently introduced a11y test.
      
      * platform/gtk/TestExpectations:
      * platform/gtk/accessibility/press-targets-center-point-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b061b3b0
    • jer.noble@apple.com's avatar
      [MSE] Bring end-of-stream algorithm section up to current spec. · 4fa43c41
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125270
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Test: media/media-source/media-source-end-of-stream.html
      
      Separate the "endOfStream()" method from the "end of stream algorithm".
      
      * Modules/mediasource/MediaSource.cpp:
      (WebCore::SourceBufferIsUpdating): Added predicate function.
      (WebCore::MediaSource::endOfStream): Call streamEndedWithError().
      (WebCore::MediaSource::streamEndedWithError): Added.
      * Modules/mediasource/MediaSource.h:
      * Modules/mediasource/SourceBuffer.cpp:
      (WebCore::SourceBuffer::appendBufferTimerFired): Call streamEndedWithError().
      (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
      * Modules/mediasource/SourceBuffer.h:
      * html/HTMLMediaElement.cpp:
      (HTMLMediaElement::mediaLoadingFailedFatally): Renamed from mediaEngineError.
      (HTMLMediaElement::mediaLoadingFailed): Call renamed method.
      * html/HTMLMediaElement.h:
      * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
      (WebCore::MediaSourcePrivateAVFObjC::markEndOfStream): Set load state to Loaded.
      * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
      (WebCore::MockMediaPlayerMediaSource::setNetworkState): Simple setter.
      * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
      * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
      (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate): Set the intitial duration to NaN.
      (WebCore::MockMediaSourcePrivate::markEndOfStream): Set load state to Loaded.
      
      LayoutTests:
      
      * media/media-source/media-source-end-of-stream-expected.txt: Added.
      * media/media-source/media-source-end-of-stream.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4fa43c41
    • jer.noble@apple.com's avatar
      [MSE][Mac] Crash when removing MediaSource from HTMLMediaElement. · 52e98471
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125269
      
      Reviewed by Sam Weinig.
      
      Fixes the media/media-source/media-source-fastseek.html test when run with MallocScribble enabled.
      
      It's possible for a SourceBufferPrivateAVFObjC to outlive its MediaSourcePrivateAVFObjC, so
      make sure to clear the pointer from the former to the latter when the latter is destroyed.
      That means we now have to check to see if the pointer to the latter is still valid at every
      call site.
      
      As a drive-by fix, rename m_parent to m_mediaSource to more accurately reflect what the pointer
      points to.
      
      * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
      (WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC): Clear the SourceBuffer's backpointer.
      * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
      (WebCore::SourceBufferPrivateAVFObjC::clearMediaSource):
      * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
      (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): Rename m_parent -> m_mediaSource.
      (WebCore::SourceBufferPrivateAVFObjC::append): Check m_mediaSource before calling.
      (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
      (WebCore::SourceBufferPrivateAVFObjC::readyState): Ditto.
      (WebCore::SourceBufferPrivateAVFObjC::setReadyState): Ditto.
      (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
      (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
      (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
      (WebCore::SourceBufferPrivateAVFObjC::setActive): Ditto.
      * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
      (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate): Clear the SourceBuffer's backpointer.
      * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
      (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate): Rename m_parent -> m_mediaSource.
      (WebCore::MockSourceBufferPrivate::removedFromMediaSource): Check m_mediaSource before calling.
      (WebCore::MockSourceBufferPrivate::readyState): Ditto.
      (WebCore::MockSourceBufferPrivate::setReadyState): Ditto.
      (WebCore::MockSourceBufferPrivate::setActive): Ditto.
      * platform/mock/mediasource/MockSourceBufferPrivate.h:
      (WebCore::MockSourceBufferPrivate::clearMediaSource):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52e98471
    • weinig@apple.com's avatar
      [Cocoa] Make WKWebProcessPlugInController work with WKObject wrapping · 5cdd8408
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125404
      
      Reviewed by Dan Bernstein.
      
      * Shared/Cocoa/APIObject.mm:
      (API::Object::newObject):
      * Shared/mac/ObjCObjectGraphCoders.mm:
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
      (-[WKWebProcessPlugInController dealloc]):
      (didCreatePage):
      (willDestroyPage):
      (-[WKWebProcessPlugInController _setPrincipalClassInstance:]):
      (-[WKWebProcessPlugInController API::]):
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
      (WebKit::wrapper):
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h:
      * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
      (WebKit::InjectedBundle::load):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5cdd8408
    • zoltan@webkit.org's avatar
      Remove statusWithDirection static function from RenderBlockLineLayout · d1a9740f
      zoltan@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125372
      
      Reviewed by Andreas Kling.
      
      I run into a FIXME about using BidiStatus constructor rather than statusWithDirection,
      once it's implemented. BidiStatus has got the appropriate constructor now, so I removed
      statusWithDirection and updated the code to use the constructor of BidiStatus.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::constructBidiRunsForSegment):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d1a9740f
    • mitz@apple.com's avatar
      [Cocoa] WebData has a generic wrapper · 6a98cd30
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125402
      
      Reviewed by Sam Weinig.
      
      Added WKNSData, an NSData subclass that confroms to WKObject and wraps a WebData.
      
      * Shared/Cocoa/APIObject.mm:
      (API::Object::newObject): Allocate a WKNSData if the API::Object is data.
      * Shared/Cocoa/WKNSData.h: Added.
      (WebKit::wrapper): Added. Returns a WebData’s wrapper as an NSData.
      * Shared/Cocoa/WKNSData.mm: Added.
      (-[WKNSData dealloc]): Calls the WebData destructor.
      (-[WKNSData length]): Added.
      (-[WKNSData bytes]): Added.
      (-[WKNSData copyWithZone:]): Retains self.
      (-[WKNSData _apiObject]): Returns the wrapped WebData.
      * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a98cd30
    • weinig@apple.com's avatar
      [Cocoa] Make WKWebProcessPlugInBrowserContextController work with WKObject wrapping · 6125ca79
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125403
      
      Reviewed by Dan Bernstein.
      
      * Shared/Cocoa/APIObject.mm:
      (API::Object::newObject):
      * Shared/mac/ObjCObjectGraphCoders.mm:
      (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
      (didCreatePage):
      (willDestroyPage):
      (setUpBundleClient):
      (-[WKWebProcessPlugInController _initWithPrincipalClassInstance:bundle:]):
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
      (-[WKWebProcessPlugInBrowserContextController dealloc]):
      (-[WKWebProcessPlugInBrowserContextController mainFrameDocument]):
      (-[WKWebProcessPlugInBrowserContextController selectedRange]):
      (-[WKWebProcessPlugInBrowserContextController API::]):
      (-[WKWebProcessPlugInBrowserContextController _bundlePageRef]):
      (-[WKWebProcessPlugInBrowserContextController handle]):
      (+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
      (WebKit::wrapper):
      * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
      * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
      (WebKit::InjectedBundle::load):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6125ca79
    • weinig@apple.com's avatar
      [Cocoa] Convert a few more parts of MiniBrowser over to the Objective-C API · 5c17155a
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125401
      
      Reviewed by Dan Bernstein.
      
      * MiniBrowser/mac/WK2BrowserWindowController.m:
      (-[WK2BrowserWindowController fetch:]):
      (-[WK2BrowserWindowController reload:]):
      (-[WK2BrowserWindowController goBack:]):
      (-[WK2BrowserWindowController goForward:]):
      (-[WK2BrowserWindowController validateUserInterfaceItem:]):
      (-[WK2BrowserWindowController currentZoomFactor]):
      (-[WK2BrowserWindowController setCurrentZoomFactor:]):
      (-[WK2BrowserWindowController zoomIn:]):
      (-[WK2BrowserWindowController zoomOut:]):
      (-[WK2BrowserWindowController canResetZoom]):
      (-[WK2BrowserWindowController resetZoom:]):
      (-[WK2BrowserWindowController toggleZoomMode:]):
      (-[WK2BrowserWindowController updateTextFieldFromURL:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c17155a
    • weinig@apple.com's avatar
      Convert MiniBrowser to use WKProcessGroup and WKBrowsingContextGroup · 5318f521
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125400
      
      Reviewed by Dan Bernstein.
      
      * MiniBrowser/mac/AppDelegate.h:
      * MiniBrowser/mac/AppDelegate.m:
      * MiniBrowser/mac/WK2BrowserWindowController.h:
      * MiniBrowser/mac/WK2BrowserWindowController.m:
      (-[WK2BrowserWindowController initWithProcessGroup:browsingContextGroup:]):
      (-[WK2BrowserWindowController dealloc]):
      (createNewPage):
      (-[WK2BrowserWindowController awakeFromNib]):
      (-[WK2BrowserWindowController browsingContextController:didNavigateWithNavigationData:]):
      (-[WK2BrowserWindowController browsingContextController:didPerformClientRedirectFromURL:toURL:]):
      (-[WK2BrowserWindowController browsingContextController:didPerformServerRedirectFromURL:toURL:]):
      (-[WK2BrowserWindowController browsingContextController:didUpdateHistoryTitle:forURL:]):
      Replace global WKContextRef and WKPageGroupRef with WKProcessGroup and WKBrowsingContextGroup. Also
      replace context based WKContextHistoryClient with WKBrowsingContextController based WKBrowsingContextHistoryDelegate
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5318f521
  2. 07 Dec, 2013 15 commits
    • gns@gnome.org's avatar
      [GTK] Run each gtest subtest separately instead of in one go · b2f4758b
      gns@gnome.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125386
      
      Reviewed by Martin Robinson.
      
      This is what other ports are doing (except they build each test as a separate binary)
      and will help with the timeouts we sometimes hit because it applies to the full test
      run.
      
      * Scripts/run-gtk-tests:
      (TestRunner._get_tests_from_google_test_suite): get a list of available sub-tests.
      (TestRunner._run_google_test): run a single subtest from a gtest binary.
      (TestRunner._run_google_test_suite): call the binary once per subtest.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2f4758b
    • changseok.oh@collabora.com's avatar
      Unreviewed. Build fix for gtk port after r160260. · d97b656a
      changseok.oh@collabora.com authored
      * loader/cache/CachedImage.h: Add missing a header.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d97b656a
    • commit-queue@webkit.org's avatar
      [Win][64-bit] Hitting breakpoint assembler instruction in callToJavaScript. · 6a6f233f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=125382
      
      Patch by peavo@outlook.com <peavo@outlook.com> on 2013-12-07
      Reviewed by Michael Saboff.
      
      The WinCairo results from run-javascriptcore-tests are the same as the WinCairo 32-bits results, when removing these breakpoints.
      
      * jit/JITStubsMSVC64.asm: Remove breakpoint instructions.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a6f233f
    • commit-queue@webkit.org's avatar
      Move PrettyPatch related code to prettypatch.py · 23f75aa1
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124937
      
      Patch by Dániel Bátyai <Batyai.Daniel@stud.u-szeged.hu> on 2013-12-07
      Reviewed by Ryosuke Niwa.
      
      This code seems to have a better place here than in Port, since PrettyPatch already knows
      pretty_patch_path, and this also unifies the usage of PrettyPatch
      
      * Scripts/webkitpy/common/prettypatch.py:
      (PrettyPatch.__init__):
      (PrettyPatch.pretty_diff):
      (PrettyPatch):
      (PrettyPatch.pretty_patch_available):
      (PrettyPatch.check_pretty_patch):
      (PrettyPatch.pretty_patch_text):
      * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
      (TestResultWriter.create_text_diff_and_write_result):
      * Scripts/webkitpy/layout_tests/models/test_run_results.py:
      (summarize_results):
      * Scripts/webkitpy/port/base.py:
      (Port.__init__):
      (Port.wdiff_available):
      (Port.check_image_diff):
      (Port.wdiff_text):
      * Scripts/webkitpy/port/base_unittest.py:
      (PortTest.test_pretty_patch_os_error):
      (PortTest.test_pretty_patch_script_error):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23f75aa1
    • gns@gnome.org's avatar
      Fix API test expectation following 160220. · 586038e4
      gns@gnome.org authored
      Rubber-stamped by Martin Robinson.
      
      Source/WebKit/gtk:
      
      * tests/testatkroles.c:
      (finish_loading): rename variable documentFrame -> document.
      (test_webkit_atk_get_role_document_frame): check for ATK_ROLE_DOCUMENT_WEB instead of
      ATK_ROLE_DOCUMENT_FRAME.
      (test_webkit_atk_get_role_heading): rename variable documentFrame -> document.
      (test_webkit_atk_get_role_image): ditto.
      (test_webkit_atk_get_role_link): ditto.
      (test_webkit_atk_get_role_list_and_item): ditto.
      (test_webkit_atk_get_role_paragraph): ditto.
      (test_webkit_atk_get_role_section): ditto.
      (test_webkit_atk_get_role_table): ditto.
      (test_webkit_atk_get_role_separator): ditto.
      (test_webkit_atk_get_role_combobox): ditto.
      (test_webkit_atk_get_role_form): ditto.
      (test_webkit_atk_get_role_check_box): ditto.
      (test_webkit_atk_get_role_entry): ditto.
      (test_webkit_atk_get_role_label): ditto.
      (test_webkit_atk_get_role_listbox): ditto.
      (test_webkit_atk_get_role_password_text): ditto.
      (test_webkit_atk_get_role_push_button): ditto.
      (test_webkit_atk_get_role_radio_button): ditto.
      
      Source/WebKit2:
      
      * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
      (testAtspiBasicHierarchy): check for ATK_ROLE_DOCUMENT_WEB instead of ATK_ROLE_DOCUMENT_FRAME.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      586038e4
    • gns@gnome.org's avatar
      ubuntu software center hits _XReadEvents() error · 64b44a15
      gns@gnome.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123480
      
      Reviewed by Martin Robinson.
      
      * platform/gtk/WidgetBackingStoreGtkX11.cpp:
      (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11): clear the surface
      before freeing the associated pixmap.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64b44a15
    • mitz@apple.com's avatar
      [Mac] MiniBrowser Debug builds are compiled with -Os · f5ea20f4
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125376
      
      Reviewed by Tim Horton.
      
      * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: Set GCC_OPTIMIZATION_LEVEL to 0 for
      the Debug configuration at the project level.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f5ea20f4
    • timothy_horton@apple.com's avatar
      [mac] Keep around more decoded image data, since it's purgeable · 0829a6c2
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125273
      <rdar://problem/13205438>
      
      Unreviewed patch to fix review comments...
      
      
      * platform/graphics/BitmapImage.h:
      Dan noticed that these return statements were improperly indented.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0829a6c2
    • enrica@apple.com's avatar
      Make insertText message asynchronous for iOS. · d6448d94
      enrica@apple.com authored
      Reviewed by Benjamin Poulain.
      
      * UIProcess/ios/WebPageProxyIOS.mm:
      (WebKit::WebPageProxy::insertText):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebPage/ios/WebPageIOS.mm:
      (WebKit::WebPage::insertText):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6448d94
    • jer.noble@apple.com's avatar
      [MSE][Mac] Disable AVFoundation when enabling the MockMediaPlayerMediaSource. · 29318b05
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125338
      
      Reviewed by Darin Adler.
      
      The MediaSource API has some assumptions which break if more than one installed
      media engine supports MediaSources at the same time. So when enabling the mock
      media source engine in DRT or WKTR, disable AVFoundation so that only the mock
      engine will support media source loading.
      
      * testing/Internals.cpp:
      (WebCore::Internals::initializeMockMediaSource):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29318b05
    • antti@apple.com's avatar
      Use NeverDestroyed instead of DEFINE_STATIC_LOCAL · 221d0ad1
      antti@apple.com authored
      Reviewed by Anders Carlsson.
      
      * rendering/RenderText.cpp:
      (WebCore::originalTextMap):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      221d0ad1
    • jer.noble@apple.com's avatar
      [MSE] Add a runtime-setting for the MediaSource constructor. · 9c31d75d
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125336
      
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Add a Setting to enable the MediaSource constructor.
      
      * Modules/mediasource/MediaSource.idl:
      * page/Settings.in:
      
      Source/WebKit/mac:
      
      Add a private WebPreference which controls the WebCore mediaSourceEnabled setting.
      
      * WebView/WebPreferenceKeysPrivate.h:
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      (-[WebPreferences mediaSourceEnabled]):
      (-[WebPreferences setMediaSourceEnabled:]):
      * WebView/WebPreferencesPrivate.h:
      * WebView/WebView.mm:
      (-[WebView _preferencesChanged:]):
      
      Source/WebKit2:
      
      Add a private WKPreferences API to control the WebCore mediaSourceEnabled setting.
      
      * Shared/WebPreferencesStore.h:
      * UIProcess/API/C/WKPreferences.cpp:
      (WKPreferencesSetMediaSourceEnabled):
      (WKPreferencesGetMediaSourceEnabled):
      * UIProcess/API/C/WKPreferencesPrivate.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::updatePreferences):
      
      Tools:
      
      Enable MediaSource in DRT and WKTR.
      
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (resetWebPreferencesToConsistentValues):
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::resetPreferencesToConsistentValues):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c31d75d
    • timothy_horton@apple.com's avatar
      [mac] Keep around more decoded image data, since it's purgeable · 23a22754
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125273
      <rdar://problem/13205438>
      
      Reviewed by Simon Fraser.
      
      No new tests, just an optimization.
      
      Instead of throwing away decoded image data eagerly, allow the operating
      system to manage the memory via the standard purgeability mechanism,
      where it can.
      
      This improves the performance on some pathological cases (extremely large
      animated GIFs) by up to 8x.
      
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::pruneLiveResourcesToSize):
      Don't prune live resources' decoded data if it is purgeable.
      
      * platform/graphics/BitmapImage.cpp:
      (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
      Don't eagerly throw away decoded image data if it's purgeable.
      
      * loader/cache/CachedImage.h:
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::decodedDataIsPurgeable):
      * platform/graphics/BitmapImage.h:
      * platform/graphics/Image.h:
      (WebCore::Image::decodedDataIsPurgeable):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      23a22754
    • antti@apple.com's avatar
      Save original text for RenderText to a map · 4973e7cf
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125278
      
      Reviewed by Darin Adler.
              
      Currently the original text is fetched from the Text node. This is one of the few things 
      where we use the RenderText node pointer and is stopping Text nodes from being anonymous.
              
      It is very rare of original text to differ from the actual text so we can just squirrel the
      original to a map when it differs. This is also simplifies the code.
      
      * rendering/RenderQuote.cpp:
      (WebCore::RenderQuote::styleDidChange):
      (WebCore::RenderQuote::updateDepth):
      * rendering/RenderText.cpp:
      (WebCore::originalTextMap):
      (WebCore::RenderText::RenderText):
      (WebCore::RenderText::~RenderText):
      (WebCore::RenderText::styleDidChange):
      (WebCore::RenderText::originalText):
      (WebCore::RenderText::setTextInternal):
      (WebCore::RenderText::setText):
      * rendering/RenderText.h:
      * rendering/RenderTextFragment.cpp:
      * rendering/RenderTextFragment.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4973e7cf
    • jer.noble@apple.com's avatar
      [MSE] Refactor MediaSourceBase back into MediaSource · aa0a1ac6
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125245
      
      Reviewed by Eric Carlson.
      
      Now that the legacy WebKitMediaSource has been removed, there is no reason to have
      a separate MediaSource and MediaSourceBase. Re-integrate the two.
      
      Copy all the methods from MediaSource into MediaSourceBase, and rename the class MediaSource:
      * Modules/mediasource/MediaSource.cpp: Copied from MediaSourceBase.cpp.
      (WebCore::MediaSource::create): Copied from MediaSource.cpp.
      (WebCore::MediaSource::addSourceBuffer): Ditto.
      (WebCore::MediaSource::removeSourceBuffer): Ditto.
      (WebCore::MediaSource::isTypeSupported): Ditto.
      (WebCore::MediaSource::eventTargetInterface): Ditto.
      (WebCore::MediaSource::sourceBufferDidChangeAcitveState): Ditto.
      * Modules/mediasource/MediaSource.h: Copied from MediaSourceBase.h.
      (WebCore::MediaSource::sourceBuffers): Copied from MediaSource.h.
      (WebCore::MediaSource::activeSourceBuffers): Copied from MediaSource.h.
      * Modules/mediasource/MediaSourceBase.cpp: Removed.
      * Modules/mediasource/MediaSourceBase.h: Removed.
      
      Change all references to MediaSourceBase into MediaSource:
      * Modules/mediasource/DOMURLMediaSource.cpp:
      (WebCore::DOMURLMediaSource::createObjectURL):
      * Modules/mediasource/DOMURLMediaSource.h:
      * Modules/mediasource/MediaSourceRegistry.cpp:
      (WebCore::MediaSourceRegistry::registerURL):
      (WebCore::MediaSourceRegistry::unregisterURL):
      * Modules/mediasource/MediaSourceRegistry.h:
      
      Remove MediaSourceBase.cpp/h from the project file:
      * WebCore.xcodeproj/project.pbxproj:
      * GNUmakefile.list.am:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa0a1ac6
  3. 06 Dec, 2013 7 commits
    • fpizlo@apple.com's avatar
      FTL should support all of Branch/LogicalNot · 10648ef3
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125370
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore: 
      
      * ftl/FTLCapabilities.cpp:
      (JSC::FTL::canCompile):
      * ftl/FTLIntrinsicRepository.h:
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::boolify):
      
      LayoutTests: 
      
      * js/regress/logical-not-expected.txt: Added.
      * js/regress/logical-not.html: Added.
      * js/regress/script-tests/logical-not.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10648ef3
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r159543. · 6c32f4f1
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/159543
      https://bugs.webkit.org/show_bug.cgi?id=125371
      
      Build fix for mac no longer needed (Requested by rfong on
      #webkit).
      
      * ANGLE.xcodeproj/project.pbxproj:
      * src/compiler/glslang_tab.cpp:
      (yysyntax_error):
      (glslang_parse):
      * src/compiler/glslang_tab.h:
      * src/compiler/preprocessor/ExpressionParser.cpp:
      (yy_symbol_print):
      (yy_stack_print):
      (yy_reduce_print):
      (yytnamerr):
      (yysyntax_error):
      (yydestruct):
      (yyparse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c32f4f1
    • eric.carlson@apple.com's avatar
      r159827 broke plug-in snapshotting · 34484f92
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125365
      
      Reviewed by Dean Jackson.
      
      No new tests, covered by existing tests.
      
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Return early if there is NOT
          a page, not if there IS a page.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34484f92
    • bfulgham@apple.com's avatar
      ../JavaScriptCore: [Win] Support compiling with VS2013 · 283982cb
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=125353
      
      Reviewed by Anders Carlsson.
      
      * API/tests/testapi.c: Use C99 defines if available.
      * jit/JITOperations.cpp: Don't attempt to define C linkage when
      returning a C++ object.
      
      ../WebCore: [Win] Support compiling with VS2013
      https://bugs.webkit.org/show_bug.cgi?id=125353
      
      Reviewed by Anders Carlsson.
      
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::create): Use nullptr
      (WebCore::LegacyWebArchive::createFromSelection): Ditto
      
      ../WebKit: [Win] Support compiling with VS2013.
      https://bugs.webkit.org/show_bug.cgi?id=125353
      
      Reviewed by Anders Carlsson.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Provide
      proper exports for VS2013 build.
      
      ../WTF: [Win] Support compiling with VS2013
      https://bugs.webkit.org/show_bug.cgi?id=125353
      
      Reviewed by Anders Carlsson.
      
      * wtf/Compiler.h: Show proper features for VS2012 and VS2013.
      * wtf/MathExtras.h: Don't implement common C99 routines when
      they are available through the runtime libraries.
      * wtf/RetainPtr.h:
      (WTF::RetainPtr::operator bool): Added.
      * wtf/StdLibExtras.h: Use Microsoft's version of make_unique
      when it exists.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      283982cb
    • fpizlo@apple.com's avatar
      FTL should support generic ByVal accesses · 66421ea3
      fpizlo@apple.com authored
      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
      66421ea3
    • jer.noble@apple.com's avatar
      [MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation,... · 1dfc3a43
      jer.noble@apple.com authored
      [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
      1dfc3a43
    • ap@apple.com's avatar
      Remove some duplicate checks from SerializedScriptValue · 49030778
      ap@apple.com authored
      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
      49030778