1. 14 Oct, 2013 2 commits
    • ap@apple.com's avatar
      Add an empty window.crypto.webkitSubtle · be84a7a3
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122778
      
      Reviewed by Mark Hahnenberg.
      
      Source/WebCore:
      
      Tests: security/crypto-subtle-gc-2.html
             security/crypto-subtle-gc-3.html
             security/crypto-subtle-gc.html
      
      * DerivedSources.make: Process SubtleCrypto.idl.
      
      * crypto: Added.
      * WebCore.xcodeproj/project.pbxproj:
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.am:
      * GNUmakefile.list.am:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      
      * bindings/js/JSSubtleCryptoCustom.cpp: Added. Empty for now, but we'll certainly
      need custom bindings code here.
      
      * crypto/SubtleCrypto.cpp: Added.
      (WebCore::SubtleCrypto::SubtleCrypto):
      (WebCore::SubtleCrypto::document):
      * crypto/SubtleCrypto.h: Added.
      * crypto/SubtleCrypto.idl: Added.
      * page/Crypto.cpp:
      (WebCore::Crypto::subtle):
      * page/Crypto.h:
      * page/Crypto.idl:
      
      LayoutTests:
      
      * TestExpectations: The feature isn't enabled anywhere yet, so skipping the new tests.
      
      * security/crypto-subtle-gc-2-expected.txt: Added.
      * security/crypto-subtle-gc-2.html: Added.
      * security/crypto-subtle-gc-3-expected.txt: Added.
      * security/crypto-subtle-gc-3.html: Added.
      * security/crypto-subtle-gc-expected.txt: Added.
      * security/crypto-subtle-gc.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be84a7a3
    • ap@apple.com's avatar
      window.crypto doesn't preserve custom properties · bdb7a794
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122770
      
      Reviewed by Mark Hahnenberg.
      
      Source/WebCore: 
      
      Test: security/crypto-gc.html
      
      Generate isReachableFromOpaqueRoots that makes Crypto live as long as the document
      lives (because that's when it's observable through window object).
      
      * page/Crypto.cpp:
      (WebCore::Crypto::Crypto):
      (WebCore::Crypto::~Crypto):
      (WebCore::Crypto::document):
      * page/Crypto.h:
      (WebCore::Crypto::create):
      Made Crypto a ContextDestructionObserver, so that it can report its document to bindings.
      Removed ScriptWrappable, because it seems to have served no purpose in this class.
      
      * page/Crypto.idl: Added GenerateIsReachable. Removed ImplementationLacksVTable,
      because the class now has a vtable, and can be checked for bindings integrity.
      
      * page/DOMWindow.cpp: (WebCore::DOMWindow::crypto): Pass a document when creating
      crypto.
      
      LayoutTests: 
      
      * security/crypto-gc-expected.txt: Added.
      * security/crypto-gc.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bdb7a794
  2. 15 Aug, 2013 1 commit
    • fpizlo@apple.com's avatar
      Typed arrays should be rewritten · 0e0d9312
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119064
      
      .: 
      
      Reviewed by Oliver Hunt.
      
      Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
      
      * Source/autotools/symbols.filter:
      
      Source/JavaScriptCore: 
      
      Reviewed by Oliver Hunt.
              
      Typed arrays were previously deficient in several major ways:
              
      - They were defined separately in WebCore and in the jsc shell. The two
        implementations were different, and the jsc shell one was basically wrong.
        The WebCore one was quite awful, also.
              
      - Typed arrays were not visible to the JIT except through some weird hooks.
        For example, the JIT could not ask "what is the Structure that this typed
        array would have if I just allocated it from this global object". Also,
        it was difficult to wire any of the typed array intrinsics, because most
        of the functionality wasn't visible anywhere in JSC.
              
      - Typed array allocation was brain-dead. Allocating a typed array involved
        two JS objects, two GC weak handles, and three malloc allocations.
              
      - Neutering. It involved keeping tabs on all native views but not the view
        wrappers, even though the native views can autoneuter just by asking the
        buffer if it was neutered anytime you touch them; while the JS view
        wrappers are the ones that you really want to reach out to.
              
      - Common case-ing. Most typed arrays have one buffer and one view, and
        usually nobody touches the buffer. Yet we created all of that stuff
        anyway, using data structures optimized for the case where you had a lot
        of views.
              
      - Semantic goofs. Typed arrays should, in the future, behave like ES
        features rather than DOM features, for example when it comes to exceptions.
        Firefox already does this and I agree with them.
              
      This patch cleanses our codebase of these sins:
              
      - Typed arrays are almost entirely defined in JSC. Only the lifecycle
        management of native references to buffers is left to WebCore.
              
      - Allocating a typed array requires either two GC allocations (a cell and a
        copied storage vector) or one GC allocation, a malloc allocation, and a
        weak handle (a cell and a malloc'd storage vector, plus a finalizer for the
        latter). The latter is only used for oversize arrays. Remember that before
        it was 7 allocations no matter what.
              
      - Typed arrays require just 4 words of overhead: Structure*, Butterfly*,
        mode/length, void* vector. Before it was a lot more than that - remember,
        there were five additional objects that did absolutely nothing for anybody.
              
      - Native views aren't tracked by the buffer, or by the wrappers. They are
        transient. In the future we'll probably switch to not even having them be
        malloc'd.
              
      - Native array buffers have an efficient way of tracking all of their JS view
        wrappers, both for neutering, and for lifecycle management. The GC
        special-cases native array buffers. This saves a bunch of grief; for example
        it means that a JS view wrapper can refer to its buffer via the butterfly,
        which would be dead by the time we went to finalize.
              
      - Typed array semantics now match Firefox, which also happens to be where the
        standards are going. The discussion on webkit-dev seemed to confirm that
        Chrome is also heading in this direction. This includes making
        Uint8ClampedArray not a subtype of Uint8Array, and getting rid of
        ArrayBufferView as a JS-visible construct.
              
      This is up to a 10x speed-up on programs that allocate a lot of typed arrays.
      It's a 1% speed-up on Octane. It also opens up a bunch of possibilities for
      further typed array optimizations in the JSC JITs, including inlining typed
      array allocation, inlining more of the accessors, reducing the cost of type
      checks, etc.
              
      An additional property of this patch is that typed arrays are mostly
      implemented using templates. This deduplicates a bunch of code, but does mean
      that we need some hacks for exporting s_info's of template classes. See
      JSGenericTypedArrayView.h and JSTypedArrays.cpp. Those hacks are fairly
      low-impact compared to code duplication.
              
      Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * JSCTypedArrayStubs.h: Removed.
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/ByValInfo.h:
      (JSC::hasOptimizableIndexingForClassInfo):
      (JSC::jitArrayModeForClassInfo):
      (JSC::typedArrayTypeForJITArrayMode):
      * bytecode/SpeculatedType.cpp:
      (JSC::speculationFromClassInfo):
      * dfg/DFGArrayMode.cpp:
      (JSC::DFG::toTypedArrayType):
      * dfg/DFGArrayMode.h:
      (JSC::DFG::ArrayMode::typedArrayType):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::checkArray):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/CopyToken.h:
      * heap/DeferGC.h:
      (JSC::DeferGCForAWhile::DeferGCForAWhile):
      (JSC::DeferGCForAWhile::~DeferGCForAWhile):
      * heap/GCIncomingRefCounted.h: Added.
      (JSC::GCIncomingRefCounted::GCIncomingRefCounted):
      (JSC::GCIncomingRefCounted::~GCIncomingRefCounted):
      (JSC::GCIncomingRefCounted::numberOfIncomingReferences):
      (JSC::GCIncomingRefCounted::incomingReferenceAt):
      (JSC::GCIncomingRefCounted::singletonFlag):
      (JSC::GCIncomingRefCounted::hasVectorOfCells):
      (JSC::GCIncomingRefCounted::hasAnyIncoming):
      (JSC::GCIncomingRefCounted::hasSingleton):
      (JSC::GCIncomingRefCounted::singleton):
      (JSC::GCIncomingRefCounted::vectorOfCells):
      * heap/GCIncomingRefCountedInlines.h: Added.
      (JSC::::addIncomingReference):
      (JSC::::filterIncomingReferences):
      * heap/GCIncomingRefCountedSet.h: Added.
      (JSC::GCIncomingRefCountedSet::size):
      * heap/GCIncomingRefCountedSetInlines.h: Added.
      (JSC::::GCIncomingRefCountedSet):
      (JSC::::~GCIncomingRefCountedSet):
      (JSC::::addReference):
      (JSC::::sweep):
      (JSC::::removeAll):
      (JSC::::removeDead):
      * heap/Heap.cpp:
      (JSC::Heap::addReference):
      (JSC::Heap::extraSize):
      (JSC::Heap::size):
      (JSC::Heap::capacity):
      (JSC::Heap::collect):
      (JSC::Heap::decrementDeferralDepth):
      (JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
      * heap/Heap.h:
      * interpreter/CallFrame.h:
      (JSC::ExecState::dataViewTable):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::privateCompileGetByVal):
      (JSC::JIT::privateCompilePutByVal):
      (JSC::JIT::emitIntTypedArrayGetByVal):
      (JSC::JIT::emitFloatTypedArrayGetByVal):
      (JSC::JIT::emitIntTypedArrayPutByVal):
      (JSC::JIT::emitFloatTypedArrayPutByVal):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      * runtime/ArrayBuffer.cpp:
      (JSC::ArrayBuffer::transfer):
      * runtime/ArrayBuffer.h:
      (JSC::ArrayBuffer::createAdopted):
      (JSC::ArrayBuffer::ArrayBuffer):
      (JSC::ArrayBuffer::gcSizeEstimateInBytes):
      (JSC::ArrayBuffer::pin):
      (JSC::ArrayBuffer::unpin):
      (JSC::ArrayBufferContents::tryAllocate):
      * runtime/ArrayBufferView.cpp:
      (JSC::ArrayBufferView::ArrayBufferView):
      (JSC::ArrayBufferView::~ArrayBufferView):
      (JSC::ArrayBufferView::setNeuterable):
      * runtime/ArrayBufferView.h:
      (JSC::ArrayBufferView::isNeutered):
      (JSC::ArrayBufferView::buffer):
      (JSC::ArrayBufferView::baseAddress):
      (JSC::ArrayBufferView::byteOffset):
      (JSC::ArrayBufferView::verifySubRange):
      (JSC::ArrayBufferView::clampOffsetAndNumElements):
      (JSC::ArrayBufferView::calculateOffsetAndLength):
      * runtime/ClassInfo.h:
      * runtime/CommonIdentifiers.h:
      * runtime/DataView.cpp: Added.
      (JSC::DataView::DataView):
      (JSC::DataView::create):
      (JSC::DataView::wrap):
      * runtime/DataView.h: Added.
      (JSC::DataView::byteLength):
      (JSC::DataView::getType):
      (JSC::DataView::get):
      (JSC::DataView::set):
      * runtime/Float32Array.h:
      * runtime/Float64Array.h:
      * runtime/GenericTypedArrayView.h: Added.
      (JSC::GenericTypedArrayView::data):
      (JSC::GenericTypedArrayView::set):
      (JSC::GenericTypedArrayView::setRange):
      (JSC::GenericTypedArrayView::zeroRange):
      (JSC::GenericTypedArrayView::zeroFill):
      (JSC::GenericTypedArrayView::length):
      (JSC::GenericTypedArrayView::byteLength):
      (JSC::GenericTypedArrayView::item):
      (JSC::GenericTypedArrayView::checkInboundData):
      (JSC::GenericTypedArrayView::getType):
      * runtime/GenericTypedArrayViewInlines.h: Added.
      (JSC::::GenericTypedArrayView):
      (JSC::::create):
      (JSC::::createUninitialized):
      (JSC::::subarray):
      (JSC::::wrap):
      * runtime/IndexingHeader.h:
      (JSC::IndexingHeader::arrayBuffer):
      (JSC::IndexingHeader::setArrayBuffer):
      * runtime/Int16Array.h:
      * runtime/Int32Array.h:
      * runtime/Int8Array.h:
      * runtime/JSArrayBuffer.cpp: Added.
      (JSC::JSArrayBuffer::JSArrayBuffer):
      (JSC::JSArrayBuffer::finishCreation):
      (JSC::JSArrayBuffer::create):
      (JSC::JSArrayBuffer::createStructure):
      (JSC::JSArrayBuffer::getOwnPropertySlot):
      (JSC::JSArrayBuffer::getOwnPropertyDescriptor):
      (JSC::JSArrayBuffer::put):
      (JSC::JSArrayBuffer::defineOwnProperty):
      (JSC::JSArrayBuffer::deleteProperty):
      (JSC::JSArrayBuffer::getOwnNonIndexPropertyNames):
      * runtime/JSArrayBuffer.h: Added.
      (JSC::JSArrayBuffer::impl):
      (JSC::toArrayBuffer):
      * runtime/JSArrayBufferConstructor.cpp: Added.
      (JSC::JSArrayBufferConstructor::JSArrayBufferConstructor):
      (JSC::JSArrayBufferConstructor::finishCreation):
      (JSC::JSArrayBufferConstructor::create):
      (JSC::JSArrayBufferConstructor::createStructure):
      (JSC::constructArrayBuffer):
      (JSC::JSArrayBufferConstructor::getConstructData):
      (JSC::JSArrayBufferConstructor::getCallData):
      * runtime/JSArrayBufferConstructor.h: Added.
      * runtime/JSArrayBufferPrototype.cpp: Added.
      (JSC::arrayBufferProtoFuncSlice):
      (JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
      (JSC::JSArrayBufferPrototype::finishCreation):
      (JSC::JSArrayBufferPrototype::create):
      (JSC::JSArrayBufferPrototype::createStructure):
      * runtime/JSArrayBufferPrototype.h: Added.
      * runtime/JSArrayBufferView.cpp: Added.
      (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
      (JSC::JSArrayBufferView::JSArrayBufferView):
      (JSC::JSArrayBufferView::finishCreation):
      (JSC::JSArrayBufferView::getOwnPropertySlot):
      (JSC::JSArrayBufferView::getOwnPropertyDescriptor):
      (JSC::JSArrayBufferView::put):
      (JSC::JSArrayBufferView::defineOwnProperty):
      (JSC::JSArrayBufferView::deleteProperty):
      (JSC::JSArrayBufferView::getOwnNonIndexPropertyNames):
      (JSC::JSArrayBufferView::finalize):
      * runtime/JSArrayBufferView.h: Added.
      (JSC::JSArrayBufferView::sizeOf):
      (JSC::JSArrayBufferView::ConstructionContext::operator!):
      (JSC::JSArrayBufferView::ConstructionContext::structure):
      (JSC::JSArrayBufferView::ConstructionContext::vector):
      (JSC::JSArrayBufferView::ConstructionContext::length):
      (JSC::JSArrayBufferView::ConstructionContext::mode):
      (JSC::JSArrayBufferView::ConstructionContext::butterfly):
      (JSC::JSArrayBufferView::mode):
      (JSC::JSArrayBufferView::vector):
      (JSC::JSArrayBufferView::length):
      (JSC::JSArrayBufferView::offsetOfVector):
      (JSC::JSArrayBufferView::offsetOfLength):
      (JSC::JSArrayBufferView::offsetOfMode):
      * runtime/JSArrayBufferViewInlines.h: Added.
      (JSC::JSArrayBufferView::slowDownAndWasteMemoryIfNecessary):
      (JSC::JSArrayBufferView::buffer):
      (JSC::JSArrayBufferView::impl):
      (JSC::JSArrayBufferView::neuter):
      (JSC::JSArrayBufferView::byteOffset):
      * runtime/JSCell.cpp:
      (JSC::JSCell::slowDownAndWasteMemory):
      (JSC::JSCell::getTypedArrayImpl):
      * runtime/JSCell.h:
      * runtime/JSDataView.cpp: Added.
      (JSC::JSDataView::JSDataView):
      (JSC::JSDataView::create):
      (JSC::JSDataView::createUninitialized):
      (JSC::JSDataView::set):
      (JSC::JSDataView::typedImpl):
      (JSC::JSDataView::getOwnPropertySlot):
      (JSC::JSDataView::getOwnPropertyDescriptor):
      (JSC::JSDataView::slowDownAndWasteMemory):
      (JSC::JSDataView::getTypedArrayImpl):
      (JSC::JSDataView::createStructure):
      * runtime/JSDataView.h: Added.
      * runtime/JSDataViewPrototype.cpp: Added.
      (JSC::JSDataViewPrototype::JSDataViewPrototype):
      (JSC::JSDataViewPrototype::create):
      (JSC::JSDataViewPrototype::createStructure):
      (JSC::JSDataViewPrototype::getOwnPropertySlot):
      (JSC::JSDataViewPrototype::getOwnPropertyDescriptor):
      (JSC::getData):
      (JSC::setData):
      (JSC::dataViewProtoFuncGetInt8):
      (JSC::dataViewProtoFuncGetInt16):
      (JSC::dataViewProtoFuncGetInt32):
      (JSC::dataViewProtoFuncGetUint8):
      (JSC::dataViewProtoFuncGetUint16):
      (JSC::dataViewProtoFuncGetUint32):
      (JSC::dataViewProtoFuncGetFloat32):
      (JSC::dataViewProtoFuncGetFloat64):
      (JSC::dataViewProtoFuncSetInt8):
      (JSC::dataViewProtoFuncSetInt16):
      (JSC::dataViewProtoFuncSetInt32):
      (JSC::dataViewProtoFuncSetUint8):
      (JSC::dataViewProtoFuncSetUint16):
      (JSC::dataViewProtoFuncSetUint32):
      (JSC::dataViewProtoFuncSetFloat32):
      (JSC::dataViewProtoFuncSetFloat64):
      * runtime/JSDataViewPrototype.h: Added.
      * runtime/JSFloat32Array.h: Added.
      * runtime/JSFloat64Array.h: Added.
      * runtime/JSGenericTypedArrayView.h: Added.
      (JSC::JSGenericTypedArrayView::byteLength):
      (JSC::JSGenericTypedArrayView::byteSize):
      (JSC::JSGenericTypedArrayView::typedVector):
      (JSC::JSGenericTypedArrayView::canGetIndexQuickly):
      (JSC::JSGenericTypedArrayView::canSetIndexQuickly):
      (JSC::JSGenericTypedArrayView::getIndexQuicklyAsNativeValue):
      (JSC::JSGenericTypedArrayView::getIndexQuicklyAsDouble):
      (JSC::JSGenericTypedArrayView::getIndexQuickly):
      (JSC::JSGenericTypedArrayView::setIndexQuicklyToNativeValue):
      (JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
      (JSC::JSGenericTypedArrayView::setIndexQuickly):
      (JSC::JSGenericTypedArrayView::canAccessRangeQuickly):
      (JSC::JSGenericTypedArrayView::typedImpl):
      (JSC::JSGenericTypedArrayView::createStructure):
      (JSC::JSGenericTypedArrayView::info):
      (JSC::toNativeTypedView):
      * runtime/JSGenericTypedArrayViewConstructor.h: Added.
      * runtime/JSGenericTypedArrayViewConstructorInlines.h: Added.
      (JSC::::JSGenericTypedArrayViewConstructor):
      (JSC::::finishCreation):
      (JSC::::create):
      (JSC::::createStructure):
      (JSC::constructGenericTypedArrayView):
      (JSC::::getConstructData):
      (JSC::::getCallData):
      * runtime/JSGenericTypedArrayViewInlines.h: Added.
      (JSC::::JSGenericTypedArrayView):
      (JSC::::create):
      (JSC::::createUninitialized):
      (JSC::::validateRange):
      (JSC::::setWithSpecificType):
      (JSC::::set):
      (JSC::::getOwnPropertySlot):
      (JSC::::getOwnPropertyDescriptor):
      (JSC::::put):
      (JSC::::defineOwnProperty):
      (JSC::::deleteProperty):
      (JSC::::getOwnPropertySlotByIndex):
      (JSC::::putByIndex):
      (JSC::::deletePropertyByIndex):
      (JSC::::getOwnNonIndexPropertyNames):
      (JSC::::getOwnPropertyNames):
      (JSC::::visitChildren):
      (JSC::::copyBackingStore):
      (JSC::::slowDownAndWasteMemory):
      (JSC::::getTypedArrayImpl):
      * runtime/JSGenericTypedArrayViewPrototype.h: Added.
      * runtime/JSGenericTypedArrayViewPrototypeInlines.h: Added.
      (JSC::genericTypedArrayViewProtoFuncSet):
      (JSC::genericTypedArrayViewProtoFuncSubarray):
      (JSC::::JSGenericTypedArrayViewPrototype):
      (JSC::::finishCreation):
      (JSC::::create):
      (JSC::::createStructure):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::arrayBufferPrototype):
      (JSC::JSGlobalObject::arrayBufferStructure):
      (JSC::JSGlobalObject::typedArrayStructure):
      * runtime/JSInt16Array.h: Added.
      * runtime/JSInt32Array.h: Added.
      * runtime/JSInt8Array.h: Added.
      * runtime/JSTypedArrayConstructors.cpp: Added.
      * runtime/JSTypedArrayConstructors.h: Added.
      * runtime/JSTypedArrayPrototypes.cpp: Added.
      * runtime/JSTypedArrayPrototypes.h: Added.
      * runtime/JSTypedArrays.cpp: Added.
      * runtime/JSTypedArrays.h: Added.
      * runtime/JSUint16Array.h: Added.
      * runtime/JSUint32Array.h: Added.
      * runtime/JSUint8Array.h: Added.
      * runtime/JSUint8ClampedArray.h: Added.
      * runtime/Operations.h:
      * runtime/Options.h:
      * runtime/SimpleTypedArrayController.cpp: Added.
      (JSC::SimpleTypedArrayController::SimpleTypedArrayController):
      (JSC::SimpleTypedArrayController::~SimpleTypedArrayController):
      (JSC::SimpleTypedArrayController::toJS):
      * runtime/SimpleTypedArrayController.h: Added.
      * runtime/Structure.h:
      (JSC::Structure::couldHaveIndexingHeader):
      * runtime/StructureInlines.h:
      (JSC::Structure::hasIndexingHeader):
      * runtime/TypedArrayAdaptors.h: Added.
      (JSC::IntegralTypedArrayAdaptor::toNative):
      (JSC::IntegralTypedArrayAdaptor::toJSValue):
      (JSC::IntegralTypedArrayAdaptor::toDouble):
      (JSC::FloatTypedArrayAdaptor::toNative):
      (JSC::FloatTypedArrayAdaptor::toJSValue):
      (JSC::FloatTypedArrayAdaptor::toDouble):
      (JSC::Uint8ClampedAdaptor::toNative):
      (JSC::Uint8ClampedAdaptor::toJSValue):
      (JSC::Uint8ClampedAdaptor::toDouble):
      (JSC::Uint8ClampedAdaptor::clamp):
      * runtime/TypedArrayController.cpp: Added.
      (JSC::TypedArrayController::TypedArrayController):
      (JSC::TypedArrayController::~TypedArrayController):
      * runtime/TypedArrayController.h: Added.
      * runtime/TypedArrayDescriptor.h: Removed.
      * runtime/TypedArrayInlines.h: Added.
      * runtime/TypedArrayType.cpp: Added.
      (JSC::classInfoForType):
      (WTF::printInternal):
      * runtime/TypedArrayType.h: Added.
      (JSC::toIndex):
      (JSC::isTypedView):
      (JSC::elementSize):
      (JSC::isInt):
      (JSC::isFloat):
      (JSC::isSigned):
      (JSC::isClamped):
      * runtime/TypedArrays.h: Added.
      * runtime/Uint16Array.h:
      * runtime/Uint32Array.h:
      * runtime/Uint8Array.h:
      * runtime/Uint8ClampedArray.h:
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::~VM):
      * runtime/VM.h:
      
      Source/WebCore: 
      
      Reviewed by Oliver Hunt.
      
      Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
      client of them. There is only one layering violation: WebCore installs a
      WebCoreTypedArrayController on VM, which makes the
      ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
      JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
      alive but if ArrayBuffer is kept alive from native code then the
      JSArrayByffer may die. WebCoreTypedArrayController will keep the
      JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
              
      To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
      changed to make most references to wrappers refer to JSObject* rather than
      JSDOMWrapper*.
              
      Array buffer views are now transient; the JS array buffer view wrappers
      don't own them or keep them alive. This required a bunch of changes to make
      bindings code use RefPtr<ArrayBufferView> to hold onto their views.
              
      Also there is a bunch of new code to make JSC-provided array buffers and
      views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
              
      Finally, the DataView API is now completely different: the JSDataView
      provides the same user-visible JS API but using its own internal magic; the
      C++ code that uses DataView now uses a rather different API that is not
      aware of usual DOM semantics, since it's in JSC and not WebCore. It's
      equally useful for all of WebCore's purposes, but some code had to change
      to adapt the new conventions.
              
      Some tests have been changed or rebased due to changes in behavior, that
      bring us into conformance with where the standards are going and allow us to
      match Firefox behavior.
      
      Automake work and some additional GTK changes courtesy of
      Zan Dobersek <zdobersek@igalia.com>.
              
      Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * ForwardingHeaders/runtime/DataView.h: Added.
      * ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
      * ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
      * ForwardingHeaders/runtime/JSDataView.h: Added.
      * ForwardingHeaders/runtime/JSTypedArrays.h: Added.
      * ForwardingHeaders/runtime/TypedArrayController.h: Added.
      * ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
      * ForwardingHeaders/runtime/TypedArrays.h: Added.
      * GNUmakefile.list.am:
      * Modules/webaudio/RealtimeAnalyser.h:
      * Target.pri:
      * UseJSC.cmake:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSArrayBufferCustom.cpp: Removed.
      * bindings/js/JSArrayBufferViewHelper.h: Removed.
      * bindings/js/JSAudioContextCustom.cpp:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/js/JSBlobCustom.cpp:
      * bindings/js/JSCSSRuleCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSCSSValueCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSCryptoCustom.cpp:
      (WebCore::JSCrypto::getRandomValues):
      * bindings/js/JSDOMBinding.h:
      (WebCore::wrapperOwner):
      (WebCore::wrapperContext):
      (WebCore::getInlineCachedWrapper):
      (WebCore::setInlineCachedWrapper):
      (WebCore::clearInlineCachedWrapper):
      (WebCore::getCachedWrapper):
      (WebCore::cacheWrapper):
      (WebCore::uncacheWrapper):
      (WebCore::wrap):
      (WebCore::toJS):
      (WebCore::toArrayBufferView):
      (WebCore::toInt8Array):
      (WebCore::toInt16Array):
      (WebCore::toInt32Array):
      (WebCore::toUint8Array):
      (WebCore::toUint8ClampedArray):
      (WebCore::toUint16Array):
      (WebCore::toUint32Array):
      (WebCore::toFloat32Array):
      (WebCore::toFloat64Array):
      (WebCore::toDataView):
      * bindings/js/JSDataViewCustom.cpp: Removed.
      * bindings/js/JSDictionary.cpp:
      * bindings/js/JSDictionary.h:
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::JSDocument::location):
      (WebCore::toJS):
      * bindings/js/JSEventCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSFileReaderCustom.cpp:
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSHTMLTemplateElementCustom.cpp:
      (WebCore::JSHTMLTemplateElement::content):
      * bindings/js/JSImageDataCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      * bindings/js/JSMessageEventCustom.cpp:
      * bindings/js/JSMessagePortCustom.cpp:
      * bindings/js/JSSVGPathSegCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSStyleSheetCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSTrackCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::send):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::transferArrayBuffers):
      * bindings/js/WebCoreJSClientData.h:
      (WebCore::initNormalWorldClientData):
      * bindings/js/WebCoreTypedArrayController.cpp: Added.
      (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
      (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
      (WebCore::WebCoreTypedArrayController::toJS):
      (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
      (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
      * bindings/js/WebCoreTypedArrayController.h: Added.
      (WebCore::WebCoreTypedArrayController::wrapperOwner):
      * bindings/scripts/CodeGenerator.pm:
      (ForAllParents):
      (ParseInterface):
      (SkipIncludeHeader):
      (IsTypedArrayType):
      (IsWrapperType):
      * bindings/scripts/CodeGeneratorJS.pm:
      (AddIncludesForType):
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateParametersCheck):
      (GetNativeType):
      (JSValueToNative):
      (NativeToJSValue):
      (GenerateConstructorDefinition):
      (GenerateConstructorHelperMethods):
      * fileapi/WebKitBlobBuilder.cpp:
      (WebCore::BlobBuilder::append):
      * fileapi/WebKitBlobBuilder.h:
      * html/canvas/ArrayBuffer.idl: Removed.
      * html/canvas/ArrayBufferView.idl: Removed.
      * html/canvas/DataView.cpp: Removed.
      * html/canvas/DataView.h: Removed.
      * html/canvas/DataView.idl: Removed.
      * html/canvas/Float32Array.idl: Removed.
      * html/canvas/Float64Array.idl: Removed.
      * html/canvas/Int16Array.idl: Removed.
      * html/canvas/Int32Array.idl: Removed.
      * html/canvas/Int8Array.idl: Removed.
      * html/canvas/Uint16Array.idl: Removed.
      * html/canvas/Uint32Array.idl: Removed.
      * html/canvas/Uint8Array.idl: Removed.
      * html/canvas/Uint8ClampedArray.idl: Removed.
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore::WebGLRenderingContext::readPixels):
      (WebCore::WebGLRenderingContext::validateTexFuncData):
      * page/Crypto.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
      (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
      * platform/graphics/filters/FECustomFilter.h:
      * platform/graphics/filters/FEGaussianBlur.cpp:
      * platform/graphics/filters/FilterEffect.cpp:
      * testing/MockCDM.cpp:
      
      Source/WebKit2: 
      
      Reviewed by Oliver Hunt.
              
      You don't need to include JSUint8Array anymore if you just want to
      unwrap one; JSDOMBinding gives you all of the things you need.
      
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      
      Source/WTF: 
      
      Reviewed by Oliver Hunt.
              
      - Added the notion of a reference counted object that can be marked Deferred,
        which is like a special-purpose upref.
              
      - Added a common byte flipper.
      
      Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
      
      * GNUmakefile.list.am:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/DeferrableRefCounted.h: Added.
      (WTF::DeferrableRefCountedBase::ref):
      (WTF::DeferrableRefCountedBase::hasOneRef):
      (WTF::DeferrableRefCountedBase::refCount):
      (WTF::DeferrableRefCountedBase::isDeferred):
      (WTF::DeferrableRefCountedBase::DeferrableRefCountedBase):
      (WTF::DeferrableRefCountedBase::~DeferrableRefCountedBase):
      (WTF::DeferrableRefCountedBase::derefBase):
      (WTF::DeferrableRefCountedBase::setIsDeferredBase):
      (WTF::DeferrableRefCounted::deref):
      (WTF::DeferrableRefCounted::setIsDeferred):
      (WTF::DeferrableRefCounted::DeferrableRefCounted):
      (WTF::DeferrableRefCounted::~DeferrableRefCounted):
      * wtf/FlipBytes.h: Added.
      (WTF::needToFlipBytesIfLittleEndian):
      (WTF::flipBytes):
      (WTF::flipBytesIfLittleEndian):
      
      LayoutTests: 
      
      Reviewed by Oliver Hunt.
      
      * fast/canvas/webgl/array-set-invalid-arguments-expected.txt:
      * fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
      * fast/canvas/webgl/array-unit-tests-expected.txt:
      * fast/canvas/webgl/array-unit-tests.html:
      * fast/canvas/webgl/data-view-crash-expected.txt:
      * fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:
      (checkView):
      * fast/dom/call-a-constructor-as-a-function-expected.txt:
      * fast/dom/call-a-constructor-as-a-function.html:
      * fast/js/constructor-length.html:
      * fast/js/global-constructors-attributes-dedicated-worker-expected.txt:
      * fast/js/global-constructors-attributes-expected.txt:
      * fast/js/global-constructors-attributes-shared-worker-expected.txt:
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc.html: Added.
      * fast/js/regress/Int32Array-Int8Array-view-alloc-expected.txt: Added.
      * fast/js/regress/Int32Array-Int8Array-view-alloc.html: Added.
      * fast/js/regress/Int32Array-alloc-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-huge-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-huge-long-lived-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-huge-long-lived.html: Added.
      * fast/js/regress/Int32Array-alloc-huge.html: Added.
      * fast/js/regress/Int32Array-alloc-large-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-large-long-lived-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-large-long-lived.html: Added.
      * fast/js/regress/Int32Array-alloc-large.html: Added.
      * fast/js/regress/Int32Array-alloc-long-lived-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-long-lived.html: Added.
      * fast/js/regress/Int32Array-alloc.html: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived-buffer.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc.js: Added.
      * fast/js/regress/script-tests/Int32Array-Int8Array-view-alloc.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-huge-long-lived.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-huge.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-large-long-lived.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-large.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-long-lived.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc.js: Added.
      * platform/mac/fast/js/constructor-length-expected.txt:
      * webgl/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
      * webgl/resources/webgl_test_files/conformance/typedarrays/data-view-test.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e0d9312
  3. 05 Aug, 2013 1 commit
    • oliver@apple.com's avatar
      Move TypedArray implementation into JSC · df606084
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119489
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      Move TypedArray implementation into JSC in advance of re-implementation
      
      * GNUmakefile.list.am:
      * JSCTypedArrayStubs.h:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/ArrayBuffer.cpp: Renamed from Source/WTF/wtf/ArrayBuffer.cpp.
      (JSC::ArrayBuffer::transfer):
      (JSC::ArrayBuffer::addView):
      (JSC::ArrayBuffer::removeView):
      * runtime/ArrayBuffer.h: Renamed from Source/WTF/wtf/ArrayBuffer.h.
      (JSC::ArrayBufferContents::ArrayBufferContents):
      (JSC::ArrayBufferContents::data):
      (JSC::ArrayBufferContents::sizeInBytes):
      (JSC::ArrayBufferContents::transfer):
      (JSC::ArrayBufferContents::copyTo):
      (JSC::ArrayBuffer::isNeutered):
      (JSC::ArrayBuffer::~ArrayBuffer):
      (JSC::ArrayBuffer::clampValue):
      (JSC::ArrayBuffer::create):
      (JSC::ArrayBuffer::createUninitialized):
      (JSC::ArrayBuffer::ArrayBuffer):
      (JSC::ArrayBuffer::data):
      (JSC::ArrayBuffer::byteLength):
      (JSC::ArrayBuffer::slice):
      (JSC::ArrayBuffer::sliceImpl):
      (JSC::ArrayBuffer::clampIndex):
      (JSC::ArrayBufferContents::tryAllocate):
      (JSC::ArrayBufferContents::~ArrayBufferContents):
      * runtime/ArrayBufferView.cpp: Renamed from Source/WTF/wtf/ArrayBufferView.cpp.
      (JSC::ArrayBufferView::ArrayBufferView):
      (JSC::ArrayBufferView::~ArrayBufferView):
      (JSC::ArrayBufferView::neuter):
      * runtime/ArrayBufferView.h: Renamed from Source/WTF/wtf/ArrayBufferView.h.
      (JSC::ArrayBufferView::buffer):
      (JSC::ArrayBufferView::baseAddress):
      (JSC::ArrayBufferView::byteOffset):
      (JSC::ArrayBufferView::setNeuterable):
      (JSC::ArrayBufferView::isNeuterable):
      (JSC::ArrayBufferView::verifySubRange):
      (JSC::ArrayBufferView::clampOffsetAndNumElements):
      (JSC::ArrayBufferView::setImpl):
      (JSC::ArrayBufferView::setRangeImpl):
      (JSC::ArrayBufferView::zeroRangeImpl):
      (JSC::ArrayBufferView::calculateOffsetAndLength):
      * runtime/Float32Array.h: Renamed from Source/WTF/wtf/Float32Array.h.
      (JSC::Float32Array::set):
      (JSC::Float32Array::getType):
      (JSC::Float32Array::create):
      (JSC::Float32Array::createUninitialized):
      (JSC::Float32Array::Float32Array):
      (JSC::Float32Array::subarray):
      * runtime/Float64Array.h: Renamed from Source/WTF/wtf/Float64Array.h.
      (JSC::Float64Array::set):
      (JSC::Float64Array::getType):
      (JSC::Float64Array::create):
      (JSC::Float64Array::createUninitialized):
      (JSC::Float64Array::Float64Array):
      (JSC::Float64Array::subarray):
      * runtime/Int16Array.h: Renamed from Source/WTF/wtf/Int16Array.h.
      (JSC::Int16Array::getType):
      (JSC::Int16Array::create):
      (JSC::Int16Array::createUninitialized):
      (JSC::Int16Array::Int16Array):
      (JSC::Int16Array::subarray):
      * runtime/Int32Array.h: Renamed from Source/WTF/wtf/Int32Array.h.
      (JSC::Int32Array::getType):
      (JSC::Int32Array::create):
      (JSC::Int32Array::createUninitialized):
      (JSC::Int32Array::Int32Array):
      (JSC::Int32Array::subarray):
      * runtime/Int8Array.h: Renamed from Source/WTF/wtf/Int8Array.h.
      (JSC::Int8Array::getType):
      (JSC::Int8Array::create):
      (JSC::Int8Array::createUninitialized):
      (JSC::Int8Array::Int8Array):
      (JSC::Int8Array::subarray):
      * runtime/IntegralTypedArrayBase.h: Renamed from Source/WTF/wtf/IntegralTypedArrayBase.h.
      (JSC::IntegralTypedArrayBase::set):
      (JSC::IntegralTypedArrayBase::IntegralTypedArrayBase):
      * runtime/TypedArrayBase.h: Renamed from Source/WTF/wtf/TypedArrayBase.h.
      (JSC::TypedArrayBase::data):
      (JSC::TypedArrayBase::set):
      (JSC::TypedArrayBase::setRange):
      (JSC::TypedArrayBase::zeroRange):
      (JSC::TypedArrayBase::length):
      (JSC::TypedArrayBase::byteLength):
      (JSC::TypedArrayBase::item):
      (JSC::TypedArrayBase::checkInboundData):
      (JSC::TypedArrayBase::TypedArrayBase):
      (JSC::TypedArrayBase::create):
      (JSC::TypedArrayBase::createUninitialized):
      (JSC::TypedArrayBase::subarrayImpl):
      (JSC::TypedArrayBase::neuter):
      * runtime/Uint16Array.h: Renamed from Source/WTF/wtf/Uint16Array.h.
      (JSC::Uint16Array::getType):
      (JSC::Uint16Array::create):
      (JSC::Uint16Array::createUninitialized):
      (JSC::Uint16Array::Uint16Array):
      (JSC::Uint16Array::subarray):
      * runtime/Uint32Array.h: Renamed from Source/WTF/wtf/Uint32Array.h.
      (JSC::Uint32Array::getType):
      (JSC::Uint32Array::create):
      (JSC::Uint32Array::createUninitialized):
      (JSC::Uint32Array::Uint32Array):
      (JSC::Uint32Array::subarray):
      * runtime/Uint8Array.h: Renamed from Source/WTF/wtf/Uint8Array.h.
      (JSC::Uint8Array::getType):
      (JSC::Uint8Array::create):
      (JSC::Uint8Array::createUninitialized):
      (JSC::Uint8Array::Uint8Array):
      (JSC::Uint8Array::subarray):
      * runtime/Uint8ClampedArray.h: Renamed from Source/WTF/wtf/Uint8ClampedArray.h.
      (JSC::Uint8ClampedArray::getType):
      (JSC::Uint8ClampedArray::create):
      (JSC::Uint8ClampedArray::createUninitialized):
      (JSC::Uint8ClampedArray::zeroFill):
      (JSC::Uint8ClampedArray::set):
      (JSC::Uint8ClampedArray::Uint8ClampedArray):
      (JSC::Uint8ClampedArray::subarray):
      * runtime/VM.h:
      
      Source/WebCore:
      
      Update WebCore for new location of TypedArray implementation.
      
      * ForwardingHeaders/runtime/ArrayBuffer.h: Added.
      * ForwardingHeaders/runtime/ArrayBufferView.h: Added.
      * ForwardingHeaders/runtime/Float32Array.h: Added.
      * ForwardingHeaders/runtime/Float64Array.h: Added.
      * ForwardingHeaders/runtime/Int16Array.h: Added.
      * ForwardingHeaders/runtime/Int32Array.h: Added.
      * ForwardingHeaders/runtime/Int8Array.h: Added.
      * ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Added.
      * ForwardingHeaders/runtime/TypedArrayBase.h: Added.
      * ForwardingHeaders/runtime/Uint16Array.h: Added.
      * ForwardingHeaders/runtime/Uint32Array.h: Added.
      * ForwardingHeaders/runtime/Uint8Array.h: Added.
      * ForwardingHeaders/runtime/Uint8ClampedArray.h: Added.
      * Modules/webaudio/AnalyserNode.h:
      (WebCore::AnalyserNode::getFloatFrequencyData):
      (WebCore::AnalyserNode::getByteFrequencyData):
      (WebCore::AnalyserNode::getByteTimeDomainData):
      * Modules/webaudio/AsyncAudioDecoder.cpp:
      * Modules/webaudio/AsyncAudioDecoder.h:
      (WebCore::AsyncAudioDecoder::DecodingTask::audioData):
      * Modules/webaudio/AudioBuffer.h:
      * Modules/webaudio/AudioContext.cpp:
      * Modules/webaudio/AudioParam.h:
      * Modules/webaudio/AudioParamTimeline.h:
      * Modules/webaudio/PeriodicWave.h:
      * Modules/webaudio/RealtimeAnalyser.cpp:
      * Modules/webaudio/RealtimeAnalyser.h:
      * Modules/webaudio/ScriptProcessorNode.cpp:
      * Modules/webaudio/WaveShaperProcessor.h:
      * Modules/websockets/ThreadableWebSocketChannel.h:
      * Modules/websockets/WebSocket.cpp:
      * Modules/websockets/WebSocket.h:
      * Modules/websockets/WebSocketChannel.cpp:
      * Modules/websockets/WebSocketChannel.h:
      * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
      * Modules/websockets/WorkerThreadableWebSocketChannel.h:
      * WebCore.exp.in:
      * bindings/js/JSArrayBufferCustom.cpp:
      * bindings/js/JSArrayBufferViewHelper.h:
      * bindings/js/JSAudioContextCustom.cpp:
      * bindings/js/JSCryptoCustom.cpp:
      * bindings/js/JSDictionary.h:
      * bindings/js/JSFileReaderCustom.cpp:
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::transferArrayBuffers):
      * bindings/js/SerializedScriptValue.h:
      * bindings/scripts/CodeGeneratorJS.pm:
      (AddIncludesForType):
      (GenerateHeader):
      (NativeToJSValue):
      * dom/MessageEvent.h:
      * fileapi/FileReader.cpp:
      * fileapi/FileReader.h:
      * fileapi/FileReaderLoader.cpp:
      * fileapi/FileReaderLoader.h:
      * fileapi/FileReaderSync.cpp:
      * fileapi/FileReaderSync.h:
      * fileapi/WebKitBlobBuilder.cpp:
      * fileapi/WebKitBlobBuilder.h:
      * html/HTMLMediaElement.cpp:
      * html/ImageData.h:
      * html/canvas/ArrayBuffer.idl:
      * html/canvas/ArrayBufferView.idl:
      * html/canvas/CanvasRenderingContext2D.cpp:
      * html/canvas/DataView.h:
      * html/canvas/Float32Array.idl:
      * html/canvas/Float64Array.idl:
      * html/canvas/Int16Array.idl:
      * html/canvas/Int32Array.idl:
      * html/canvas/Int8Array.idl:
      * html/canvas/Uint16Array.idl:
      * html/canvas/Uint32Array.idl:
      * html/canvas/Uint8Array.idl:
      * html/canvas/Uint8ClampedArray.idl:
      * html/canvas/WebGLBuffer.h:
      (WebCore::WebGLBuffer::elementArrayBuffer):
      * html/canvas/WebGLGetInfo.cpp:
      * html/canvas/WebGLGetInfo.h:
      * html/canvas/WebGLRenderingContext.cpp:
      * html/canvas/WebGLRenderingContext.h:
      * inspector/InspectorMemoryAgent.cpp:
      * page/Crypto.cpp:
      * page/Crypto.h:
      * platform/graphics/GraphicsContext3D.cpp:
      * platform/graphics/ImageBuffer.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      * platform/graphics/cg/ImageBufferDataCG.h:
      * platform/graphics/filters/FEBlend.cpp:
      * platform/graphics/filters/FEColorMatrix.cpp:
      * platform/graphics/filters/FEComponentTransfer.cpp:
      * platform/graphics/filters/FEComposite.cpp:
      * platform/graphics/filters/FEConvolveMatrix.cpp:
      * platform/graphics/filters/FECustomFilter.cpp:
      * platform/graphics/filters/FEDisplacementMap.cpp:
      * platform/graphics/filters/FEDropShadow.cpp:
      * platform/graphics/filters/FEGaussianBlur.cpp:
      * platform/graphics/filters/FELighting.h:
      * platform/graphics/filters/FEMorphology.cpp:
      * platform/graphics/filters/FETurbulence.cpp:
      * platform/graphics/filters/FilterEffect.cpp:
      * platform/graphics/filters/FilterEffect.h:
      * platform/graphics/mac/GraphicsContext3DMac.mm:
      * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
      * testing/Internals.h:
      * xml/XMLHttpRequest.cpp:
      * xml/XMLHttpRequest.h:
      (WebCore::XMLHttpRequest::optionalResponseArrayBuffer):
      
      Source/WTF:
      
      Remove TypedArray implementation from WTF
      
      * GNUmakefile.list.am:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/Forward.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df606084
  4. 11 May, 2013 1 commit
    • l.gombos@samsung.com's avatar
      Remove USE(OS_RANDOMNESS) · 53e97f85
      l.gombos@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=108095
      
      Reviewed by Darin Adler.
      
      Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
      ports.
      
      Source/JavaScriptCore:
      
      * jit/JIT.cpp:
      (JSC::JIT::JIT):
      
      Source/WebCore:
      
      No new tests as this is covered by existing tests.
      
      * page/Crypto.cpp:
      (WebCore::Crypto::getRandomValues):
      * platform/UUID.cpp:
      (WebCore::createCanonicalUUIDString):
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/AboutDataUseFeatures.in:
      
      Source/WTF:
      
      * wtf/CryptographicallyRandomNumber.cpp:
      (WTF::cryptographicallyRandomValues):
      * wtf/CryptographicallyRandomNumber.h:
      * wtf/OSRandomSource.cpp:
      (WTF::cryptographicallyRandomValuesFromOS):
      * wtf/OSRandomSource.h:
      * wtf/Platform.h:
      * wtf/RandomNumber.cpp:
      (WTF::randomNumber):
      * wtf/RandomNumber.h:
      * wtf/RandomNumberSeed.h:
      (WTF::initializeRandomNumberGenerator):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53e97f85
  5. 08 Apr, 2013 1 commit
    • ggaren@apple.com's avatar
      Stop #include-ing all of JavaScriptCore in every DOM-related file · 34e919eb
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114220
      
      Reviewed by Sam Weinig.
      
      ../JavaScriptCore: 
      
      I separated WeakInlines.h from Weak.h so WebCore data types that need
      to declare a Weak<T> data member don't have to #include all of the
      infrastructure for accessing that data member.
      
      This also required separating Weak<T> from PassWeak<T> by removing the
      WeakImplAccessor class template and pushing code down into its subclasses.
      
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/UnlinkedCodeBlock.h:
      * heap/PassWeak.h:
      (JSC):
      (PassWeak):
      (JSC::::PassWeak):
      (JSC::::operator):
      (JSC::::get):
      * heap/SlotVisitorInlines.h:
      * heap/Weak.h:
      (JSC):
      (Weak):
      * heap/WeakInlines.h: Copied from Source/JavaScriptCore/heap/Weak.h.
      (JSC):
      (JSC::::Weak):
      (JSC::::operator):
      (JSC::::get):
      (JSC::::was):
      (JSC::weakClear):
      * jit/JITThunks.h:
      * runtime/RegExpCache.h:
      * runtime/Structure.h:
      * runtime/WeakGCMap.h:
      
      ../WebCore: 
      
      I separated ScriptWrappableInlines.h from ScriptWrappable.h so
      WebCore data types that inherit from ScriptWrappable don't
      have to #include all of the infrastructure for accessing that data member.
      
      * ForwardingHeaders/heap/PassWeak.h: Added.
      * ForwardingHeaders/heap/WeakInlines.h: Added.
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSDOMBinding.h:
      (JSC):
      * bindings/js/JSEventListener.h:
      * bindings/js/JSMutationCallback.cpp:
      * bindings/js/JSNodeFilterCondition.h:
      * bindings/js/ScriptWrappable.h:
      (JSC):
      (WebCore):
      (ScriptWrappable):
      * bindings/js/ScriptWrappableInlines.h: Added.
      (WebCore):
      (WebCore::ScriptWrappable::wrapper):
      (WebCore::ScriptWrappable::setWrapper):
      (WebCore::ScriptWrappable::clearWrapper):
      * bridge/qt/qt_instance.h:
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_root.cpp:
      * bridge/runtime_root.h:
      * css/StylePropertySet.cpp:
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::reportMemoryUsage):
      * dom/Node.cpp:
      (WebCore::Node::reportMemoryUsage):
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * loader/cache/CachedSVGDocument.cpp:
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::reportMemoryUsage):
      
      ../WebKit2: 
      
      * Shared/WebCoreArgumentCoders.cpp:
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34e919eb
  6. 13 Nov, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r134345. · a5d24144
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/134345
      https://bugs.webkit.org/show_bug.cgi?id=102106
      
      Incomplete support for NATIVE_TYPE_ERR in objc and other
      bindings (Requested by jsbell on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-13
      
      Source/WebCore:
      
      * Modules/mediastream/MediaConstraintsImpl.cpp:
      (WebCore::MediaConstraintsImpl::create):
      * Modules/mediastream/MediaStreamTrackList.cpp:
      (WebCore::MediaStreamTrackList::add):
      (WebCore::MediaStreamTrackList::remove):
      * Modules/mediastream/RTCDataChannel.cpp:
      (WebCore::RTCDataChannel::setBinaryType):
      * Modules/mediastream/RTCIceCandidate.cpp:
      (WebCore::RTCIceCandidate::create):
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::parseConfiguration):
      (WebCore::RTCPeerConnection::createOffer):
      (WebCore::RTCPeerConnection::createAnswer):
      (WebCore::RTCPeerConnection::setLocalDescription):
      (WebCore::RTCPeerConnection::setRemoteDescription):
      (WebCore::RTCPeerConnection::addIceCandidate):
      (WebCore::RTCPeerConnection::addStream):
      (WebCore::RTCPeerConnection::removeStream):
      * Modules/mediastream/RTCSessionDescription.cpp:
      (WebCore::RTCSessionDescription::create):
      (WebCore::RTCSessionDescription::setType):
      * bindings/js/CallbackFunction.cpp:
      (WebCore::checkFunctionOnlyCallback):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::create):
      * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
      (WebCore::JSHTMLOptionsCollection::add):
      * bindings/js/JSHTMLSelectElementCustom.cpp:
      (WebCore::selectIndexSetter):
      * bindings/js/JSMutationObserverCustom.cpp:
      (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
      * bindings/js/JSSQLResultSetRowListCustom.cpp:
      (WebCore::JSSQLResultSetRowList::item):
      * bindings/js/JSSQLTransactionCustom.cpp:
      (WebCore::JSSQLTransaction::executeSql):
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      (WebCore::JSSQLTransactionSync::executeSql):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateParametersCheck):
      * bindings/scripts/CodeGeneratorObjC.pm:
      (GenerateImplementation):
      * bindings/scripts/CodeGeneratorV8.pm:
      (GenerateFunctionCallString):
      * bindings/v8/V8Callback.h:
      (WebCore::createFunctionOnlyCallback):
      * bindings/v8/V8Collection.cpp:
      (WebCore::toOptionsCollectionSetter):
      * bindings/v8/custom/V8DocumentCustom.cpp:
      (WebCore::V8Document::evaluateCallback):
      * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
      (WebCore::V8HTMLOptionsCollection::addCallback):
      * bindings/v8/custom/V8MutationObserverCustom.cpp:
      (WebCore::V8MutationObserver::constructorCallback):
      * bindings/v8/custom/V8SQLTransactionCustom.cpp:
      (WebCore::V8SQLTransaction::executeSqlCallback):
      * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
      (WebCore::V8SQLTransactionSync::executeSqlCallback):
      * dom/DOMCoreException.idl:
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::insertAdjacentElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::webkitAddKey):
      * html/HTMLOptionsCollection.cpp:
      (WebCore::HTMLOptionsCollection::add):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::drawImage):
      (WebCore::CanvasRenderingContext2D::createPattern):
      (WebCore::CanvasRenderingContext2D::putImageData):
      (WebCore::CanvasRenderingContext2D::webkitPutImageDataHD):
      * page/Crypto.cpp:
      (WebCore::Crypto::getRandomValues):
      * page/DOMSelection.cpp:
      (WebCore::DOMSelection::extend):
      * svg/properties/SVGTransformListPropertyTearOff.h:
      (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
      
      LayoutTests:
      
      * canvas/philip/tests/2d.drawImage.null.html:
      * canvas/philip/tests/2d.imageData.put.null.html:
      * canvas/philip/tests/2d.pattern.image.null.html:
      * editing/selection/extend-expected.txt:
      * fast/dom/Geolocation/argument-types-expected.txt:
      * fast/dom/Geolocation/not-enough-arguments-expected.txt:
      * fast/dom/Geolocation/script-tests/argument-types.js:
      (test):
      * fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
      * fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
      * fast/js/select-options-add-expected.txt:
      * fast/mediastream/RTCIceCandidate-expected.txt:
      * fast/mediastream/RTCPeerConnection-expected.txt:
      * fast/mediastream/RTCSessionDescription-expected.txt:
      * media/encrypted-media/encrypted-media-syntax-expected.txt:
      * media/encrypted-media/encrypted-media-syntax.html:
      * media/video-test.js:
      * platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
      * security/crypto-random-values-types-expected.txt:
      * svg/dom/SVGTransformList-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5d24144
    • arv@chromium.org's avatar
      Replace DOMException TYPE_MISMATCH_ERR with TypeError · 04fc7b0e
      arv@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101604
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      DOMException.TYPE_MISMATCH_ERR is deprecated in favor of using TypeError.
      
      We have historically used TYPE_MISMATCH_ERR as a blanket DOMException code when
      the spec mandates TypeError being thrown.
      
      Updated existing tests.
      
      * Modules/mediastream/MediaConstraintsImpl.cpp:
      * Modules/mediastream/MediaStreamTrackList.cpp:
      * Modules/mediastream/PeerConnection00.cpp:
      * Modules/mediastream/RTCDataChannel.cpp:
      * Modules/mediastream/RTCIceCandidate.cpp:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/mediastream/RTCSessionDescription.cpp:
      * Modules/mediastream/SessionDescription.cpp:
      * bindings/js/CallbackFunction.cpp:
      * bindings/js/JSCustomXPathNSResolver.cpp:
      * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
      * bindings/js/JSHTMLSelectElementCustom.cpp:
      * bindings/js/JSMutationObserverCustom.cpp:
      * bindings/js/JSSQLResultSetRowListCustom.cpp:
      * bindings/js/JSSQLTransactionCustom.cpp:
      * bindings/js/JSSQLTransactionSyncCustom.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      * bindings/scripts/CodeGeneratorObjC.pm:
      * bindings/scripts/CodeGeneratorV8.pm:
      * bindings/v8/V8Callback.h:
      * bindings/v8/V8Collection.cpp:
      * bindings/v8/custom/V8DocumentCustom.cpp:
      * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
      * bindings/v8/custom/V8MutationObserverCustom.cpp:
      * bindings/v8/custom/V8SQLTransactionCustom.cpp:
      * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
      * dom/DOMCoreException.idl:
      * html/HTMLElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/HTMLOptionsCollection.cpp:
      * html/canvas/CanvasRenderingContext2D.cpp:
      * page/Crypto.cpp:
      * page/DOMSelection.cpp:
      * svg/properties/SVGTransformListPropertyTearOff.h:
      
      LayoutTests:
      
      Update the tests to test for TypeError instead of DOMException with the TYPE_MISMATCH_ERR code.
      
      * canvas/philip/tests/2d.drawImage.null.html:
      * canvas/philip/tests/2d.imageData.put.null.html:
      * canvas/philip/tests/2d.pattern.image.null.html:
      * editing/selection/extend-expected.txt:
      * fast/dom/Geolocation/argument-types-expected.txt:
      * fast/dom/Geolocation/not-enough-arguments-expected.txt:
      * fast/dom/Geolocation/script-tests/argument-types.js:
      * fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
      * fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
      * fast/js/select-options-add-expected.txt:
      * fast/mediastream/RTCIceCandidate-expected.txt:
      * fast/mediastream/RTCPeerConnection-expected.txt:
      * fast/mediastream/RTCSessionDescription-expected.txt:
      * fast/mediastream/SessionDescription-expected.txt:
      * fast/mediastream/peerconnection-addstream-expected.txt:
      * fast/mediastream/peerconnection-iceoptions-expected.txt:
      * fast/mediastream/peerconnection-iceoptions.html:
      * fast/mediastream/peerconnection-removestream-expected.txt:
      * media/encrypted-media/encrypted-media-syntax.html:
      * media/video-test.js:
      * platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
      * security/crypto-random-values-types-expected.txt:
      * svg/dom/SVGTransformList-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04fc7b0e
  7. 29 Aug, 2012 1 commit
  8. 27 Jul, 2012 1 commit
    • commit-queue@webkit.org's avatar
      constructing TypedArray from another TypedArray is slow · d8d6c696
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90838
      
      Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-07-26
      Reviewed by Kenneth Russell.
      
      PerformanceTests:
      
      * Bindings/typed-array-construct-from-same-type.html: Added.
      * Bindings/typed-array-construct-from-typed.html: Added.
      
      Source/WebCore:
      
      When constructing a typed array from an array like element, try to
      determine if the argument is a typed array. If so, cast the argument
      to a typed array, and read each element with .item() method. That
      avoid reading the value as a JSValue, and speedups construction by
      approximatively 3x (even 30x if TypedArrays are both the same type).
      
      In order to achieve that, we use virtual getType method. We can use
      this information to cast the TypedArray to the actual type, and then
      read the values from the source.
      
      Introduce constructArrayBufferViewWithTypedArrayArgument template
      function which returns a new typed array if first argument is a typed
      array, or 0 otherwise.
      
      This patch also replaces previous is<Type>Array() calls with new
      getType method.
      
      * bindings/js/JSArrayBufferViewHelper.h:
      (WebCore::constructArrayBufferViewWithTypedArrayArgument):
      (WebCore):
      (WebCore::constructArrayBufferView):
      * bindings/v8/SerializedScriptValue.cpp:
      * html/canvas/DataView.h:
      (DataView):
      (WebCore::DataView::getType):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      (WebCore::WebGLRenderingContext::readPixels):
      (WebCore::WebGLRenderingContext::validateTexFuncData):
      * page/Crypto.cpp:
      
      Source/WTF:
      
      Introduce virtual method getType on ArrayBufferView. It returns the actual
      type of the view. This method replaces previous is<Type>Array() methods.
      
      * wtf/ArrayBufferView.h:
      * wtf/Float32Array.h:
      (WTF::Float32Array::getType):
      (Float32Array):
      * wtf/Float64Array.h:
      (WTF::Float64Array::getType):
      (Float64Array):
      * wtf/Int16Array.h:
      (WTF::Int16Array::getType):
      (Int16Array):
      * wtf/Int32Array.h:
      (WTF::Int32Array::getType):
      (Int32Array):
      * wtf/Int8Array.h:
      (WTF::Int8Array::getType):
      (Int8Array):
      * wtf/IntegralTypedArrayBase.h:
      * wtf/TypedArrayBase.h:
      (TypedArrayBase):
      (WTF::TypedArrayBase::item):
      * wtf/Uint16Array.h:
      (WTF::Uint16Array::getType):
      (Uint16Array):
      * wtf/Uint32Array.h:
      (WTF::Uint32Array::getType):
      (Uint32Array):
      * wtf/Uint8Array.h:
      (WTF::Uint8Array::getType):
      (Uint8Array):
      * wtf/Uint8ClampedArray.h:
      (WTF::Uint8ClampedArray::getType):
      (Uint8ClampedArray):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8d6c696
  9. 24 Jan, 2012 1 commit
    • bashi@chromium.org's avatar
      [V8] Add Uint8ClampedArray support · 64b00e28
      bashi@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=76803
      
      Reviewed by Kenneth Russell.
      
      Source/JavaScriptCore:
      
      * wtf/ArrayBufferView.h:
      (WTF::ArrayBufferView::isUnsignedByteClampedArray): Added.
      * wtf/Uint8ClampedArray.h:
      (WTF::Uint8ClampedArray::isUnsignedByteClampedArray): Overridden to return true.
      
      Source/WebCore:
      
      No new tests. fast/js/script-tests/dfg-uint8clampedarray.js should pass on chromium port.
      
      * WebCore.gypi: Added required files.
      * bindings/scripts/CodeGeneratorV8.pm:
      (IsTypedArrayType): Added Uint8ClampedArray.
      * bindings/v8/SerializedScriptValue.cpp: Added the tag for Uint8ClampedArray.
      (WebCore::V8ObjectMap::Writer::writeArrayBufferView): Appends the tag when buffer is Uint8ClampedArray.
      (WebCore::V8ObjectMap::Reader::readArrayBufferView): Creates Uint8ClampedArray instance when the tag represents Uint8ClampedArray.
      * bindings/v8/custom/V8ArrayBufferViewCustomScript.js:
      * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp: Added.
      (WebCore::V8Uint8ClampedArray::constructorCallback):
      (WebCore::V8Uint8ClampedArray::setCallback):
      (WebCore::toV8):
      * page/Crypto.cpp: Added isUnsignedByteClampedArray() call to isIntegerArray().
      * page/DOMWindow.idl: Removed ifdefs.
      * workers/WorkerContext.idl: Added Uint8ArrayConstructor.
      
      LayoutTests:
      
      * platform/chromium/fast/canvas/webgl/array-unit-tests-expected.txt: Removed.
      * platform/chromium/test_expectations.txt: Removed fast/js/dfg-uint8clampedarray.html.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64b00e28
  10. 28 Nov, 2011 1 commit
    • oliver@apple.com's avatar
      Move typed array implementations into wtf · 9ce01c6f
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=73248
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore:
      
      Move typed array implementation files from WebCore to wtf.  Inline the
      .cpp files for each of the array views to cut down on unnecessary exports
      and function call overhead for trivial operations.
      
      Added files to all the project files.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.exp:
      * JavaScriptCore.vcproj/WTF/WTF.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * wtf/ArrayBuffer.cpp: Renamed from Source/WebCore/html/canvas/Float32Array.cpp.
      (WTF::ArrayBuffer::transfer):
      (WTF::ArrayBuffer::addView):
      (WTF::ArrayBuffer::removeView):
      * wtf/ArrayBuffer.h: Renamed from Source/WebCore/html/canvas/ArrayBuffer.cpp.
      (WTF::ArrayBufferContents::ArrayBufferContents):
      (WTF::ArrayBufferContents::data):
      (WTF::ArrayBufferContents::sizeInBytes):
      (WTF::ArrayBufferContents::transfer):
      (WTF::ArrayBuffer::~ArrayBuffer):
      (WTF::ArrayBuffer::clampValue):
      (WTF::ArrayBuffer::create):
      (WTF::ArrayBuffer::ArrayBuffer):
      (WTF::ArrayBuffer::data):
      (WTF::ArrayBuffer::byteLength):
      (WTF::ArrayBuffer::slice):
      (WTF::ArrayBuffer::sliceImpl):
      (WTF::ArrayBuffer::clampIndex):
      (WTF::ArrayBufferContents::tryAllocate):
      (WTF::ArrayBufferContents::~ArrayBufferContents):
      * wtf/ArrayBufferView.cpp: Copied from Source/WebCore/bindings/js/JSArrayBufferCustom.cpp.
      (WTF::ArrayBufferView::ArrayBufferView):
      (WTF::ArrayBufferView::~ArrayBufferView):
      (WTF::ArrayBufferView::neuter):
      * wtf/ArrayBufferView.h: Renamed from Source/WebCore/html/canvas/ArrayBufferView.h.
      (WTF::ArrayBufferView::isByteArray):
      (WTF::ArrayBufferView::isUnsignedByteArray):
      (WTF::ArrayBufferView::isShortArray):
      (WTF::ArrayBufferView::isUnsignedShortArray):
      (WTF::ArrayBufferView::isIntArray):
      (WTF::ArrayBufferView::isUnsignedIntArray):
      (WTF::ArrayBufferView::isFloatArray):
      (WTF::ArrayBufferView::isDoubleArray):
      (WTF::ArrayBufferView::isDataView):
      (WTF::ArrayBufferView::buffer):
      (WTF::ArrayBufferView::baseAddress):
      (WTF::ArrayBufferView::byteOffset):
      (WTF::ArrayBufferView::verifySubRange):
      (WTF::ArrayBufferView::clampOffsetAndNumElements):
      (WTF::ArrayBufferView::setImpl):
      (WTF::ArrayBufferView::setRangeImpl):
      (WTF::ArrayBufferView::zeroRangeImpl):
      (WTF::ArrayBufferView::calculateOffsetAndLength):
      * wtf/CMakeLists.txt:
      * wtf/Float32Array.h: Renamed from Source/WebCore/html/canvas/Float32Array.h.
      (WTF::Float32Array::set):
      (WTF::Float32Array::item):
      (WTF::Float32Array::isFloatArray):
      (WTF::Float32Array::create):
      (WTF::Float32Array::Float32Array):
      (WTF::Float32Array::subarray):
      * wtf/Float64Array.h: Renamed from Source/WebCore/html/canvas/Float64Array.h.
      (WTF::Float64Array::set):
      (WTF::Float64Array::item):
      (WTF::Float64Array::isDoubleArray):
      (WTF::Float64Array::create):
      (WTF::Float64Array::Float64Array):
      (WTF::Float64Array::subarray):
      * wtf/Int16Array.h: Renamed from Source/WebCore/html/canvas/Int16Array.cpp.
      (WTF::Int16Array::set):
      (WTF::Int16Array::isShortArray):
      (WTF::Int16Array::create):
      (WTF::Int16Array::Int16Array):
      (WTF::Int16Array::subarray):
      * wtf/Int32Array.h: Renamed from Source/WebCore/html/canvas/Int32Array.cpp.
      (WTF::Int32Array::set):
      (WTF::Int32Array::isIntArray):
      (WTF::Int32Array::create):
      (WTF::Int32Array::Int32Array):
      (WTF::Int32Array::subarray):
      * wtf/Int8Array.h: Renamed from Source/WebCore/html/canvas/Int8Array.cpp.
      (WTF::Int8Array::set):
      (WTF::Int8Array::isByteArray):
      (WTF::Int8Array::create):
      (WTF::Int8Array::Int8Array):
      (WTF::Int8Array::subarray):
      * wtf/IntegralTypedArrayBase.h: Renamed from Source/WebCore/html/canvas/IntegralTypedArrayBase.h.
      (WTF::IntegralTypedArrayBase::set):
      (WTF::IntegralTypedArrayBase::item):
      (WTF::IntegralTypedArrayBase::IntegralTypedArrayBase):
      * wtf/TypedArrayBase.h: Renamed from Source/WebCore/html/canvas/TypedArrayBase.h.
      (WTF::TypedArrayBase::data):
      (WTF::TypedArrayBase::set):
      (WTF::TypedArrayBase::setRange):
      (WTF::TypedArrayBase::zeroRange):
      (WTF::TypedArrayBase::length):
      (WTF::TypedArrayBase::byteLength):
      (WTF::TypedArrayBase::TypedArrayBase):
      (WTF::TypedArrayBase::create):
      (WTF::TypedArrayBase::subarrayImpl):
      * wtf/Uint16Array.h: Renamed from Source/WebCore/html/canvas/Uint16Array.cpp.
      (WTF::Uint16Array::set):
      (WTF::Uint16Array::isUnsignedShortArray):
      (WTF::Uint16Array::create):
      (WTF::Uint16Array::Uint16Array):
      (WTF::Uint16Array::subarray):
      * wtf/Uint32Array.h: Renamed from Source/WebCore/html/canvas/Uint32Array.cpp.
      (WTF::Uint32Array::set):
      (WTF::Uint32Array::isUnsignedIntArray):
      (WTF::Uint32Array::create):
      (WTF::Uint32Array::Uint32Array):
      (WTF::Uint32Array::subarray):
      * wtf/Uint8Array.h: Renamed from Source/WebCore/html/canvas/Uint8Array.h.
      (WTF::Uint8Array::set):
      (WTF::Uint8Array::isUnsignedByteArray):
      (WTF::Uint8Array::create):
      (WTF::Uint8Array::Uint8Array):
      (WTF::Uint8Array::subarray):
      * wtf/wtf.pro:
      
      Source/WebCore:
      
      Removed the typed array implementation files from WebCore and
      added forwarding headers.
      
      * CMakeLists.txt:
      * ForwardingHeaders/wtf/ArrayBuffer.h: Added.
      * ForwardingHeaders/wtf/ArrayBufferView.h: Added.
      * ForwardingHeaders/wtf/Float32Array.h: Added.
      * ForwardingHeaders/wtf/Float64Array.h: Added.
      * ForwardingHeaders/wtf/Int16Array.h: Added.
      * ForwardingHeaders/wtf/Int32Array.h: Added.
      * ForwardingHeaders/wtf/Int8Array.h: Added.
      * ForwardingHeaders/wtf/Uint16Array.h: Added.
      * ForwardingHeaders/wtf/Uint32Array.h: Added.
      * ForwardingHeaders/wtf/Uint8Array.h: Added.
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSArrayBufferCustom.cpp:
      * bindings/js/JSArrayBufferViewHelper.h:
      * bindings/js/JSAudioContextCustom.cpp:
      * bindings/js/JSFileReaderCustom.cpp:
      * bindings/js/JSFloat32ArrayCustom.cpp:
      * bindings/js/JSFloat64ArrayCustom.cpp:
      * bindings/js/JSInt16ArrayCustom.cpp:
      * bindings/js/JSInt32ArrayCustom.cpp:
      * bindings/js/JSInt8ArrayCustom.cpp:
      * bindings/js/JSUint16ArrayCustom.cpp:
      * bindings/js/JSUint32ArrayCustom.cpp:
      * bindings/js/JSUint8ArrayCustom.cpp:
      * bindings/js/JSWaveShaperNodeCustom.cpp:
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      * bindings/scripts/CodeGeneratorJS.pm:
      (AddIncludesForType):
      (GenerateHeader):
      (NativeToJSValue):
      * bindings/scripts/test/JS/JSFloat64Array.cpp:
      * bindings/scripts/test/JS/JSFloat64Array.h:
      * dom/MessageEvent.h:
      * fileapi/FileReader.cpp:
      * fileapi/FileReaderLoader.cpp:
      * fileapi/FileReaderSync.cpp:
      * fileapi/WebKitBlobBuilder.cpp:
      * html/HTMLMediaElement.cpp:
      * html/canvas/ArrayBuffer.h: Removed.
      * html/canvas/ArrayBufferView.cpp: Removed.
      * html/canvas/DataView.h:
      * html/canvas/Float64Array.cpp: Removed.
      * html/canvas/Int16Array.h: Removed.
      * html/canvas/Int32Array.h: Removed.
      * html/canvas/Int8Array.h: Removed.
      * html/canvas/Uint16Array.h: Removed.
      * html/canvas/Uint32Array.h: Removed.
      * html/canvas/Uint8Array.cpp: Removed.
      * html/canvas/WebGLBuffer.cpp:
      * html/canvas/WebGLBuffer.h:
      * html/canvas/WebGLGetInfo.cpp:
      * html/canvas/WebGLGetInfo.h:
      * html/canvas/WebGLRenderingContext.cpp:
      * html/canvas/WebGLRenderingContext.h:
      * page/Crypto.cpp:
      * platform/graphics/GraphicsContext3D.cpp:
      * platform/graphics/mac/GraphicsContext3DMac.mm:
      * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
      * webaudio/AsyncAudioDecoder.cpp:
      * webaudio/AudioBuffer.h:
      * webaudio/AudioContext.cpp:
      * webaudio/AudioParam.h:
      * webaudio/AudioParamTimeline.h:
      * webaudio/JavaScriptAudioNode.cpp:
      * webaudio/RealtimeAnalyser.cpp:
      * webaudio/WaveShaperProcessor.h:
      * websockets/WebSocketChannel.cpp:
      * websockets/WorkerThreadableWebSocketChannel.cpp:
      * xml/XMLHttpRequest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ce01c6f
  11. 13 Feb, 2011 1 commit
  12. 12 Feb, 2011 2 commits
    • abarth@webkit.org's avatar
      2011-02-12 Adam Barth <abarth@webkit.org> · d8a1138c
      abarth@webkit.org authored
              Reviewed by Sam Weinig.
      
              crypto.getRandomValues should support all integer array types
              https://bugs.webkit.org/show_bug.cgi?id=54342
      
              Test which types of arrays work with crypto.getRandomValues.
      
              * security/crypto-random-values-types-expected.txt: Added.
              * security/crypto-random-values-types.html: Added.
      2011-02-12  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Sam Weinig.
      
              crypto.getRandomValues should support all integer array types
              https://bugs.webkit.org/show_bug.cgi?id=54342
      
              As discussed on whatwg, we should support all the integer array types.
      
              Test: security/crypto-random-values-types.html
      
              * page/Crypto.cpp:
              (WebCore::Crypto::getRandomValues):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8a1138c
    • abarth@webkit.org's avatar
      2011-02-12 Adam Barth <abarth@webkit.org> · 383e27a1
      abarth@webkit.org authored
              Reviewed by Kenneth Russell.
      
              Enable ArrayBuffers by default
              https://bugs.webkit.org/show_bug.cgi?id=54310
      
              Export the required functions.
      
              * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      2011-02-12  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Kenneth Russell.
      
              Enable ArrayBuffers by default
              https://bugs.webkit.org/show_bug.cgi?id=54310
      
              As discussed on webkit-dev, ArrayBuffers are used by a bunch of
              different APIs, implemented by Firefox, and appear to be stable.
              Keeping them conditional is a large mantainance burden than it's worth.
      
              * DerivedSources.cpp:
              * WebCore.vcproj/WebCore.vcproj:
              * bindings/generic/RuntimeEnabledFeatures.h:
              (WebCore::RuntimeEnabledFeatures::setWebGLEnabled):
              * bindings/js/JSArrayBufferCustom.cpp:
              * bindings/js/JSBindingsAllInOne.cpp:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDataViewCustom.cpp:
              * bindings/js/JSFloat32ArrayCustom.cpp:
              * bindings/js/JSInt16ArrayCustom.cpp:
              * bindings/js/JSInt32ArrayCustom.cpp:
              * bindings/js/JSInt8ArrayCustom.cpp:
              * bindings/js/JSUint16ArrayCustom.cpp:
              * bindings/js/JSUint32ArrayCustom.cpp:
              * bindings/js/JSUint8ArrayCustom.cpp:
              * bindings/v8/custom/V8ArrayBufferCustom.cpp:
              * bindings/v8/custom/V8ArrayBufferViewCustom.h:
              * bindings/v8/custom/V8DataViewCustom.cpp:
              * bindings/v8/custom/V8Float32ArrayCustom.cpp:
              * bindings/v8/custom/V8Int16ArrayCustom.cpp:
              * bindings/v8/custom/V8Int32ArrayCustom.cpp:
              * bindings/v8/custom/V8Int8ArrayCustom.cpp:
              * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
              * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
              * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
              * html/canvas/ArrayBuffer.cpp:
              * html/canvas/ArrayBuffer.idl:
              * html/canvas/ArrayBufferView.cpp:
              * html/canvas/ArrayBufferView.idl:
              * html/canvas/DataView.cpp:
              * html/canvas/DataView.idl:
              * html/canvas/Float32Array.cpp:
              * html/canvas/Float32Array.idl:
              * html/canvas/Int16Array.cpp:
              * html/canvas/Int16Array.idl:
              * html/canvas/Int32Array.cpp:
              * html/canvas/Int32Array.idl:
              * html/canvas/Int8Array.cpp:
              * html/canvas/Int8Array.idl:
              * html/canvas/Uint16Array.cpp:
              * html/canvas/Uint16Array.idl:
              * html/canvas/Uint32Array.cpp:
              * html/canvas/Uint32Array.idl:
              * html/canvas/Uint8Array.cpp:
              * html/canvas/Uint8Array.idl:
              * page/Crypto.cpp:
              (WebCore::Crypto::getRandomValues):
              * page/Crypto.h:
              * page/Crypto.idl:
              * page/DOMWindow.idl:
              * workers/WorkerContext.idl:
      2011-02-12  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Kenneth Russell.
      
              Enable ArrayBuffers by default
              https://bugs.webkit.org/show_bug.cgi?id=54310
      
              Revert incorrect expectations from
              http://trac.webkit.org/changeset/78337.  These results were cased by
              ArrayBuffers not beign enabled on Windows previous to this patch.
      
              * platform/win/fast/dom/Window/window-property-descriptors-expected.txt:
              * platform/win/fast/js/global-function-resolve-expected.txt: Removed.
              * platform/win/fast/js/var-declarations-shadowing-expected.txt: Removed.
              * platform/win/security: Removed.
              * platform/win/security/crypto-random-values-expected.txt: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      383e27a1
  13. 11 Feb, 2011 2 commits
    • abarth@webkit.org's avatar
      2011-02-11 Adam Barth <abarth@webkit.org> · aa5a9e22
      abarth@webkit.org authored
              Attempt to fix the Windows build.  Apparently we don't support
              conditional attributes on functions.  This patch makes the whole Crypto
              interface conditional on ArrayBuffer support.
      
              * page/DOMWindow.idl:
              * page/Crypto.cpp:
              * page/Crypto.h:
              * page/Crypto.idl:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa5a9e22
    • abarth@webkit.org's avatar
      2011-02-10 Adam Barth <abarth@webkit.org> · ba712d32
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              WebKit should have a cryptographic RNG
              https://bugs.webkit.org/show_bug.cgi?id=22049
      
              Test crypto.getRandomValues API.  It's pretty hard to write a
              deterministic API for a randomized API, but this test should catch some
              regressions.
      
              * security/crypto-random-values-expected.txt: Added.
              * security/crypto-random-values.html: Added.
      2011-02-10  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              WebKit should have a cryptographic RNG
              https://bugs.webkit.org/show_bug.cgi?id=22049
      
              Teach JavaScriptCore how to export this function.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
      2011-02-10  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              WebKit should have a cryptographic RNG
              https://bugs.webkit.org/show_bug.cgi?id=22049
      
              Add crypto.getRandomValues.  Yes, all these diffs are required to
              expose a single function to the DOM.
      
              Test: security/crypto-random-values.html
      
              * Android.mk:
              * CMakeLists.txt:
              * DerivedSources.cpp:
              * DerivedSources.make:
              * ForwardingHeaders/wtf/CryptographicallyRandomNumber.h: Added.
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pri:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/v8/custom/V8DOMWindowCustom.cpp:
              * config.h:
              * page/Crypto.cpp: Added.
              (WebCore::Crypto::Crypto):
              (WebCore::Crypto::getRandomValues):
              * page/Crypto.h: Added.
              (WebCore::Crypto::create):
              * page/Crypto.idl: Added.
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::clear):
              (WebCore::DOMWindow::crypto):
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalCrypto):
              * page/DOMWindow.idl:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba712d32
  14. 08 Jan, 2011 1 commit
  15. 03 Jan, 2011 1 commit
    • psolanki@apple.com's avatar
      2011-01-03 Pratik Solanki <psolanki@apple.com> · 8ca237bb
      psolanki@apple.com authored
              Reviewed by Darin Adler.
      
              https://bugs.webkit.org/show_bug.cgi?id=51850
              Put CFNetwork loader code inside USE(CFNETWORK)
      
              Add USE(CFNETWORK) macros around all the cf/mac network files. Also added all CFNetwork
              files to the WebCore Xcode project.
      
              * WebCore.xcodeproj/project.pbxproj:
              * loader/cf/ResourceLoaderCFNet.cpp:
              * loader/mac/ResourceLoaderMac.mm:
              * platform/network/cf/AuthenticationCF.cpp:
              * platform/network/cf/AuthenticationCF.h:
              * platform/network/cf/CookieJarCFNet.cpp:
              * platform/network/cf/CookieStorageCFNet.cpp:
              * platform/network/cf/CookieStorageCFNet.h:
              * platform/network/cf/CredentialStorageCFNet.cpp:
              * platform/network/cf/FormDataStreamCFNet.cpp:
              * platform/network/cf/FormDataStreamCFNet.h:
              * platform/network/cf/LoaderRunLoopCF.cpp:
              * platform/network/cf/LoaderRunLoopCF.h:
              * platform/network/cf/ResourceError.h:
              * platform/network/cf/ResourceHandleCFNet.cpp:
              * platform/network/cf/ResourceRequest.h:
              * platform/network/cf/ResourceRequestCFNet.cpp:
              * platform/network/cf/ResourceRequestCFNet.h:
              * platform/network/cf/ResourceResponse.h:
              * platform/network/cf/ResourceResponseCFNet.cpp:
              * platform/network/mac/AuthenticationMac.h:
              * platform/network/mac/AuthenticationMac.mm:
              * platform/network/mac/FormDataStreamMac.h:
              * platform/network/mac/FormDataStreamMac.mm:
              * platform/network/mac/ResourceError.h:
              * platform/network/mac/ResourceHandleMac.mm:
              * platform/network/mac/ResourceRequest.h:
              * platform/network/mac/ResourceRequestMac.mm:
              * platform/network/mac/ResourceResponse.h:
              * platform/network/mac/ResourceResponseMac.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ca237bb
  16. 04 Mar, 2009 1 commit
    • levin@chromium.org's avatar
      WebCore: · c388b036
      levin@chromium.org authored
      2009-03-04  David Levin  <levin@chromium.org>
      
              Reviewed by Alexey Proskuryakov.
      
              Bug 24337: Assert when doing sync XHR in a worker for a cacheable response.
              <https://bugs.webkit.org/show_bug.cgi?id=24337>
      
              Tests: http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
                     http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html
      
              * loader/mac/ResourceLoaderMac.mm:
              (WebCore::ResourceLoader::willCacheResponse):
              An identifier is only asssigned if resource load callbacks are done.  So don't send
              willCacheResponse which uses identifier if resource load callbacks aren't being sent.
      
      LayoutTests:
      
      2009-03-04  David Levin  <levin@chromium.org>
      
              Reviewed by Alexey Proskuryakov.
      
              Bug 24337: Assert when doing sync XHR in a worker for a cacheable response.
              <https://bugs.webkit.org/show_bug.cgi?id=24337>
      
              * http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache-expected.txt: Added.
              * http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html: Added.
              * http/tests/xmlhttprequest/workers/resources/xmlhttprequest-file-not-found.js: Added.
              (log):
              (done):
              * http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found-expected.txt: Added.
              * http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c388b036
  17. 05 Jan, 2009 1 commit
  18. 19 Apr, 2007 1 commit
    • beidson's avatar
      LayoutTests: · a5e83332
      beidson authored
              Reviewed by Tim
      
              <rdar://problem/5008925>
              Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
      
              * http/tests/misc/willCacheResponse-delegate-callback-expected.txt: Added.
              * http/tests/misc/willCacheResponse-delegate-callback.html: Added.
      
      WebCore:
      
              Reviewed by Tim
      
              <rdar://problem/5008925>
              Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
      
              * WebCore.xcodeproj/project.pbxproj: Added ResourceLoaderMac.mm
      
              * loader/FrameLoaderClient.h: Add the willCacheResponse SPI for WebKit to implement
      
              * loader/ResourceLoader.h:
              * loader/mac/ResourceLoaderMac.mm: Added.
              (WebCore::ResourceLoader::willCacheResponse): Return the new cachedResponse from the client
      
              * platform/graphics/svg/SVGImageEmptyClients.h:
              (WebCore::SVGEmptyFrameLoaderClient::willCacheResponse): Stub
      
              * platform/network/ResourceHandleClient.h:
              (WebCore::ResourceHandleClient::willCacheResponse):  Return the new cachedResponse from the client
      
              * platform/network/mac/ResourceHandleMac.mm:
              (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Call to get the new 
                cachedURLResponse before calling for the cache policy
      
      WebKit:
      
              Reviewed by Tim
      
              <rdar://problem/5008925>
              Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
      
              * WebCoreSupport/WebFrameLoaderClient.h:
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::willCacheResponse): Call 
                [WebResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:];
      
              * WebView/WebView.mm:
              (-[WebView _cacheResourceLoadDelegateImplementations]): Pull out the willCacheResponse impl
      
              * WebView/WebViewPrivate.h: Add WebResourceLoadDelegatePrivate category for this new SPI
      
      WebKitTools:
      
              Reviewed by Tim
      
              <rdar://problem/5008925>
              Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
      
              * DumpRenderTree/ResourceLoadDelegate.m:
              (-[ResourceLoadDelegate webView:resource:willCacheResponse:fromDataSource:]): 
                Add the willCacheResponse delegate call
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5e83332
  19. 20 Feb, 2007 1 commit
    • thatcher's avatar
      WebCore: · a1d52ddf
      thatcher authored
              Reviewed by Darin.
      
              <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed
      
              Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
              that have a finalizer that needs called on the main thread.
      
              * WebCore.exp:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/objc/WebScriptObject.mm:
              (+[WebScriptObject initialize]):
              * bridge/mac/WebCoreScriptDebugger.mm:
              (+[WebCoreScriptDebugger initialize]):
              * platform/mac/SharedBufferMac.mm:
              (+[SharedBufferData initialize]):
              * platform/mac/WebCoreObjCExtras.c: Added.
              (WebCoreObjCFinalizeOnMainThread):
              * platform/mac/WebCoreObjCExtras.h: Added.
      
      WebKit:
      
              Reviewed by Darin.
      
              <rdar://problem/4900579> WebKit -finalize methods are not thread-safe; design change needed
      
              Call WebCoreObjCFinalizeOnMainThread from the initialize method of all the classes
              that have a finalizer that needs called on the main thread. Assert in finalize that we
              are on the main thread.
      
              * Carbon/CarbonWindowAdapter.m:
              (+[CarbonWindowAdapter initialize]):
              (-[CarbonWindowAdapter finalize]):
              * History/WebBackForwardList.mm:
              (+[WebBackForwardList initialize]):
              (-[WebBackForwardList finalize]):
              * History/WebHistoryItem.mm:
              (+[WebHistoryItem initialize]):
              * Misc/WebElementDictionary.mm:
              (+[WebElementDictionary initialize]):
              (-[WebElementDictionary finalize]):
              * Plugins/WebBaseNetscapePluginStream.m:
              (+[WebBaseNetscapePluginStream initialize]):
              (-[WebBaseNetscapePluginStream finalize]):
              * Plugins/WebBaseNetscapePluginView.mm:
              (+[WebBaseNetscapePluginView initialize]):
              (-[WebBaseNetscapePluginView finalize]):
              * Plugins/WebBasePluginPackage.m:
              (+[WebBasePluginPackage initialize]):
              (-[WebBasePluginPackage finalize]):
              * Plugins/WebNetscapePluginStream.mm:
              (-[WebNetscapePluginStream finalize]):
              * WebCoreSupport/WebEditorClient.mm:
              (+[WebEditCommand initialize]):
              (-[WebEditCommand finalize]):
              * WebCoreSupport/WebFrameBridge.mm:
              (+[WebFrameBridge initialize]):
              (-[WebFrameBridge finalize]):
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (+[WebFramePolicyListener initialize]):
              (-[WebFramePolicyListener finalize]):
              * WebView/WebHTMLView.mm:
              (+[WebHTMLView initialize]):
              (-[WebHTMLView finalize]):
              * WebView/WebView.mm:
              (+[WebViewPrivate initialize]):
              (-[WebViewPrivate finalize]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1d52ddf
  20. 12 Oct, 2006 1 commit
    • darin's avatar
      Reviewed by Adele. · 842ea0c3
      darin authored
              - preparations for making more code C++
      
              * WebKitPrefix.h: Fixed ifdef so that C++ files get all the precompiled stuff
              that non-C++ files get.
      
              * Misc/WebKitLogging.h:
              * Misc/WebKitSystemBits.h:
              * Misc/WebLocalizableStrings.h:
              * WebCoreSupport/WebSystemInterface.h:
              Added extern "C".
      
              * Misc/WebNSViewExtras.h:
              * WebView/WebDataSource.m: (addTypesFromClass):
              * WebView/WebFrameView.m: (addTypesFromClass):
              Eliminated use of the identifier "class".
      
              * WebView/WebView.m: (-[WebView _goToItem:withLoadType:]): Added a type cast.
      
              * Plugins/WebBaseNetscapePluginView.m: Added lots of type casts.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      842ea0c3
  21. 21 Apr, 2006 1 commit
    • darin's avatar
      WebCore: · 331b6de1
      darin authored
              Reviewed by Adele.
      
              - WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
                eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
      
              * platform/mac/WebCoreGraphicsBridge.h: Removed.
              * platform/mac/WebCoreGraphicsBridge.m: Removed.
              * platform/mac/WebCoreSystemInterface.h: Added.
              * platform/mac/WebCoreSystemInterface.mm: Added.
      
              * WebCore.exp: Add new SystemInterface globals, remove WebCoreGraphicsBridge.
      
              * WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
              Sorted files.
      
              * bridge/mac/FrameMac.mm: Removed unneeded include of WebCoreGraphicsBridge.h.
      
              * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage):
              Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
              call wkSetDragImage.
      
              * platform/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawFocusRing):
              Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
              call wkDrawFocusRing.
      
              * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextField):
              Call wkDrawBezeledTextFieldCell from WebCoreSystemInterface instead of using
              WebGraphicsBridge to do the same thing.
      
      WebKit:
      
              Reviewed by Adele.
      
              - WebKit part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
                eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
      
              * WebCoreSupport/WebGraphicsBridge.h: Removed.
              * WebCoreSupport/WebGraphicsBridge.m: Removed.
              * WebCoreSupport/WebSystemInterface.h: Added.
              * WebCoreSupport/WebSystemInterface.m: Added.
      
              * WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.
      
              * WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
              * WebCoreSupport/WebImageRenderer.m: Ditto.
              * WebCoreSupport/WebTextRenderer.m: Ditto.
      
              * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
              initialization inside a boolean, just in case some things take a little time. Added
              a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
              will need to add it in some other places if we call code that requires the use of
              WebCoreSystemInterface functions from anywhere that can be invoked before creations
              of the first WebFrameView, but for now there is no need.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      331b6de1
  22. 05 Jun, 2005 2 commits
  23. 26 Feb, 2004 1 commit
    • kocienda's avatar
      WebCore: · 03a86c79
      kocienda authored
              Reviewed by Chris
      
              * WebCore.pbproj/project.pbxproj:
              * khtml/xml/dom2_rangeimpl.h: Now includes createInstance glue function as do the other
              khtml DOM objects that we reflect into ObjC.
              * kwq/DOM-compat.h: Added. Compatibility declarations for DOM SPI. Note that this file
              is copied into WebKit by the build system as needed.
              * kwq/DOM.h: Added. New home for DOM SPI. Note that this file is copied into WebKit by the build
              system as needed.
              * kwq/KWQKHTMLPart.mm:
              (KWQKHTMLPart::recordFormValue): Updated usage to new DOM SPI.
              * kwq/WebCoreBridge.h: Updated usage to new DOM SPI.
              * kwq/WebCoreBridge.mm: Updated usage to new DOM SPI. Needed to add DOM range impl include since
              includes jiggered around and this needed header was no longer included indirectly.
              (-[WebCoreBridge elementForView:]): Ditto.
              (inputElementFromDOMElement): Ditto.
              (formElementFromDOMElement): Ditto.
              (-[WebCoreBridge elementWithName:inForm:]): Ditto.
              (-[WebCoreBridge elementDoesAutoComplete:]): Ditto.
              (-[WebCoreBridge elementIsPassword:]): Ditto.
              (-[WebCoreBridge currentForm]): Ditto.
              (-[WebCoreBridge controlsInForm:]): Ditto.
              (-[WebCoreBridge searchForLabels:beforeElement:]): Ditto.
              (-[WebCoreBridge matchLabels:againstElement:]): Ditto.
              (-[WebCoreBridge elementAtPoint:]): Ditto.
              (-[WebCoreBridge DOMDocument]): Ditto.
              (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto.
              (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
              (-[WebCoreBridge selectionStart]): Ditto.
              (-[WebCoreBridge selectionEnd]): Ditto.
              * kwq/WebCoreDOM.h: New home for all private declarations needed for reflecting DOM into ObjC.
              * kwq/WebCoreDOM.mm: Added. New home for all implementations needed for reflecting DOM into ObjC.
              * kwq/WebCoreDOMDocument.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
              * kwq/WebCoreDOMNode.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
              * kwq/WebCoreDOMPrivate.h: Removed.
              * kwq/WebDOMDocument.h: Removed.
              * kwq/WebDOMElement.h: Removed.
              * kwq/WebDOMNode.h: Removed.
      
      WebKit:
      
              Reviewed by Chris
      
              Updated usage of DOM SPI to use new names and conventions.
      
              Unless indicated otherwise, the changes were to update protocol names for, which
              changed from using a "WebDOM" prefix to a "DOM" prefix, and changing now need
              only include the DOM.h header from WebKit to get everything.
      
              * DOM.subproj/DOM-compat.h: Added. This header contains some compatibility declarations
              to work with older clients of our DOM SPI. Though this file is checked into WebKit,
              it really lives and should be updated in WebCore. It is copied into WebKit by the build
              system as needed.
              * DOM.subproj/DOM.h: Added. This file includes the new "guts" of the DOM SPI. As above,
              this file is checked into WebKit, it really lives and should be updated in WebCore.
              It is copied into WebKit by the build system as needed.
              * DOM.subproj/WebDOMDocument.h: Removed declarations. Now just includes DOM.h and DOM-compat.h
              * DOM.subproj/WebDOMDocument.m: Removed.
              * DOM.subproj/WebDOMElement.h: Removed declarations. Now just includes DOM.h and DOM-compat.h
              * DOM.subproj/WebDOMElement.m: Removed.
              * DOM.subproj/WebDOMNode.h: Removed declarations. Now just includes DOM.h and DOM-compat.h
              * DOM.subproj/WebDOMNode.m: Removed.
              * WebCoreSupport.subproj/WebBridge.m:
              (-[WebBridge loadURL:referrer:reload:onLoadEvent:target:triggeringEvent:form:formValues:])
              (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:])
              * WebKit.pbproj/project.pbxproj:
              * WebView.subproj/WebDefaultContextMenuDelegate.m:
              * WebView.subproj/WebFormDelegate.h:
              * WebView.subproj/WebFormDelegate.m:
              (-[WebFormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:])
              * WebView.subproj/WebFrame.h: Unrelated change. Removed -undoManager accessor from public header. Moved to private header.
              * WebView.subproj/WebFrame.m:
              (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:])
              (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:])
              (-[WebFrame undoManager]): Moved -undoManager accessor to private category implementation.
              (-[WebFormState initWithForm:values:sourceFrame:])
              (-[WebFormState form])
              (-[WebFrame childFrames])
              * WebView.subproj/WebFramePrivate.h: Moved in -undoManager accessor.
              * WebView.subproj/WebHTMLRepresentation.h:
              * WebView.subproj/WebHTMLRepresentation.m:
              (-[WebHTMLRepresentation DOMDocument])
              (-[WebHTMLRepresentation setSelectionFrom:startOffset:to:endOffset:])
              (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:])
              (-[WebHTMLRepresentation elementWithName:inForm:])
              (-[WebHTMLRepresentation elementForView:])
              (-[WebHTMLRepresentation elementDoesAutoComplete:])
              (-[WebHTMLRepresentation elementIsPassword:])
              (-[WebHTMLRepresentation formForElement:])
              (-[WebHTMLRepresentation controlsInForm:])
              (-[WebHTMLRepresentation searchForLabels:beforeElement:])
              (-[WebHTMLRepresentation matchLabels:againstElement:])
              * WebView.subproj/WebHTMLView.m:
              * copy-webcore-files-to-webkit: Added. Copies DOM.h and DOM-compat.h from WebCore when they
              have been updated there.
      
      WebBrowser:
      
              Reviewed by Chris
      
              Updated usage of DOM SPI to use new names and conventions.
      
              In each case, protocol names for DOM objects were changed from using a
              "WebDOM" prefix to a "DOM" prefix, and clients now need only include the
              DOM.h header from WebKit to get everything.
      
              * BrowserWebController.m:
              (-[FormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:])
              * Debug/SnippetController.m:
              (lastNode)
              (-[SnippetController loadComplete])
              * FormCompletionController.h:
              * FormCompletionController.m:
              (+[FormCompletionController loginInfoForForm:inFrame:])
              (+[FormCompletionController _frame:sourceFrame:willSubmitLoginForm:withValues:formInfo:submissionListener:])
              (+[FormCompletionController _frame:sourceFrame:willSubmitRegularForm:withValues:])
              (+[FormCompletionController frame:sourceFrame:willSubmitForm:withValues:submissionListener:])
              (+[FormCompletionController currentFormInFrame:])
              (+[FormCompletionController currentFrameAndForm:inWebView:])
              (+[FormCompletionController autoFillInWebView:])
              (+[FormCompletionController autoFillPasswordInFrame:])
              (-[FormCompletionController initWithSourceField:frame:])
              (-[FormCompletionController maxStringLength])
              (+[AutoFillController autoFillerForFrame:form:create:])
              (+[AutoFillController abMatchInFrame:form:fieldName:])
              (+[AutoFillController recordABMatch:inFrame:form:fieldName:])
              (+[AutoFillController clearAutoFilledView:inFrame:form:])
              (-[AutoFillController _fieldNameForAutoFillOfView:rep:])
              (-[FormToABBinder abPointerForFieldName:view:rep:foundByPageScan:])
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03a86c79
  24. 03 May, 2003 1 commit
    • mjs's avatar
      WebFoundation: · 832ecbd3
      mjs authored
              Reviewed by Richard.
      
      	- reformatted method prototypes to match AppKit style
      
              * AuthenticationManager.subproj/NSHTTPAuthenticator.h:
              * AuthenticationManager.subproj/NSURLConnectionAuthenticationChallenge.h:
              * AuthenticationManager.subproj/NSURLDownloadAuthenticationChallenge.h:
              * AuthenticationManager.subproj/NSURLProtectionSpace.h:
              * AuthenticationManager.subproj/WebCredentialStorage.h:
              * AuthenticationManager.subproj/WebKeychainCredential.h:
              * CacheLoader.subproj/NSURLCache.h:
              * CacheLoader.subproj/NSURLCachePrivate.h:
              * CacheLoader.subproj/NSURLConnection.h:
              * CacheLoader.subproj/NSURLConnectionPrivate.h:
              * CacheLoader.subproj/NSURLConnectionQueue.h:
              * CacheLoader.subproj/NSURLProtocol.h:
              * CacheLoader.subproj/NSURLProtocolClient.h:
              * CacheLoader.subproj/NSURLProtocolPrivate.h:
              * CacheLoader.subproj/NSURLRequest.h:
              * CacheLoader.subproj/NSURLRequestPrivate.h:
              * CacheLoader.subproj/NSURLResponse.h:
              * CacheLoader.subproj/NSURLResponsePrivate.h:
              * CacheLoader.subproj/WebCache.h:
              * CacheLoader.subproj/WebCachePrivate.h:
              * CacheLoader.subproj/WebDiskCache.h:
              * CacheLoader.subproj/WebNetworkSettings.h:
              * CacheLoader.subproj/WebSynchronousDelegate.h:
              * CookieManager.subproj/NSHTTPCookiePrivate.h:
              * CookieManager.subproj/NSHTTPCookieStorage.h:
              * CookieManager.subproj/NSHTTPCookieStoragePrivate.h:
              * CookieManager.subproj/WebCookieStorage.h:
              * CookieManager.subproj/WebCookieStorageServer.h:
              * Database.subproj/WebDatabase.h:
              * Database.subproj/WebFileDatabase.h:
              * Misc.subproj/WebBinaryHeap.h:
              * Misc.subproj/WebFileTypeMappings.h:
              * Misc.subproj/WebHostNameAddressInfo.h:
              * Misc.subproj/WebKeyValuePair.h:
              * Misc.subproj/WebMonitor.h:
              * Misc.subproj/WebMultipartForm.h:
              * Misc.subproj/WebNSArrayExtras.h:
              * Misc.subproj/WebNSCalendarDateExtras.h:
              * Misc.subproj/WebNSDataExtras.h:
              * Misc.subproj/WebNSDictionaryExtras.h:
              * Misc.subproj/WebNSErrorExtras.h:
              * Misc.subproj/WebNSObjectExtras.h:
              * Misc.subproj/WebNSStringExtras.h:
              * Misc.subproj/WebNSThreadExtras.h:
              * Misc.subproj/WebNSValueExtensions.h:
              * Misc.subproj/WebOrderable.h:
              * Misc.subproj/WebQueue.h:
              * Misc.subproj/WebReadWriteLock.h:
              * Misc.subproj/WebRecursiveReadWriteLock.h:
              * Misc.subproj/WebSpinLock.h:
              * ProtocolHandlers.subproj/WebCFNetworkHTTPProtocol.h:
              * ProtocolHandlers.subproj/WebFTPProtocol.h:
              * ProtocolHandlers.subproj/WebHTTPProtocol.h:
      
      WebCore:
      
              Reviewed by Richard.
      
      	- reformatted method prototypes to match AppKit style
      
              * kwq/WebCoreBridge.h:
              * kwq/WebCoreDOMPrivate.h:
              * kwq/WebCoreHistory.h:
              * kwq/WebCoreResourceLoader.h:
              * kwq/WebCoreTextRenderer.h:
              * kwq/WebDOMDocument.h:
              * kwq/WebDOMElement.h:
              * kwq/WebDOMNode.h:
      
      WebKit:
      
              Reviewed by Richard.
      
      	- reformatted method prototypes to match AppKit style
      	- remove "Public header file" from headers that are not public
      	- fix header doc @method names to match actual method names
      
              * Carbon.subproj/CarbonWindowAdapter.h:
              * Carbon.subproj/HIViewAdapter.h:
              * DOM.subproj/WebDOMDocument.h:
              * DOM.subproj/WebDOMNode.h:
              * History.subproj/WebBackForwardList.h:
              * History.subproj/WebHistoryItemPrivate.h:
              * History.subproj/WebHistoryPrivate.h:
              * History.subproj/WebURLsWithTitles.h:
              * Misc.subproj/WebIconDatabase.h:
              * Misc.subproj/WebIconLoader.h:
              * Misc.subproj/WebKitNSStringExtras.h:
              * Misc.subproj/WebUnicode.h:
              * Panels.subproj/WebPanelAuthenticationHandler.h:
              * Plugins.subproj/WebBasePluginPackage.h:
              * Plugins.subproj/WebNetscapePluginStream.h:
              * Plugins.subproj/WebNullPluginView.h:
              * Plugins.subproj/WebPluginViewFactory.h:
              * WebCoreSupport.subproj/WebGlyphBuffer.h:
              * WebCoreSupport.subproj/WebTextRenderer.h:
              * WebCoreSupport.subproj/WebTextRendererFactory.h:
              * WebView.subproj/WebBaseResourceHandleDelegate.h:
              * WebView.subproj/WebControllerSets.h:
              * WebView.subproj/WebDataProtocol.h:
              * WebView.subproj/WebDataSource.h:
              * WebView.subproj/WebDataSourcePrivate.h:
              * WebView.subproj/WebDebugDOMNode.h:
              * WebView.subproj/WebDocument.h:
              * WebView.subproj/WebFrame.h:
              * WebView.subproj/WebFramePrivate.h:
              * WebView.subproj/WebFrameView.h:
              * WebView.subproj/WebHTMLRepresentation.h:
              * WebView.subproj/WebHTMLView.h:
              * WebView.subproj/WebMainResourceClient.h:
              * WebView.subproj/WebPolicyDelegate.h:
              * WebView.subproj/WebPolicyDelegatePrivate.h:
              * WebView.subproj/WebPreferencesPrivate.h:
              * WebView.subproj/WebRenderNode.h:
              * WebView.subproj/WebResourceLoadDelegate.h:
              * WebView.subproj/WebUIDelegate.h:
              * WebView.subproj/WebView.h:
              * WebView.subproj/WebViewPrivate.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      832ecbd3
  25. 08 Oct, 2002 1 commit
    • rjw's avatar
      Fixes to the DOM API. · ff90f422
      rjw authored
              * DOM.subproj/WebDOMDocument.h:
              * DOM.subproj/WebDOMDocument.m:
              * DOM.subproj/WebDOMNode.h:
              * DOM.subproj/WebDOMNode.m:
              * DOM.subproj/WebDOMNamedNodeMap.h: Removed.
              * DOM.subproj/WebDOMNamedNodeMap.m: Removed.
              * WebKit.pbproj/project.pbxproj:
      
      
              First cut at ObjC stubs for DOM API.  Finished the
              main classes.  Need to finish
              WebDOMElement, WebDOMElement, WebDOMElement,
              WebDOMCDATASection, WebDOMText, WebDOMComment,
              WebDOMCharacterData and
      
              * WebCore.pbproj/project.pbxproj:
              * khtml/dom/dom_doc.h:
              * khtml/dom/dom_element.h:
              * khtml/dom/dom_node.h:
              * khtml/xml/dom_docimpl.h:
              * khtml/xml/dom_elementimpl.h:
              * khtml/xml/dom_nodeimpl.h:
              * kwq/WebCoreDOM.h: Added.
              * kwq/WebCoreDOMDocument.mm: Added.
              (DOM::DOMImplementationImpl::createInstance):
              (DOM::DocumentTypeImpl::createInstance):
              (DOM::DocumentImpl::createInstance):
              (domStringToNSString):
              (NSStringToDOMString):
              (+[WebCoreDOMDocumentType documentTypeWithImpl:DOM::]):
              (-[WebCoreDOMDocumentType initWithImpl:DOM::]):
              (-[WebCoreDOMDocumentType dealloc]):
              (-[WebCoreDOMDocumentType DOM::]):
              (-[WebCoreDOMDocumentType name]):
              (-[WebCoreDOMDocumentType entities]):
              (-[WebCoreDOMDocumentType notations]):
              (-[WebCoreDOMDocumentType publicId]):
              (-[WebCoreDOMDocumentType systemId]):
              (-[WebCoreDOMDocumentType internalSubset]):
              (+[WebCoreDOMImplementation implementionatWithImpl:DOM::]):
              (-[WebCoreDOMImplementation initWithImpl:DOM::]):
              (-[WebCoreDOMImplementation dealloc]):
              (-[WebCoreDOMImplementation DOM::]):
              (-[WebCoreDOMImplementation hasFeature::]):
              (-[WebCoreDOMImplementation createDocument:::]):
              (+[WebCoreDOMDocument documentWithImpl:DOM::]):
              (-[WebCoreDOMDocument initWithImpl:DOM::]):
              (-[WebCoreDOMDocument dealloc]):
              (-[WebCoreDOMDocument DOM::]):
              (-[WebCoreDOMDocument doctype]):
              (-[WebCoreDOMDocument implementation]):
              (-[WebCoreDOMDocument documentElement]):
              (-[WebCoreDOMDocument createElement:]):
              (-[WebCoreDOMDocument createElementNS::]):
              (-[WebCoreDOMDocument createDocumentFragment]):
              (-[WebCoreDOMDocument createTextNode:]):
              (-[WebCoreDOMDocument createComment:]):
              (-[WebCoreDOMDocument createCDATASection:]):
              (-[WebCoreDOMDocument createProcessingInstruction::]):
              (-[WebCoreDOMDocument createAttribute:]):
              (-[WebCoreDOMDocument createAttributeNS::]):
              (-[WebCoreDOMDocument createEntityReference:]):
              (-[WebCoreDOMDocument getElementById:]):
              (-[WebCoreDOMDocument getElementsByTagName:]):
              (-[WebCoreDOMDocument getElementsByTagNameNS::]):
              (-[WebCoreDOMDocument importNode::]):
              * kwq/WebCoreDOMNode.mm: Added.
              (DOM::NamedNodeMapImpl::createInstance):
              (DOM::AttrImpl::createInstance):
              (+[WebCoreDOMNode nodeWithImpl:DOM::]):
              (-[WebCoreDOMNode initWithImpl:DOM::]):
              (-[WebCoreDOMNode DOM::]):
              (-[WebCoreDOMNode dealloc]):
              (-[WebCoreDOMNode nodeName]):
              (-[WebCoreDOMNode nodeValue]):
              (-[WebCoreDOMNode setNodeValue:]):
              (-[WebCoreDOMNode nodeType]):
              (-[WebCoreDOMNode parentNode]):
              (-[WebCoreDOMNode firstChild]):
              (-[WebCoreDOMNode lastChild]):
              (-[WebCoreDOMNode previousSibling]):
              (-[WebCoreDOMNode nextSibling]):
              (-[WebCoreDOMNode ownerDocument]):
              (-[WebCoreDOMNode insert:before:]):
              (-[WebCoreDOMNode replace:child:]):
              (-[WebCoreDOMNode removeChild:]):
              (-[WebCoreDOMNode hasChildNodes]):
              (-[WebCoreDOMNode cloneNode:]):
              (-[WebCoreDOMNode normalize]):
              (-[WebCoreDOMNode isSupported::]):
              (-[WebCoreDOMNode namespaceURI]):
              (-[WebCoreDOMNode prefix]):
              (-[WebCoreDOMNode setPrefix:]):
              (-[WebCoreDOMNode localName]):
              (+[WebCoreDOMNodeList nodeListWithImpl:DOM::]):
              (-[WebCoreDOMNodeList initWithImpl:DOM::]):
              (-[WebCoreDOMNodeList DOM::]):
              (-[WebCoreDOMNodeList dealloc]):
              (+[WebCoreDOMNamedNodeMap namedNodeMapWithImpl:DOM::]):
              (-[WebCoreDOMNamedNodeMap initWithImpl:DOM::]):
              (-[WebCoreDOMNamedNodeMap DOM::]):
              (-[WebCoreDOMNamedNodeMap dealloc]):
              (-[WebCoreDOMNamedNodeMap length]):
              (-[WebCoreDOMNamedNodeMap getNamedItem:]):
              (-[WebCoreDOMNamedNodeMap setNamedItem:]):
              (+[WebCoreDOMAttr attrWithImpl:DOM::]):
              (-[WebCoreDOMAttr initWithImpl:DOM::]):
              (-[WebCoreDOMAttr DOM::]):
              (-[WebCoreDOMAttr dealloc]):
              (-[WebCoreDOMAttr name]):
              (-[WebCoreDOMAttr specified]):
              (-[WebCoreDOMAttr value]):
              (-[WebCoreDOMAttr ownerElement]):
              (+[WebCoreDOMCDATASection CDATASectionWithImpl:DOM::]):
              (-[WebCoreDOMCDATASection initWithImpl:DOM::]):
              (-[WebCoreDOMCDATASection DOM::]):
              (-[WebCoreDOMCDATASection dealloc]):
              * kwq/WebCoreDOMPrivate.h: Added.
              * kwq/WebDOMDocument.h: Added.
              * kwq/WebDOMElement.h: Added.
              * kwq/WebDOMNode.h: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff90f422
  26. 05 Oct, 2002 1 commit
    • rjw's avatar
      Stubs for DOM level 2 core API. · e804476d
      rjw authored
              * DOM.subproj/WebDOMDocument.h: Added.
              * DOM.subproj/WebDOMDocument.m: Added.
              * DOM.subproj/WebDOMElement.h: Added.
              * DOM.subproj/WebDOMElement.m: Added.
              * DOM.subproj/WebDOMNamedNodeMap.h: Added.
              * DOM.subproj/WebDOMNamedNodeMap.m: Added.
              * DOM.subproj/WebDOMNode.h: Added.
              * DOM.subproj/WebDOMNode.m: Added.
              * WebKit.pbproj/project.pbxproj:
      
              * WebView.subproj/WebHTMLViewPrivate.m: tweak.
      
              Removed import of header that was removed earlier.
      
              * BookmarksController.m:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e804476d