1. 21 Nov, 2013 6 commits
    • commit-queue@webkit.org's avatar
      Remove ENABLE_WORKERS · f0eff209
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105784
      
      .:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/WebCore:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      Source/WebKit:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/efl:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * ewk/ewk_settings.cpp:
      (ewk_settings_memory_cache_clear):
      
      Source/WebKit/win:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * WebWorkersPrivate.cpp:
      (WebWorkersPrivate::workerThreadCount):
      
      Source/WTF:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * wtf/FeatureDefines.h:
      * wtf/nix/FeatureDefinesNix.h:
      
      Tools:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * Scripts/webkitperl/FeatureList.pm:
      
      WebKitLibraries:
      
      Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-11-21
      Reviewed by Darin Adler.
      
      * win/tools/vsprops/FeatureDefines.props:
      * win/tools/vsprops/FeatureDefinesCairo.props:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0eff209
    • ryumiel@company100.net's avatar
      [GTK] Unreviewed buildfix after r159614 and r159656. · 99adce44
      ryumiel@company100.net authored
      Source/WebCore:
      
      * bindings/gobject/WebKitDOMCustom.cpp: Add missing header
      
      Source/WebKit2:
      
      * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
      (WebKit::WebInspectorServer::buildPageList): Use the page load state to get page title.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99adce44
    • dbates@webkit.org's avatar
      Only generate isObservable() when IDL specifies GenerateIsReachable · 1ccf4754
      dbates@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124729
      
      Reviewed by Geoffrey Garen.
      
      We should only generate the static inline function isObservable() when the IDL
      specifies GenerateIsReachable. Otherwise, this function is unused.
      
      Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
      we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
      rebased existing test results.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
      * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
      * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
      * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
      * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
      * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
      * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
      * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
      * bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
      * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
      * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
      * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
      * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
      * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
      * bindings/scripts/test/TestGenerateIsReachable.idl: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ccf4754
    • ap@apple.com's avatar
      Implement WebCrypto wrapKey · abd0bbca
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124738
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Tests: crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html
             crypto/subtle/aes-cbc-wrap-rsa.html
      
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::exportKey): Factored out the actual operation that can be chained with
      encryption for wrapKey.
      (WebCore::JSSubtleCrypto::exportKey):
      (WebCore::JSSubtleCrypto::wrapKey):
      (WebCore::JSSubtleCrypto::unwrapKey): Fixed a memory leak in failure code path.
      
      * crypto/SubtleCrypto.idl: Added wrapKey.
      
      LayoutTests: 
      
      * crypto/subtle/aes-cbc-wrap-rsa-expected.txt: Added.
      * crypto/subtle/aes-cbc-wrap-rsa-non-extractable-expected.txt: Added.
      * crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html: Added.
      * crypto/subtle/aes-cbc-wrap-rsa.html: Added.
      
      * crypto/subtle/aes-export-key-expected.txt:
      * crypto/subtle/hmac-export-key-expected.txt:
      There is no longer a console message, the error is in an exception.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      abd0bbca
    • ap@apple.com's avatar
      Implement WebCrypto unwrapKey · 19cf70fd
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124725
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Tests: crypto/subtle/aes-cbc-unwrap-failure.html
             crypto/subtle/aes-cbc-unwrap-rsa.html
      
      * bindings/js/JSCryptoAlgorithmDictionary.cpp:
      * bindings/js/JSCryptoAlgorithmDictionary.h:
      Removed calls for wrap/unwrap parameter parsing, these are just the same as encrypt/decrypt.
      
      * bindings/js/JSCryptoOperationData.cpp:
      (WebCore::cryptoOperationDataFromJSValue):
      * bindings/js/JSCryptoOperationData.h:
      * crypto/CryptoKeySerialization.h:
      More Vector<char> elimination.
      
      * bindings/js/JSDOMPromise.cpp:
      * bindings/js/JSDOMPromise.h:
      Removed unneccessary copy constructor and assignment operator, they are no diffdrent
      than compiler generated ones.
      
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::cryptoKeyUsagesFromJSValue): Minor style fixes.
      (WebCore::JSSubtleCrypto::encrypt): Ditto.
      (WebCore::JSSubtleCrypto::decrypt): Ditto.
      (WebCore::JSSubtleCrypto::sign): Ditto.
      (WebCore::JSSubtleCrypto::verify): Ditto.
      (WebCore::JSSubtleCrypto::generateKey): Ditto.
      (WebCore::importKey): Separated actual import operation and the parts that read
      arguments from ExecState, and call the promise. Logically, this should be outside
      of bindings code even, but JWK makes that quite challenging.
      (WebCore::JSSubtleCrypto::importKey): This only does the more mundane arguments
      and return parts now.
      (WebCore::JSSubtleCrypto::exportKey): Minor style fixes.
      (WebCore::JSSubtleCrypto::unwrapKey): Chain decrypt and import.
      
      * crypto/CryptoAlgorithm.cpp:
      (WebCore::CryptoAlgorithm::encryptForWrapKey):
      (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
      * crypto/CryptoAlgorithm.h:
      There are algorithms that expose wrap/unwrap, but not encrypt/decrypt. These will
      override these new functions, and leave encrypt/decrypt to raise NOT_SUPPORTED_ERR.
      
      * crypto/SubtleCrypto.idl: Added unwrapKey.
      
      LayoutTests: 
      
      * crypto/subtle/aes-cbc-unwrap-failure-expected.txt: Added.
      * crypto/subtle/aes-cbc-unwrap-failure.html: Added.
      * crypto/subtle/aes-cbc-unwrap-rsa-expected.txt: Added.
      * crypto/subtle/aes-cbc-unwrap-rsa.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19cf70fd
    • carlosgc@webkit.org's avatar
      [GTK] Mark all deprecated symbols in GObject DOM bindings · 50d007c9
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124406
      
      Reviewed by Gustavo Noronha Silva.
      
      Source/WebCore:
      
      Move deprecated API from WebKitDOMCustom to a new file
      WebKitDOMDeprecated leaving in WebKitDOMCustom only the
      non-deprecated API that is not autogenerated. Also added the
      deprecation decorations and tags in the documentation.
      
      * bindings/gobject/GNUmakefile.am:
      * bindings/gobject/WebKitDOMCustom.cpp:
      * bindings/gobject/WebKitDOMCustom.h:
      * bindings/gobject/WebKitDOMCustom.symbols:
      * bindings/gobject/WebKitDOMDeprecated.cpp: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp.
      (webkit_dom_blob_webkit_slice):
      (webkit_dom_html_element_get_id):
      (webkit_dom_html_element_set_id):
      (webkit_dom_html_element_get_class_name):
      (webkit_dom_html_element_set_class_name):
      (webkit_dom_html_element_get_class_list):
      (webkit_dom_html_form_element_dispatch_form_change):
      (webkit_dom_html_form_element_dispatch_form_input):
      (webkit_dom_webkit_named_flow_get_overflow):
      (webkit_dom_element_get_webkit_region_overflow):
      (webkit_dom_webkit_named_flow_get_content_nodes):
      (webkit_dom_webkit_named_flow_get_regions_by_content_node):
      (webkit_dom_bar_info_get_property):
      (webkit_dom_bar_info_class_init):
      (webkit_dom_bar_info_init):
      (webkit_dom_bar_info_get_visible):
      (webkit_dom_console_get_memory):
      (webkit_dom_css_style_declaration_get_property_css_value):
      (webkit_dom_document_get_webkit_hidden):
      (webkit_dom_document_get_webkit_visibility_state):
      (webkit_dom_html_document_open):
      (webkit_dom_html_element_set_item_id):
      (webkit_dom_html_element_get_item_id):
      (webkit_dom_html_element_get_item_ref):
      (webkit_dom_html_element_get_item_prop):
      (webkit_dom_html_element_set_item_scope):
      (webkit_dom_html_element_get_item_scope):
      (webkit_dom_html_element_get_item_type):
      (webkit_dom_html_style_element_set_scoped):
      (webkit_dom_html_style_element_get_scoped):
      (webkit_dom_html_properties_collection_get_property):
      (webkit_dom_html_properties_collection_class_init):
      (webkit_dom_html_properties_collection_init):
      (webkit_dom_html_properties_collection_item):
      (webkit_dom_html_properties_collection_named_item):
      (webkit_dom_html_properties_collection_get_length):
      (webkit_dom_html_properties_collection_get_names):
      (webkit_dom_node_get_attributes):
      (webkit_dom_node_has_attributes):
      (webkit_dom_memory_info_get_property):
      (webkit_dom_memory_info_class_init):
      (webkit_dom_memory_info_init):
      (webkit_dom_memory_info_get_total_js_heap_size):
      (webkit_dom_memory_info_get_used_js_heap_size):
      (webkit_dom_memory_info_get_js_heap_size_limit):
      (webkit_dom_micro_data_item_value_class_init):
      (webkit_dom_micro_data_item_value_init):
      (webkit_dom_performance_get_memory):
      (webkit_dom_property_node_list_get_property):
      (webkit_dom_property_node_list_class_init):
      (webkit_dom_property_node_list_init):
      (webkit_dom_property_node_list_item):
      (webkit_dom_property_node_list_get_length):
      (webkit_dom_html_media_element_get_start_time):
      (webkit_dom_html_media_element_get_initial_time):
      (webkit_dom_html_head_element_get_profile):
      (webkit_dom_html_head_element_set_profile):
      (webkit_dom_processing_instruction_get_data):
      (webkit_dom_processing_instruction_set_data):
      * bindings/gobject/WebKitDOMDeprecated.h: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.h.
      * bindings/gobject/WebKitDOMDeprecated.symbols: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols.
      * bindings/scripts/CodeGeneratorGObject.pm:
      (GenerateFunction): Do not include deprecation guards in the cpp file.
      * bindings/scripts/gobject-generate-headers.pl: Do not create
      fordward declarations for non-existent classes like Custom and
      Deprecated.
      * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
      (webkit_dom_test_event_target_dispatch_event):
      
      Tools:
      
      * Scripts/webkitpy/style/checker.py: Add special case for
      WebKitDOMDeprecated.
      * gtk/generate-gtkdoc:
      (get_webkit2_options): Use the prefix of the methods as namespace,
      since this is what gtkdoc expects to sort the index.
      (get_webkit1_options): Ditto.
      (get_webkitdom_options): Ditto.
      * gtk/generate-webkitdom-doc-files:
      (WebKitDOMDocGenerator): Add a global list of deleted objects.
      (WebKitDOMDocGenerator.write_deleted_classes): New method to write
      the documentation for classes that are deprecated because they
      have been removed.
      (WebKitDOMDocGeneratorDocs.write_deleted_classes): Add sections
      for deleted classes too.
      (WebKitDOMDocGeneratorSections.__init__): Build a list of
      deprecated symbols using the given symbols file.
      (WebKitDOMDocGeneratorSections._deleted_class): Returns the
      deleted class corresponding to the given function.
      (WebKitDOMDocGeneratorSections._deprecated_symbols): Builds a
      dictionary of deprecated symbols for every class.
      (WebKitDOMDocGeneratorSections.write_section): Add also the
      deprecated symbols in every section.
      (WebKitDOMDocGeneratorSections.write_deleted_classes): Add
      sections for deleted classes too.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50d007c9
  2. 20 Nov, 2013 3 commits
    • mark.lam@apple.com's avatar
      Build fix for last commit. · 79f7a8eb
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124634.
      
      Not reviewed.
      
      No new tests.
      
      * bindings/js/JSCryptoAlgorithmBuilder.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79f7a8eb
    • mark.lam@apple.com's avatar
      Introducing VMEntryScope to update the VM stack limit. · 30721257
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124634.
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      1. Introduced USE(SEPARATE_C_AND_JS_STACK) (defined in Platform.h).
         Currently, it is hardcoded to use separate C and JS stacks. Once we
         switch to using the C stack for JS frames, we'll need to fix this to
         only be enabled when ENABLE(LLINT_C_LOOP).
      
      2. Stack limits are now tracked in the VM.
      
         Logically, there are 2 stack limits:
         a. m_stackLimit for the native C stack, and
         b. m_jsStackLimit for the JS stack.
      
         If USE(SEPARATE_C_AND_JS_STACK), then the 2 limits are the same
         value, and are implemented as 2 fields in a union.
      
      3. The VM native stackLimit is set as follows:
         a. Initially, the VM sets it to the limit of the stack of the thread that
            instantiated the VM. This allows the parser and bytecode generator to
            run before we enter the VM to execute JS code.
      
         b. Upon entry into the VM to execute JS code (via one of the
            Interpreter::execute...() functions), we instantiate a VMEntryScope
            that sets the VM's stackLimit to the limit of the current thread's
            stack. The VMEntryScope will automatically restore the previous
            entryScope and stack limit upon destruction.
      
         If USE(SEPARATE_C_AND_JS_STACK), the JSStack's methods will set the VM's
         jsStackLimit whenever it grows or shrinks.
      
      4. The VM now provides a isSafeToRecurse() function that compares the
         current stack pointer against its native stackLimit. This subsumes and
         obsoletes the VMStackBounds class.
      
      5. The VMEntryScope class also subsumes DynamicGlobalObjectScope for
         tracking the JSGlobalObject that we last entered the VM with.
      
      6. Renamed dynamicGlobalObject() to vmEntryGlobalObject() since that is
         the value that the function retrieves.
      
      7. Changed JIT and LLINT code to do stack checks against the jsStackLimit
         in the VM class instead of the JSStack.
      
      * API/JSBase.cpp:
      (JSEvaluateScript):
      (JSCheckScriptSyntax):
      * API/JSContextRef.cpp:
      (JSGlobalContextRetain):
      (JSGlobalContextRelease):
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      * bytecompiler/BytecodeGenerator.h:
      (JSC::BytecodeGenerator::emitNode):
      (JSC::BytecodeGenerator::emitNodeInConditionContext):
      * debugger/Debugger.cpp:
      (JSC::Debugger::detach):
      (JSC::Debugger::recompileAllJSFunctions):
      (JSC::Debugger::pauseIfNeeded):
      * debugger/DebuggerCallFrame.cpp:
      (JSC::DebuggerCallFrame::vmEntryGlobalObject):
      * debugger/DebuggerCallFrame.h:
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::compileFunction):
      * dfg/DFGOSREntry.cpp:
      * ftl/FTLLink.cpp:
      (JSC::FTL::link):
      * ftl/FTLOSREntry.cpp:
      * heap/Heap.cpp:
      (JSC::Heap::lastChanceToFinalize):
      (JSC::Heap::deleteAllCompiledCode):
      * interpreter/CachedCall.h:
      (JSC::CachedCall::CachedCall):
      * interpreter/CallFrame.cpp:
      (JSC::CallFrame::vmEntryGlobalObject):
      * interpreter/CallFrame.h:
      * interpreter/Interpreter.cpp:
      (JSC::unwindCallFrame):
      (JSC::Interpreter::unwind):
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      (JSC::Interpreter::debug):
      * interpreter/JSStack.cpp:
      (JSC::JSStack::JSStack):
      (JSC::JSStack::growSlowCase):
      * interpreter/JSStack.h:
      * interpreter/JSStackInlines.h:
      (JSC::JSStack::shrink):
      (JSC::JSStack::grow):
      - Moved these inlined functions here from JSStack.h. It reduces some
        #include dependencies of JSSTack.h which had previously resulted
        in some EWS bots' unhappiness with this patch.
      (JSC::JSStack::updateStackLimit):
      * jit/JIT.cpp:
      (JSC::JIT::privateCompile):
      * jit/JITCall.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITCall32_64.cpp:
      (JSC::JIT::compileLoadVarargs):
      * jit/JITOperations.cpp:
      * llint/LLIntSlowPaths.cpp:
      * llint/LowLevelInterpreter.asm:
      * parser/Parser.cpp:
      (JSC::::Parser):
      * parser/Parser.h:
      (JSC::Parser::canRecurse):
      * runtime/CommonSlowPaths.h:
      * runtime/Completion.cpp:
      (JSC::evaluate):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunctionSkippingEvalEnabledCheck):
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalObject.h:
      * runtime/StringRecursionChecker.h:
      (JSC::StringRecursionChecker::performCheck):
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::releaseExecutableMemory):
      (JSC::VM::throwException):
      * runtime/VM.h:
      (JSC::VM::addressOfJSStackLimit):
      (JSC::VM::jsStackLimit):
      (JSC::VM::setJSStackLimit):
      (JSC::VM::stackLimit):
      (JSC::VM::setStackLimit):
      (JSC::VM::isSafeToRecurse):
      * runtime/VMEntryScope.cpp: Added.
      (JSC::VMEntryScope::VMEntryScope):
      (JSC::VMEntryScope::~VMEntryScope):
      (JSC::VMEntryScope::requiredCapacity):
      * runtime/VMEntryScope.h: Added.
      (JSC::VMEntryScope::globalObject):
      * runtime/VMStackBounds.h: Removed.
      
      Source/WebCore: 
      
      No new tests.
      
      Renamed dynamicGlobalObject() to vmEntryGlobalObject().
      Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
      
      * ForwardingHeaders/runtime/VMEntryScope.h: Added.
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * bindings/js/JSCryptoAlgorithmBuilder.cpp:
      (WebCore::JSCryptoAlgorithmBuilder::add):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::create):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::firstDOMWindow):
      * bindings/js/JSErrorHandler.cpp:
      (WebCore::JSErrorHandler::handleEvent):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JavaScriptCallFrame.h:
      (WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
      * bindings/js/PageScriptDebugServer.cpp:
      (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
      * bindings/js/ScriptDebugServer.cpp:
      (WebCore::ScriptDebugServer::evaluateBreakpointAction):
      (WebCore::ScriptDebugServer::handlePause):
      * bindings/js/WorkerScriptDebugServer.cpp:
      (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
      * bindings/objc/WebScriptObject.mm:
      (WebCore::addExceptionToConsole):
      * bridge/c/c_utility.cpp:
      (JSC::Bindings::convertValueToNPVariant):
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::moveGlobalExceptionToExecState):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::convertValueToObjcObject):
      * bridge/objc/objc_utility.mm:
      (JSC::Bindings::convertValueToObjcValue):
      
      Source/WebKit/mac: 
      
      * WebView/WebScriptDebugger.mm:
      (WebScriptDebugger::sourceParsed):
      
      Source/WTF: 
      
      * wtf/Platform.h:
      * wtf/StackBounds.h:
      (WTF::StackBounds::StackBounds):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      30721257
    • ap@apple.com's avatar
      Use std::function callbacks in CryptoAlgorithm instead of JS promises · c1767f0a
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124673
      
      Reviewed by Anders Carlsson.
      
      To implement key wrapping/unwrapping, we'll need to chain existing operations.
      It's much easier to do with C++ callbacks than with functions fulfilling JS
      promises directly.
      
      Also, this will decouple CryptoAlgorithm from JS, which is nice.
      
      SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
      there is very little polymorphism, the only function whose return type depends
      on algorithm is generateKey (it can create a Key or a KeyPair).
      
      * bindings/js/JSDOMPromise.cpp:
      (WebCore::PromiseWrapper::PromiseWrapper):
      (WebCore::PromiseWrapper::operator=):
      * bindings/js/JSDOMPromise.h:
      Made it copyable, as each crypto function wraps the promise in success and failure
      functional objects now.
      
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::JSSubtleCrypto::encrypt):
      (WebCore::JSSubtleCrypto::decrypt):
      (WebCore::JSSubtleCrypto::sign):
      (WebCore::JSSubtleCrypto::verify):
      (WebCore::JSSubtleCrypto::digest):
      (WebCore::JSSubtleCrypto::generateKey):
      (WebCore::JSSubtleCrypto::importKey):
      (WebCore::JSSubtleCrypto::exportKey):
      * crypto/CryptoAlgorithm.cpp:
      (WebCore::CryptoAlgorithm::encrypt):
      (WebCore::CryptoAlgorithm::decrypt):
      (WebCore::CryptoAlgorithm::sign):
      (WebCore::CryptoAlgorithm::verify):
      (WebCore::CryptoAlgorithm::digest):
      (WebCore::CryptoAlgorithm::generateKey):
      (WebCore::CryptoAlgorithm::deriveKey):
      (WebCore::CryptoAlgorithm::deriveBits):
      (WebCore::CryptoAlgorithm::importKey):
      * crypto/CryptoAlgorithm.h:
      * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
      * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::generateKey):
      (WebCore::CryptoAlgorithmAES_CBC::importKey):
      * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
      * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
      (WebCore::CryptoAlgorithmHMAC::generateKey):
      (WebCore::CryptoAlgorithmHMAC::importKey):
      * crypto/algorithms/CryptoAlgorithmHMAC.h:
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
      * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
      (WebCore::CryptoAlgorithmSHA1::digest):
      * crypto/algorithms/CryptoAlgorithmSHA1.h:
      * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
      (WebCore::CryptoAlgorithmSHA224::digest):
      * crypto/algorithms/CryptoAlgorithmSHA224.h:
      * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
      (WebCore::CryptoAlgorithmSHA256::digest):
      * crypto/algorithms/CryptoAlgorithmSHA256.h:
      * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
      (WebCore::CryptoAlgorithmSHA384::digest):
      * crypto/algorithms/CryptoAlgorithmSHA384.h:
      * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
      (WebCore::CryptoAlgorithmSHA512::digest):
      * crypto/algorithms/CryptoAlgorithmSHA512.h:
      * crypto/keys/CryptoKeyRSA.h:
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      (WebCore::transformAES_CBC):
      (WebCore::CryptoAlgorithmAES_CBC::encrypt):
      (WebCore::CryptoAlgorithmAES_CBC::decrypt):
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      (WebCore::CryptoAlgorithmHMAC::sign):
      (WebCore::CryptoAlgorithmHMAC::verify):
      * crypto/mac/CryptoKeyRSAMac.cpp:
      (WebCore::CryptoKeyRSA::generatePair):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1767f0a
  3. 19 Nov, 2013 2 commits
    • fpizlo@apple.com's avatar
      Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll() · 4bf14eb1
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124609
      
      Source/JavaScriptCore: 
      
      Rubber stamped by Mark Lam.
              
      notifyWrite() is a thing that SymbolTable does. WatchpointSet uses that terminology
      because it was original designed to match exactly SymbolTable's semantics. But now
      it's a confusing term.
      
      * bytecode/Watchpoint.cpp:
      (JSC::WatchpointSet::fireAllSlow):
      * bytecode/Watchpoint.h:
      (JSC::WatchpointSet::fireAll):
      (JSC::InlineWatchpointSet::fireAll):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::put):
      (JSC::JSFunction::defineOwnProperty):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::haveABadTime):
      * runtime/Structure.h:
      (JSC::Structure::notifyTransitionFromThisStructure):
      * runtime/SymbolTable.cpp:
      (JSC::SymbolTableEntry::notifyWriteSlow):
      
      Source/WebCore: 
      
      Rubber stamped by Mark Lam.
      
      No new tests because no new behavior.
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateHeader):
      * bindings/scripts/test/JS/JSTestEventTarget.h:
      (WebCore::JSTestEventTarget::create):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4bf14eb1
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r159455. · dd9a046c
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/159455
      https://bugs.webkit.org/show_bug.cgi?id=124568
      
      broke two api tests (see bug 124564) (Requested by thorton on
      #webkit).
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Removed.
      * page/FrameSnapshotting.h: Removed.
      * page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
      * page/mac/FrameSnapshottingMac.mm: Added.
      (WebCore::imageFromRect):
      (WebCore::selectionImage):
      (WebCore::rangeImage):
      (WebCore::snapshotDragImage):
      * page/win/FrameWin.cpp:
      (WebCore::Frame::dragImageForSelection):
      (WebCore::Frame::nodeImage):
      * page/win/FrameWin.h:
      * platform/DragImage.cpp:
      (WebCore::fitDragImageToMaxSize):
      (WebCore::createDragImageForLink):
      * platform/DragImage.h:
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm:
      
      Source/WebKit/mac:
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd9a046c
  4. 18 Nov, 2013 8 commits
    • commit-queue@webkit.org's avatar
      Consolidate various frame snapshot capabilities. · 6978d8ed
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124325
      
      Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-11-18
      Reviewed by Timothy Hatcher.
      
      Source/WebCore:
      
      Various snapshot creation methods had duplicated code and were split
      between Frame, DragImage, and platform-specific implementationss.
      This patch puts WebCore snapshot methods into FrameSnapshotting
      and removes platform implementations where possible.
      
      DragImage methods reuse snapshot methods where possible. Inspector
      will be able to take snapshots without using drag images.
      
      No new tests, this is a refactoring.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/objc/DOM.mm:
      (-[DOMNode renderedImage]):
      (-[DOMRange renderedImageForcingBlackText:]):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::createDragImage):
      * dom/ClipboardMac.mm:
      (WebCore::Clipboard::createDragImage):
      * page/DragController.cpp:
      (WebCore::DragController::startDrag):
      * page/Frame.cpp:
      * page/Frame.h:
      * page/FrameSnapshotting.cpp: Added.
      (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
      (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
      (WebCore::snapshotFrameRect): Move most buffer logic to here.
      (WebCore::snapshotSelection): Moved from Frame.
      (WebCore::snapshotNode): Moved from Frame.
      * page/FrameSnapshotting.h: Added.
      * page/mac/FrameMac.mm: Removed.
      * page/mac/FrameSnapshottingMac.h: Removed.
      * page/mac/FrameSnapshottingMac.mm: Removed.
      * page/win/FrameWin.cpp: remove duplicate implementation.
      * page/win/FrameWin.h: Fix an incorrect parameter name.
      * platform/DragImage.cpp:
      (WebCore::ScopedNodeDragState::ScopedNodeDragState):
      (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
      (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
      (WebCore::createDragImageForNode):
      (WebCore::createDragImageForSelection):
      (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
      (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
      (WebCore::createDragImageForRange): Moved from Frame.
      (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
      (WebCore::createDragImageForLink): use nullptr.
      
      Source/WebKit/ios:
      
      * WebCoreSupport/WebFrameIOS.mm: use new header file.
      
      Source/WebKit/mac:
      
      Use new platform-independent methods instead of Mac methods.
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _selectionDraggingImage]):
      (-[WebHTMLView selectionImageForcingBlackText:]):
      
      Source/WebKit/win:
      
      * DOMCoreClasses.cpp:
      (DOMElement::renderedImage): use createDragImageForNode.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6978d8ed
    • gyuyoung.kim@samsung.com's avatar
      Clean up static_cast<HTMLFoo*> usage · 38523d91
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124480
      
      Reviewed by Tim Horton.
      
      Though there are toHTMLFoo(), some places are still using static_cast<>.
      Additionally, toHTMLBodyElement() is supported from now.
      
      No new tests, no behavior changes.
      
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::isRequired):
      * accessibility/AccessibilityTable.cpp:
      (WebCore::AccessibilityTable::isDataTable):
      * bindings/js/JSHTMLFrameSetElementCustom.cpp:
      (WebCore::JSHTMLFrameSetElement::nameGetter):
      * bindings/js/JSPluginElementFunctions.cpp:
      (WebCore::pluginInstance):
      * dom/Document.cpp:
      (WebCore::Document::openSearchDescriptionURL):
      (WebCore::Document::iconURLs):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
      * editing/ios/EditorIOS.mm:
      (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
      * html/HTMLBodyElement.h:
      * html/HTMLDocument.cpp:
      (WebCore::HTMLDocument::bgColor):
      (WebCore::HTMLDocument::setBgColor):
      (WebCore::HTMLDocument::fgColor):
      (WebCore::HTMLDocument::setFgColor):
      (WebCore::HTMLDocument::alinkColor):
      (WebCore::HTMLDocument::setAlinkColor):
      (WebCore::HTMLDocument::linkColor):
      (WebCore::HTMLDocument::setLinkColor):
      (WebCore::HTMLDocument::vlinkColor):
      (WebCore::HTMLDocument::setVlinkColor):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::rendererIsNeeded):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
      (WebCore::HTMLFormControlElement::enclosingFormControlElement):
      * html/HTMLFormElement.cpp:
      (WebCore::submitElementFromEvent):
      * html/HTMLImageLoader.cpp:
      (WebCore::HTMLImageLoader::notifyFinished):
      * html/HTMLLegendElement.cpp:
      (WebCore::HTMLLegendElement::virtualForm):
      * html/RadioNodeList.cpp:
      (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::buildObjectForNode):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38523d91
    • carlosgc@webkit.org's avatar
      Unreviewed. Update GObject DOM symbols file after r158760. · c9bfbf16
      carlosgc@webkit.org authored
      * bindings/gobject/webkitdom.symbols: Add
      webkit_dom_text_track_get_id prototype.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9bfbf16
    • carlosgc@webkit.org's avatar
      REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings · 8ff043c3
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124489
      
      Reviewed by Philippe Normand.
      
      In r158821, several properties were changed from readonly to
      CustomSetter. The GObject DOM bindings currently skips any
      attribute having a custom getter or setter, and those properties
      are not generated anymore. We should add support for generating
      attributes having a custom getter or setter in GObject DOM
      bindings generator, but to fix the ABI break now we bring the old
      implementatiom back as custom implementation. This fixes the ABI
      compatibility, but not the API since the GObject properties are
      not generated.
      
      * bindings/gobject/WebKitDOMCustom.cpp:
      (webkit_dom_audio_track_get_kind):
      (webkit_dom_audio_track_get_language):
      (webkit_dom_text_track_get_kind):
      (webkit_dom_text_track_get_language):
      (webkit_dom_video_track_get_kind):
      (webkit_dom_video_track_get_language):
      * bindings/gobject/WebKitDOMCustom.h:
      * bindings/gobject/WebKitDOMCustom.symbols:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ff043c3
    • carlosgc@webkit.org's avatar
      Unreviewed. Update GObject DOM symbols file after r158662. · 4442837c
      carlosgc@webkit.org authored
      * bindings/gobject/webkitdom.symbols: Add missing prototypes.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4442837c
    • carlosgc@webkit.org's avatar
      Unreviewed. Update GObject DOM symbols file after r159208 and r159363. · f797b3d0
      carlosgc@webkit.org authored
      * bindings/gobject/webkitdom.symbols: Add
      webkit_dom_html_media_element_fast_seek prototype.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f797b3d0
    • carlosgc@webkit.org's avatar
      REGRESSION(r159363): [GTK] API break in webkit_dom_html_media_element_set_current_time · ea9af864
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124485
      
      Reviewed by Philippe Normand.
      
      In r159363 currentTime attribute was changed to not raise
      exceptions. This breaks the API of GObject DOM bindings because we
      use a GError parameter for exceptions that has been removed.
      
      * bindings/gobject/WebKitDOMCustom.cpp:
      (webkit_dom_html_media_element_set_current_time): Custom
      implementation that receives a GError for backwards
      compatibility.
      * bindings/gobject/WebKitDOMCustom.h:
      * bindings/gobject/WebKitDOMCustom.symbols: Add
      webkit_dom_html_media_element_set_current_time prototype.
      * bindings/scripts/CodeGeneratorGObject.pm:
      (SkipFunction): Skip
      webkit_dom_html_media_element_set_current_time since we are adding
      a custom implementation.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea9af864
    • ap@apple.com's avatar
      Support exporting public RSASSA-PKCS1-v1_5 keys · a7a1d44a
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124475
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Test: crypto/subtle/rsa-export-key.html
      
      * bindings/js/JSCryptoKeySerializationJWK.h:
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::JSCryptoKeySerializationJWK::buildJSONForRSAComponents):
      (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
      (WebCore::JSCryptoKeySerializationJWK::serialize):
      Added said support (this part works with private keys too).
      
      * crypto/keys/CryptoKeyRSA.h:
      * crypto/mac/CryptoKeyRSAMac.cpp:
      (WebCore::CryptoKeyRSA::getPublicKeyComponents): Moved the logic for getting a
      public key from private one here for reuse in keySizeInBits().
      (WebCore::CryptoKeyRSA::isRestrictedToHash):
      (WebCore::CryptoKeyRSA::keySizeInBits):
      (WebCore::CryptoKeyRSA::exportData):
      Exposed information necessary for JWK serialization.
      
      LayoutTests: 
      
      * crypto/subtle/rsa-export-key-expected.txt: Added.
      * crypto/subtle/rsa-export-key.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7a1d44a
  5. 17 Nov, 2013 3 commits
    • ap@apple.com's avatar
      RSASSA-PKCS1-v1_5 JWK import doesn't check key size · 48c4fbd3
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124472
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Test: crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
      
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Added the checks.
      (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Check key size when
      importing.
      (WebCore::JSCryptoKeySerializationJWK::serialize): Updated a comment.
      
      * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
      Updated a comment.
      
      LayoutTests: 
      
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159393 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48c4fbd3
    • ap@apple.com's avatar
      JWK crypto key export result is a DOM string instead of an array buffer · 106eb707
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124473
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::exportKey):
      Fix it.
      
      LayoutTests: 
      
      * crypto/subtle/aes-export-key.html:
      * crypto/subtle/hmac-export-key.html:
      
      * crypto/subtle/resources/common.js: (bytesToASCIIString): Added a function that
      converts an ArrayBuffer to a string, assuming it's all ASCII.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      106eb707
    • ap@apple.com's avatar
      Use uint8_t vectors for WebCrypto data · f37f9b40
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124466
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Using Vector<char> for crypto key data is somewhat non-idiomatic, and it gets simply
      dangerous for bignums, because signed arithmetic is not appropriate for bignum digits.
      
      * Modules/websockets/WebSocketHandshake.cpp:
      (WebCore::generateSecWebSocketKey):
      (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
      No longer need to cast data to char* here.
      
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      * bindings/js/JSCryptoKeySerializationJWK.h:
      * crypto/CryptoDigest.h:
      * crypto/CryptoKey.h:
      * crypto/keys/CryptoKeyAES.cpp:
      * crypto/keys/CryptoKeyAES.h:
      * crypto/keys/CryptoKeyDataOctetSequence.h:
      * crypto/keys/CryptoKeyDataRSAComponents.cpp:
      * crypto/keys/CryptoKeyDataRSAComponents.h:
      * crypto/keys/CryptoKeyHMAC.cpp:
      * crypto/keys/CryptoKeyHMAC.h:
      * crypto/keys/CryptoKeyRSA.h:
      * crypto/keys/CryptoKeySerializationRaw.cpp:
      * crypto/keys/CryptoKeySerializationRaw.h:
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      * crypto/mac/CryptoDigestMac.cpp:
      * crypto/mac/CryptoKeyMac.cpp:
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
      Switched to Vector<uint8_t>.
      
      * crypto/mac/CryptoKeyRSAMac.cpp:
      (WebCore::getPublicKeyComponents): Extracted from buildAlgorithmDescription() and simplified.
      (WebCore::CryptoKeyRSA::create): Switched to Vector<uint8_t>.
      (WebCore::CryptoKeyRSA::buildAlgorithmDescription): No longer need to copy data just
      to change type from Vector<char> to Vector<unsigned char>.
      (WebCore::bigIntegerToUInt32): Ditto. No longer need to cast types when dealing with the bignum.
      (WebCore::CryptoKeyRSA::generatePair): Improved an error message a little.
      
      * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL):
      * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest):
      * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::archive):
      * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL):
      No longer need to cast data to char* here.
      
      Source/WTF: 
      
      Binary data can be UTF-8, in which case "char*" is idiomatic, or it can be arbitrary
      binary data, in which case "uint8_t*" is more common.
      
      Changed encode functions that took "const char *" to "const void*", and decode
      functions that took "Vector<char>&" now take an adapter class.
      
      The adapter relies on Vector<char> and Vector<uint8_t> classes having an identical layout.
      
      * wtf/text/Base64.cpp:
      (WTF::base64Encode):
      (WTF::base64URLEncode):
      (WTF::base64DecodeInternal):
      (WTF::base64Decode):
      (WTF::base64URLDecode):
      * wtf/text/Base64.h:
      (WTF::SignedOrUnsignedCharVectorAdapter):
      (WTF::ConstSignedOrUnsignedCharVectorAdapter):
      (WTF::base64Encode):
      (WTF::base64URLEncode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f37f9b40
  6. 16 Nov, 2013 2 commits
    • ap@apple.com's avatar
      WebCrypto no longer uses sequences of ArrayBuffers · b651c9a6
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124451
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Covered by existing tests.
      
      Changed all operations to take single CryptoOperationData objects.
      
      * bindings/js/JSCryptoOperationData.cpp:
      * bindings/js/JSCryptoOperationData.h:
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::JSSubtleCrypto::encrypt):
      (WebCore::JSSubtleCrypto::decrypt):
      (WebCore::JSSubtleCrypto::sign):
      (WebCore::JSSubtleCrypto::verify):
      (WebCore::JSSubtleCrypto::digest):
      * crypto/CryptoAlgorithm.cpp:
      (WebCore::CryptoAlgorithm::encrypt):
      (WebCore::CryptoAlgorithm::decrypt):
      (WebCore::CryptoAlgorithm::sign):
      (WebCore::CryptoAlgorithm::verify):
      (WebCore::CryptoAlgorithm::digest):
      * crypto/CryptoAlgorithm.h:
      * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
      * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
      * crypto/algorithms/CryptoAlgorithmHMAC.h:
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
      * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
      (WebCore::CryptoAlgorithmSHA1::digest):
      * crypto/algorithms/CryptoAlgorithmSHA1.h:
      * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
      (WebCore::CryptoAlgorithmSHA224::digest):
      * crypto/algorithms/CryptoAlgorithmSHA224.h:
      * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
      (WebCore::CryptoAlgorithmSHA256::digest):
      * crypto/algorithms/CryptoAlgorithmSHA256.h:
      * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
      (WebCore::CryptoAlgorithmSHA384::digest):
      * crypto/algorithms/CryptoAlgorithmSHA384.h:
      * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
      (WebCore::CryptoAlgorithmSHA512::digest):
      * crypto/algorithms/CryptoAlgorithmSHA512.h:
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      (WebCore::transformAES_CBC):
      (WebCore::CryptoAlgorithmAES_CBC::encrypt):
      (WebCore::CryptoAlgorithmAES_CBC::decrypt):
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      (WebCore::calculateSignature):
      (WebCore::CryptoAlgorithmHMAC::sign):
      (WebCore::CryptoAlgorithmHMAC::verify):
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
      
      LayoutTests: 
      
      Updated tests accordingly.
      
      * crypto/subtle/aes-cbc-192-encrypt-decrypt.html:
      * crypto/subtle/aes-cbc-256-encrypt-decrypt.html:
      * crypto/subtle/aes-cbc-encrypt-decrypt-expected.txt:
      * crypto/subtle/aes-cbc-encrypt-decrypt-with-padding.html:
      * crypto/subtle/aes-cbc-encrypt-decrypt.html:
      * crypto/subtle/aes-cbc-import-jwk.html:
      * crypto/subtle/aes-cbc-wrong-key-class-expected.txt:
      * crypto/subtle/aes-cbc-wrong-key-class.html:
      * crypto/subtle/argument-conversion-expected.txt:
      * crypto/subtle/argument-conversion.html:
      * crypto/subtle/hmac-import-jwk.html:
      * crypto/subtle/hmac-sign-verify-empty-key.html:
      * crypto/subtle/hmac-sign-verify.html:
      * crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html:
      * crypto/subtle/sha-1-expected.txt:
      * crypto/subtle/sha-1.html:
      * crypto/subtle/sha-224-expected.txt:
      * crypto/subtle/sha-224.html:
      * crypto/subtle/sha-256-expected.txt:
      * crypto/subtle/sha-256.html:
      * crypto/subtle/sha-384-expected.txt:
      * crypto/subtle/sha-384.html:
      * crypto/subtle/sha-512-expected.txt:
      * crypto/subtle/sha-512.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b651c9a6
    • ap@apple.com's avatar
      Support exporting symmetric keys as JWK · ca827605
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124442
      
      Reviewed by Sam Weinig.
      
      Source/JavaScriptCore: 
      
      * runtime/JSONObject.h: Export JSONStringify.
      
      Source/WebCore: 
      
      Error handling is not consistent yet - some errors cause exceptions, and others
      result in rejected promises. This part of spec is incomplete, so I basically did
      what was most straightforward in each case.
      
      * bindings/js/JSCryptoKeySerializationJWK.h: 
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Updated a comment with a better link.
      (WebCore::JSCryptoKeySerializationJWK::buildJSONForOctetSequence): A helper to building JWK.
      (WebCore::JSCryptoKeySerializationJWK::addToJSON): Ditto.
      (WebCore::JSCryptoKeySerializationJWK::addBoolToJSON): Ditto.
      (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): Ditto. The code for
      mapping is my best guess, this all needs to be specified.
      (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON): A helper to building JWK.
      (WebCore::JSCryptoKeySerializationJWK::serialize): Build a JSON string for the key.
      
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::JSSubtleCrypto::importKey): Updated a comment.
      (WebCore::JSSubtleCrypto::exportKey): Use CryptoKeySerialization (also for raw keys,
      for consistency).
      
      * crypto/CryptoKey.h:
      (WebCore::CryptoKey::algorithmIdentifier):
      (WebCore::CryptoKey::usagesBitmap):
      Exposed data needed for building JWK (it used to be only exposed in a form suitable
      for DOM accessors).
      
      * crypto/keys/CryptoKeyHMAC.h: Ditto, added an accessor for JWK.
      
      * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
      * crypto/keys/CryptoKeySerializationRaw.h:
      Moved from JSSubtleCryptoCustom.cpp for consistency.
      
      Source/WTF: 
      
      Base64URL encoding doesn't use '=' padding, and doesn't need any other options.
      Added this mode for encode, and removed policy arguments from exposed functions.
      
      * wtf/text/Base64.cpp:
      (WTF::base64EncodeInternal):
      (WTF::base64URLEncode):
      (WTF::base64URLDecode):
      * wtf/text/Base64.h:
      (WTF::base64URLEncode):
      
      LayoutTests: 
      
      * crypto/subtle/aes-export-key-expected.txt:
      * crypto/subtle/aes-export-key.html:
      * crypto/subtle/hmac-export-key-expected.txt:
      * crypto/subtle/hmac-export-key.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca827605
  7. 15 Nov, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Modifying RTCIceCandidate object construction to match the spec · a1366a09
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124369
      
      Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-15
      Reviewed by Eric Carlson.
      
      According to the spec the RTCIceCandidateInit parameter in RTCSessionDescription constructor is optional,
      which must not be nullable, and, if passed, must be a valid Dictionary. If the keys are not present, the string
      object that stores them in the RTCIceCandidate class, must be null in those cases. Also, if a key is present
      and its value is not valid an exception must be raised.
      
      Source/WebCore:
      
      Existing test was updated.
      
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCIceCandidate.cpp:
      (WebCore::RTCIceCandidate::create):
      * Modules/mediastream/RTCIceCandidate.idl:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSRTCIceCandidateCustom.cpp: Added.
      (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
      
      LayoutTests:
      
      * fast/mediastream/RTCIceCandidate-expected.txt:
      * fast/mediastream/RTCIceCandidate.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1366a09
  8. 14 Nov, 2013 2 commits
    • commit-queue@webkit.org's avatar
      Clean up sequence handling in Blob constructor · 933bf408
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124343
      
      Patch by Victor Costan <costan@gmail.com> on 2013-11-14
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Added test case to LayoutTests/fast/files/blob-constructor.html
      
      * bindings/js/JSBlobCustom.cpp:
      (WebCore::JSBlobConstructor::constructJSBlob):
          Handle exceptions in sequences, eliminate double type-checking for
          ArrayBuffer, ArrayBufferView and Blob parts.
      
      LayoutTests:
      
      * fast/files/blob-constructor-expected.txt:
      * fast/files/script-tests/blob-constructor.js:
          Add test with sequence that throws an error on property access.
      (get Object):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      933bf408
    • ap@apple.com's avatar
      Implement raw format for WebCrypto key export · 32fdefdd
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124376
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Tests: crypto/subtle/aes-export-key.html
             crypto/subtle/hmac-export-key.html
      
      A CryptoKey just exports its native CryptoKeyData, which will also work nicely for
      JWK format soon. For spki and pkcs8, we'll need to figure out the best way to
      utilize platform library support for ASN.1, but we are not there yet.
      
      * bindings/js/JSSubtleCryptoCustom.cpp:
      (WebCore::JSSubtleCrypto::exportKey):
      * crypto/CryptoKey.h:
      * crypto/SubtleCrypto.idl:
      * crypto/keys/CryptoKeyAES.cpp:
      (WebCore::CryptoKeyAES::exportData):
      * crypto/keys/CryptoKeyAES.h:
      * crypto/keys/CryptoKeyHMAC.cpp:
      (WebCore::CryptoKeyHMAC::exportData):
      * crypto/keys/CryptoKeyHMAC.h:
      
      * crypto/keys/CryptoKeyRSA.h:
      * crypto/mac/CryptoKeyRSAMac.cpp:
      (WebCore::CryptoKeyRSA::exportData):
      Added a dummy implementation for RSA.
      
      LayoutTests: 
      
      * crypto/subtle/aes-export-key-expected.txt: Added.
      * crypto/subtle/aes-export-key.html: Added.
      * crypto/subtle/hmac-export-key-expected.txt: Added.
      * crypto/subtle/hmac-export-key.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32fdefdd
  9. 13 Nov, 2013 4 commits
    • commit-queue@webkit.org's avatar
      Source/WebCore: Blob constructor accepts a sequence (array-like object) as first arg. · 847e8c7e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124175
      
      Patch by Victor Costan <costan@gmail.com> on 2013-11-13
      Reviewed by Christophe Dumez.
      
      Added test cases to fast/files/script-tests/blob-constructor.js.
      
      * bindings/js/JSBlobCustom.cpp: Make the constructor work with sequences.
      (WebCore::JSBlobConstructor::constructJSBlob):
      * bindings/js/JSDOMBinding.h:
      (WebCore::toJSSequence): Slightly better error message when conversion fails.
      (WebCore::toJS): Whitespace.
      (WebCore::jsArray): Whitespace.
      
      LayoutTests: Blob constructor accepts a sequence (array-like object) as first arg.
      https://bugs.webkit.org/show_bug.cgi?id=124175
      
      Patch by Victor Costan <costan@gmail.com> on 2013-11-13
      Reviewed by Christophe Dumez.
      
      * crypto/subtle/argument-conversion-expected.txt: Updated sequence error expectations.
      * fast/dom/Window/window-postmessage-args-expected.txt: Updated sequence error expectations.
      * fast/events/constructors/message-event-constructor-expected.txt: Updated sequence error expectations.
      * fast/events/message-port-multi-expected.txt: Updated sequence error expectations.
      * fast/files/blob-constructor-expected.txt: Updated error text and added expectations.
      * fast/files/script-tests/blob-constructor.js: Added sequence test cases.
      * fast/workers/worker-context-multi-port-expected.txt: Updated sequence error expectations.
      * fast/workers/worker-multi-port-expected.txt: Updated sequence error expectations.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      847e8c7e
    • commit-queue@webkit.org's avatar
      Modifying RTCSessionDescription object construction to match the spec · 53a006ec
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=124212
      
      Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-13
      Reviewed by Eric Carlson.
      
      According to the spec the RTCSessionDescriptionInit parameter in RTCSessionDescription constructor is optional,
      which must not be nullable. If the 'type' and/or 'sdp' keys are not present, the string object that stores
      them in the RTCSessionDescription class, must be null in those cases. Also, if an object that is not a
      Dictionary is passed as argument to the constructor, an exception must be raised.
      
      Source/WebCore:
      
      Existing test was updated.
      
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCSessionDescription.cpp:
      (WebCore::RTCSessionDescription::create):
      * Modules/mediastream/RTCSessionDescription.idl:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSRTCSessionDescriptionCustom.cpp: Added.
      (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
      
      LayoutTests:
      
      * fast/mediastream/RTCSessionDescription-expected.txt:
      * fast/mediastream/RTCSessionDescription.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      53a006ec
    • ap@apple.com's avatar
      Check WebCrypto parameter types when casting · 2882324e
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124297
      
      Reviewed by Sam Weinig.
      
      Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.
      
      * bindings/js/JSCryptoAlgorithmDictionary.cpp:
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
      And sure enough, there was a bug caught by the added checks.
      
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
      * crypto/CryptoAlgorithmParameters.h:
      (WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
      (WebCore::CryptoAlgorithmParameters::parametersClass):
      * crypto/CryptoKey.h:
      * crypto/CryptoKeyData.h:
      * crypto/CryptoKeySerialization.h:
      * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::generateKey):
      * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
      (WebCore::CryptoAlgorithmHMAC::generateKey):
      (WebCore::CryptoAlgorithmHMAC::importKey):
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
      * crypto/keys/CryptoKeyAES.h:
      * crypto/keys/CryptoKeyDataOctetSequence.h:
      (WebCore::isCryptoKeyDataOctetSequence):
      * crypto/keys/CryptoKeyDataRSAComponents.h:
      (WebCore::isCryptoKeyDataRSAComponents):
      * crypto/keys/CryptoKeyHMAC.h:
      * crypto/keys/CryptoKeyRSA.h:
      * crypto/keys/CryptoKeySerializationRaw.h:
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::encrypt):
      (WebCore::CryptoAlgorithmAES_CBC::decrypt):
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      (WebCore::CryptoAlgorithmHMAC::sign):
      (WebCore::CryptoAlgorithmHMAC::verify):
      * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
      * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
      * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
      * crypto/parameters/CryptoAlgorithmHmacParams.h:
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
      * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
      * crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2882324e
    • ap@apple.com's avatar
      Implement key generation and JWK import for RSASSA-PKCS1-v1_5 · a237529b
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124236
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
             crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
      
      * WebCore.xcodeproj/project.pbxproj: Added new files.
      
      * bindings/js/JSCryptoAlgorithmBuilder.cpp:
      (WebCore::JSCryptoAlgorithmBuilder::add):
      * bindings/js/JSCryptoAlgorithmBuilder.h:
      * crypto/CryptoAlgorithmDescriptionBuilder.h:
      Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
      
      * bindings/js/JSCryptoAlgorithmDictionary.cpp:
      (WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
      (WebCore::createAesKeyGenParams): Ditto.
      (WebCore::createHmacParams): Ditto.
      (WebCore::createHmacKeyParams): Ditto.
      (WebCore::createRsaKeyGenParams): Added.
      (WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
      parameters for importKey, so the structure remains blank (unlike with JWK).
      (WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
      
      * bindings/js/JSCryptoKeySerializationJWK.h:
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::getJSArrayFromJSON): Added.
      (WebCore::getBigIntegerVectorFromJSON): Added.
      (WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
      will remember which algorithm it's allowed to be used with.
      (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
      RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
      (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
      (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
      RSA key components from JWK.
      (WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
      
      * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
      Placeholders.
      
      * crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
      
      * crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
      for poor man's RTTI.
      
      * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey):
      * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
      * crypto/keys/CryptoKeyAES.h:
      (WebCore::isCryptoKeyAES):
      (WebCore::toCryptoKeyAES):
      * crypto/keys/CryptoKeyDataOctetSequence.h:
      (WebCore::toCryptoKeyDataOctetSequence):
      * crypto/keys/CryptoKeyHMAC.h:
      (WebCore::isCryptoKeyHMAC):
      (WebCore::toCryptoKeyHMAC):
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::encrypt):
      (WebCore::CryptoAlgorithmAES_CBC::decrypt):
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      (WebCore::CryptoAlgorithmHMAC::sign):
      (WebCore::CryptoAlgorithmHMAC::verify):
      Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
      
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
      Glue code for importKey/generateKey for now.
      
      * crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
      (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
      (WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
      * crypto/keys/CryptoKeyDataRSAComponents.h: Added.
      (WebCore::toCryptoKeyDataRSAComponents):
      Added a structure to hold RSA key components, extracted from JWK or another format.
      
      * crypto/keys/CryptoKeyRSA.h: Added.
      * crypto/mac/CryptoKeyRSAMac.cpp: Added.
      
      * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
      (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
      Register RSASSA_PKCS1_v1_5.
      
      * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
      sure that hasLength is never left uninitialized, even when reading formats that
      don't contain a length.
      
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
      * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
      * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
      Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
      
      LayoutTests:
      
      * crypto/subtle/resources/common.js:
      (hexToArrayBuffer): Fixed a typo
      (Base64URL.stringify):
      (Base64URL.parse):
      Added helpers to deal with Base64URL, as needed for JWK.
      
      * crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a237529b
  10. 12 Nov, 2013 5 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r159160, r159161, and r159164. · 388f415d
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/159160
      http://trac.webkit.org/changeset/159161
      http://trac.webkit.org/changeset/159164
      https://bugs.webkit.org/show_bug.cgi?id=124253
      
      Too many errors (make fewer) (Requested by ap on #webkit).
      
      Source/WebCore:
      
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSCryptoAlgorithmBuilder.cpp:
      * bindings/js/JSCryptoAlgorithmBuilder.h:
      * bindings/js/JSCryptoAlgorithmDictionary.cpp:
      (WebCore::createAesCbcParams):
      (WebCore::createAesKeyGenParams):
      (WebCore::createHmacParams):
      (WebCore::createHmacKeyParams):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey):
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey):
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
      (WebCore::JSCryptoKeySerializationJWK::keyData):
      * bindings/js/JSCryptoKeySerializationJWK.h:
      * crypto/CryptoAlgorithmDescriptionBuilder.h:
      * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Removed.
      * crypto/CryptoKey.h:
      (WebCore::ENUM_CLASS):
      * crypto/CryptoKeyData.h:
      (WebCore::CryptoKeyData::ENUM_CLASS):
      * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::importKey):
      * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
      (WebCore::CryptoAlgorithmHMAC::importKey):
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Removed.
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Removed.
      * crypto/keys/CryptoKeyAES.h:
      (WebCore::asCryptoKeyAES):
      * crypto/keys/CryptoKeyDataOctetSequence.h:
      (WebCore::asCryptoKeyDataOctetSequence):
      * crypto/keys/CryptoKeyDataRSAComponents.cpp: Removed.
      * crypto/keys/CryptoKeyDataRSAComponents.h: Removed.
      * crypto/keys/CryptoKeyHMAC.h:
      (WebCore::asCryptoKeyHMAC):
      * crypto/keys/CryptoKeyRSA.h: Removed.
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::encrypt):
      (WebCore::CryptoAlgorithmAES_CBC::decrypt):
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      (WebCore::CryptoAlgorithmHMAC::sign):
      (WebCore::CryptoAlgorithmHMAC::verify):
      * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
      (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
      * crypto/mac/CryptoKeyRSAMac.cpp: Removed.
      * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Removed.
      * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
      * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Removed.
      
      LayoutTests:
      
      * crypto/subtle/resources/common.js:
      (hexToArrayBuffer):
      * crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Removed.
      * crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html: Removed.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Removed.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html: Removed.
      * platform/mac/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      388f415d
    • ap@apple.com's avatar
      Implement key generation and JWK import for RSASSA-PKCS1-v1_5 · 668796b4
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124236
      
      Release build fix.
      
      * bindings/js/JSCryptoAlgorithmBuilder.cpp: Include TypedArrayInlines.h
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      668796b4
    • ap@apple.com's avatar
      Implement key generation and JWK import for RSASSA-PKCS1-v1_5 · c0d58adc
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124236
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
             crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
      
      * WebCore.xcodeproj/project.pbxproj: Added new files.
      
      * bindings/js/JSCryptoAlgorithmBuilder.cpp:
      (WebCore::JSCryptoAlgorithmBuilder::add):
      * bindings/js/JSCryptoAlgorithmBuilder.h:
      * crypto/CryptoAlgorithmDescriptionBuilder.h:
      Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
      
      * bindings/js/JSCryptoAlgorithmDictionary.cpp:
      (WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
      (WebCore::createAesKeyGenParams): Ditto.
      (WebCore::createHmacParams): Ditto.
      (WebCore::createHmacKeyParams): Ditto.
      (WebCore::createRsaKeyGenParams): Added. 
      (WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
      parameters for importKey, so the structure remains blank (unlike with JWK).
      (WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
      (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
      
      * bindings/js/JSCryptoKeySerializationJWK.h:
      * bindings/js/JSCryptoKeySerializationJWK.cpp:
      (WebCore::getJSArrayFromJSON): Added.
      (WebCore::getBigIntegerVectorFromJSON): Added.
      (WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
      will remember which algorithm it's allowed to be used with.
      (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
      RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
      (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
      (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
      RSA key components from JWK.
      (WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
      
      * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
      (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
      Placeholders.
      
      * crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
      
      * crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
      for poor man's RTTI.
      
      * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): 
      * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
      * crypto/keys/CryptoKeyAES.h:
      (WebCore::isCryptoKeyAES):
      (WebCore::toCryptoKeyAES):
      * crypto/keys/CryptoKeyDataOctetSequence.h:
      (WebCore::toCryptoKeyDataOctetSequence):
      * crypto/keys/CryptoKeyHMAC.h:
      (WebCore::isCryptoKeyHMAC):
      (WebCore::toCryptoKeyHMAC):
      * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
      (WebCore::CryptoAlgorithmAES_CBC::encrypt):
      (WebCore::CryptoAlgorithmAES_CBC::decrypt):
      * crypto/mac/CryptoAlgorithmHMACMac.cpp:
      (WebCore::CryptoAlgorithmHMAC::sign):
      (WebCore::CryptoAlgorithmHMAC::verify):
      Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
      
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
      * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
      Glue code for importKey/generateKey for now.
      
      * crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
      (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
      (WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
      * crypto/keys/CryptoKeyDataRSAComponents.h: Added.
      (WebCore::toCryptoKeyDataRSAComponents):
      Added a structure to hold RSA key components, extracted from JWK or another format.
      
      * crypto/keys/CryptoKeyRSA.h: Added.
      * crypto/mac/CryptoKeyRSAMac.cpp: Added.
      
      * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
      (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
      Register RSASSA_PKCS1_v1_5.
      
      * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
      sure that hasLength is never left uninitialized, even when reading formats that
      don't contain a length.
      
      * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
      * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
      * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
      Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
      
      LayoutTests: 
      
      * crypto/subtle/resources/common.js:
      (hexToArrayBuffer): Fixed a typo
      (Base64URL.stringify):
      (Base64URL.parse):
      Added helpers to deal with Base64URL, as needed for JWK.
      
      * crypto/subtle/rsassa-pkcs1-v1_5-generate-key-expected.txt: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt: Added.
      * crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0d58adc
    • commit-queue@webkit.org's avatar
      Fix reported build warnings for GTK · 98e3802f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=123439
      
      Patch by Tibor Meszaros <mtibor@inf.u-szeged.hu> on 2013-11-12
      Reviewed by Carlos Garcia Campos.
      
      There was a void method, that has return value in it's documentation, so I removed it.
      
      * bindings/gobject/WebKitDOMCustom.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98e3802f
    • zandobersek@gmail.com's avatar
      JSC bindings generator should generate deletable JSC functions · d2d6baf8
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122422
      
      Reviewed by Geoffrey Garen.
      
      Source/WebCore: 
      
      The JSC functions that the JSC bindings generator generates should be deletable to conform to
      the WebIDL specification, which instructs that the WebIDL operations must be configurable (which
      translates to the JSC functions being deletable).
      
      The generator will still produce a non-deletable JSC function for operations under almost all
      Web-facing interfaces since they're annotated with the OperationsNotDeletable attribute. The
      exception here is the Node interface that is having the attribute removed, with the provided
      test case testing that all the functions on the Node prototype object are writable, enumerable
      and configurable. This behavior conforms to the WebIDL specification and the behaviors of IE
      and Firefox. Chrome at the moment still provides non-configurable functions.
      
      Test: fast/dom/webidl-operations-on-node-prototype.html
      
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation): Enforce the non-deletable behavior of the JSC function if either the
      operation's interface is annotated with the OperationsNotDeletable attribute or the operation itself
      is annotated with the NotDeletable attribute.
      * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Update the JSC generator test baselines.
      * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
      * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
      * dom/Node.idl: Remove the OperationsNotDeletable attribute.
      
      LayoutTests: 
      
      Test that all the functions on the Node prototype object (apart from the constructor) are
      writable, enumerable and configurable, as expected for WebIDL operations. This matches the
      WebIDL specification as well as IE and Firefox.
      
      Other affected test cases and baselines are updated to reflect the new behavior.
      
      * fast/dom/webidl-operations-on-node-prototype-expected.txt: Added.
      * fast/dom/webidl-operations-on-node-prototype.html: Added.
      * js/dom/getOwnPropertyDescriptor-expected.txt:
      * js/resources/getOwnPropertyDescriptor.js:
      * platform/mac/canvas/philip/tests/type.prototype-expected.txt: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2d6baf8
  11. 11 Nov, 2013 2 commits
    • gyuyoung.kim@samsung.com's avatar
      Clean up static_cast<Element*> usage · a4e7a7b1
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124133
      
      Reviewed by Andreas Kling.
      
      We need to use toFoo cast function instead of static_cast<>. Though there is toElement(),
      static_cast<Element*> is still being used.
      
      No new tests, no behavior changes.
      
      * bindings/gobject/WebKitDOMPrivate.cpp:
      (WebKit::wrap):
      * dom/ElementTraversal.h:
      (WebCore::::lastWithinTemplate):
      (WebCore::::nextTemplate):
      (WebCore::::previousTemplate):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4e7a7b1
    • ap@apple.com's avatar
      Support WebCrypto KeyPair interface · b4086485
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=124161
      
      Reviewed by Geoffrey Garen.
      
      No new tests yet, will be tested once generateKey is implemented for any RSA algorithms.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * WebCore.xcodeproj/project.pbxproj:
      Added new files.
      
      * bindings/js/JSDOMPromise.h: Support returning a key pair via a promise.
      
      * bindings/js/JSCryptoKeyPairCustom.cpp: Added.
      (WebCore::JSCryptoKeyPair::visitChildren):
      * crypto/CryptoKey.idl:
      CryptoKey wrapper is reachable through KeyPair, but it doesn't have (or need)
      a back pointer.
      
      * crypto/CryptoKeyPair.cpp: Added.
      (WebCore::CryptoKeyPair::CryptoKeyPair):
      (WebCore::CryptoKeyPair::~CryptoKeyPair):
      * crypto/CryptoKeyPair.h: Added.
      (WebCore::CryptoKeyPair::create):
      (WebCore::CryptoKeyPair::publicKey):
      (WebCore::CryptoKeyPair::privateKey):
      * crypto/CryptoKeyPair.idl: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4086485
  12. 10 Nov, 2013 1 commit
  13. 09 Nov, 2013 1 commit