1. 28 Aug, 2013 40 commits
    • rniwa@webkit.org's avatar
      Expand classList test to cover exception in toString · 36027480
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120444
      
      Reviewed by Benjamin Poulain.
      
      Merge https://chromium.googlesource.com/chromium/blink/+/825fefb837133d5545964c17f6aa4b62bfe3df0c
      
      When add and remove is called and there is an exception being thrown
      in one of the arguments we need to ensure that we are not calling the
      implementation of add and remove.
      
      * fast/dom/HTMLElement/class-list-expected.txt:
      * fast/dom/HTMLElement/class-list-quirks-expected.txt:
      * fast/dom/HTMLElement/script-tests/class-list.js:
      (shouldBeEqualToString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      36027480
    • ryuan.choi@samsung.com's avatar
      [EFL] Let Page create the main Frame · 510cb028
      ryuan.choi@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120360
      
      Reviewed by Darin Adler.
      
      Page always creates the main Frame by itself after r154616.
      This patch follows the changes for WebKit/Efl like other ports.
      
      * WebCoreSupport/FrameLoaderClientEfl.cpp:
      (WebCore::FrameLoaderClientEfl::createFrame):
      Moved the logic of ewk_view_frame_create.
      * ewk/ewk_frame.cpp:
      (ewk_frame_init):
      (ewk_frame_child_add):
      Moved construction logic of Frame and FrameLoderClientEfl from ewk_view.
      (EWKPrivate::setCoreFrame):
      * ewk/ewk_frame_private.h:
      * ewk/ewk_view.cpp: Removed _ewk_view_core_frame_new.
      (_ewk_view_priv_new):
      (_ewk_view_smart_add):
      (ewk_view_frame_rect_changed):
      * ewk/ewk_view_private.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      510cb028
    • commit-queue@webkit.org's avatar
      Source/JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=119548 · 3f922f9b
      commit-queue@webkit.org authored
      Refactoring Exception throws.
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
      Reviewed by Geoffrey Garen.
      
      Gardening of exception throws. The act of throwing an exception was being handled in
      different ways depending on whether the code was running in the LLint, Baseline JIT,
      or the DFG Jit. This made development in the vm exception and error objects difficult.
      
       * runtime/VM.cpp:
      (JSC::appendSourceToError):
      This function moved from the interpreter into the VM. It views the developers code
      (if there is a codeBlock) to extract what was trying to be evaluated when the error
      occurred.
      
      (JSC::VM::throwException):
      This function takes in the error object and sets the following:
          1: The VM's exception stack
          2: The VM's exception
          3: Appends extra information on the error message(via appendSourceToError)
          4: The error object's line number
          5: The error object's column number
          6: The error object's sourceURL
          7: The error object's stack trace (unless it already exists because the developer
              created the error object).
      
      (JSC::VM::getExceptionInfo):
      (JSC::VM::setExceptionInfo):
      (JSC::VM::clearException):
      (JSC::clearExceptionStack):
      * runtime/VM.h:
      (JSC::VM::exceptionOffset):
      (JSC::VM::exception):
      (JSC::VM::addressOfException):
      (JSC::VM::exceptionStack):
      VM exception and exceptionStack are now private data members.
      
      * interpreter/Interpreter.h:
      (JSC::ClearExceptionScope::ClearExceptionScope):
      Created this structure to temporarily clear the exception within the VM. This
      needed to see if addition errors occur when setting the debugger as we are
      unwinding the stack.
      
       * interpreter/Interpreter.cpp:
      (JSC::Interpreter::unwind):
      Removed the code that would try to add error information if it did not exist.
      All of this functionality has moved into the VM and all error information is set
      at the time the error occurs.
      
      The rest of these functions reference the new calling convention to throw an error.
      
      * API/APICallbackFunction.h:
      (JSC::APICallbackFunction::call):
      * API/JSCallbackConstructor.cpp:
      (JSC::constructJSCallback):
      * API/JSCallbackObjectFunctions.h:
      (JSC::::getOwnPropertySlot):
      (JSC::::defaultValue):
      (JSC::::put):
      (JSC::::putByIndex):
      (JSC::::deleteProperty):
      (JSC::::construct):
      (JSC::::customHasInstance):
      (JSC::::call):
      (JSC::::getStaticValue):
      (JSC::::staticFunctionGetter):
      (JSC::::callbackGetter):
      * debugger/Debugger.cpp:
      (JSC::evaluateInGlobalCallFrame):
      * debugger/DebuggerCallFrame.cpp:
      (JSC::DebuggerCallFrame::evaluate):
      * dfg/DFGAssemblyHelpers.h:
      (JSC::DFG::AssemblyHelpers::emitExceptionCheck):
      * dfg/DFGOperations.cpp:
      (JSC::DFG::operationPutByValInternal):
      * ftl/FTLLowerDFGToLLVM.cpp:
      (JSC::FTL::LowerDFGToLLVM::callCheck):
      * heap/Heap.cpp:
      (JSC::Heap::markRoots):
      * interpreter/CallFrame.h:
      (JSC::ExecState::clearException):
      (JSC::ExecState::exception):
      (JSC::ExecState::hadException):
      * interpreter/Interpreter.cpp:
      (JSC::eval):
      (JSC::loadVarargs):
      (JSC::stackTraceAsString):
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      * interpreter/Interpreter.h:
      (JSC::ClearExceptionScope::ClearExceptionScope):
      * jit/JITCode.cpp:
      (JSC::JITCode::execute):
      * jit/JITExceptions.cpp:
      (JSC::genericThrow):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::emit_op_catch):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTINativeCall):
      (JSC::JIT::emit_op_catch):
      * jit/JITStubs.cpp:
      (JSC::returnToThrowTrampoline):
      (JSC::throwExceptionFromOpCall):
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::jitCompileFor):
      (JSC::lazyLinkFor):
      (JSC::putByVal):
      (JSC::cti_vm_handle_exception):
      * jit/SlowPathCall.h:
      (JSC::JITSlowPathCall::call):
      * jit/ThunkGenerators.cpp:
      (JSC::nativeForGenerator):
      * jsc.cpp:
      (functionRun):
      (functionLoad):
      (functionCheckSyntax):
      * llint/LLIntExceptions.cpp:
      (JSC::LLInt::doThrow):
      (JSC::LLInt::returnToThrow):
      (JSC::LLInt::callToThrow):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * llint/LowLevelInterpreter.cpp:
      (JSC::CLoop::execute):
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/ArrayConstructor.cpp:
      (JSC::constructArrayWithSizeQuirk):
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.h:
      (JSC::CommonSlowPaths::opIn):
      * runtime/CommonSlowPathsExceptions.cpp:
      (JSC::CommonSlowPaths::interpreterThrowInCaller):
      * runtime/Completion.cpp:
      (JSC::evaluate):
      * runtime/Error.cpp:
      (JSC::addErrorInfo):
      (JSC::throwTypeError):
      (JSC::throwSyntaxError):
      * runtime/Error.h:
      (JSC::throwVMError):
      * runtime/ExceptionHelpers.cpp:
      (JSC::throwOutOfMemoryError):
      (JSC::throwStackOverflowError):
      (JSC::throwTerminatedExecutionException):
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::create):
      (JSC::FunctionExecutable::produceCodeBlockFor):
      * runtime/FunctionConstructor.cpp:
      (JSC::constructFunction):
      (JSC::constructFunctionSkippingEvalEnabledCheck):
      * runtime/JSArray.cpp:
      (JSC::JSArray::defineOwnProperty):
      (JSC::JSArray::put):
      (JSC::JSArray::push):
      * runtime/JSCJSValue.cpp:
      (JSC::JSValue::toObjectSlowCase):
      (JSC::JSValue::synthesizePrototype):
      (JSC::JSValue::putToPrimitive):
      * runtime/JSFunction.cpp:
      (JSC::JSFunction::defineOwnProperty):
      * runtime/JSGenericTypedArrayViewInlines.h:
      (JSC::::create):
      (JSC::::createUninitialized):
      (JSC::::validateRange):
      (JSC::::setWithSpecificType):
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::encode):
      (JSC::decode):
      (JSC::globalFuncProtoSetter):
      * runtime/JSNameScope.cpp:
      (JSC::JSNameScope::put):
      * runtime/JSONObject.cpp:
      (JSC::Stringifier::appendStringifiedValue):
      (JSC::Walker::walk):
      * runtime/JSObject.cpp:
      (JSC::JSObject::put):
      (JSC::JSObject::defaultValue):
      (JSC::JSObject::hasInstance):
      (JSC::JSObject::defaultHasInstance):
      (JSC::JSObject::defineOwnNonIndexProperty):
      (JSC::throwTypeError):
      * runtime/ObjectConstructor.cpp:
      (JSC::toPropertyDescriptor):
      * runtime/RegExpConstructor.cpp:
      (JSC::constructRegExp):
      * runtime/StringObject.cpp:
      (JSC::StringObject::defineOwnProperty):
      * runtime/StringRecursionChecker.cpp:
      (JSC::StringRecursionChecker::throwStackOverflowError):
      
      Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=119548
      Refactoring Exception throws.
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
      Reviewed by Geoffrey Garen.
      
      Gets column information from the error object for reporting exceptions.
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::reportException):
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::createScriptCallStackFromException):
      
      Moved setting an exception into the vm, These functions changed to use the new functionality.
      
      * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
      (WebCore::JSAudioBufferSourceNode::setBuffer):
      * bindings/js/JSBiquadFilterNodeCustom.cpp:
      (WebCore::JSBiquadFilterNode::setType):
      * bindings/js/JSCryptoCustom.cpp:
      (WebCore::JSCrypto::getRandomValues):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::setDOMException):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      (WebCore::JSInjectedScriptHost::setFunctionVariableValue):
      * bindings/js/JSJavaScriptCallFrameCustom.cpp:
      (WebCore::JSJavaScriptCallFrame::evaluate):
      (WebCore::JSJavaScriptCallFrame::setVariableValue):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore::JSNodeFilterCondition::acceptNode):
      * bindings/js/JSOscillatorNodeCustom.cpp:
      (WebCore::JSOscillatorNode::setType):
      * bindings/js/JSPannerNodeCustom.cpp:
      (WebCore::JSPannerNode::setPanningModel):
      (WebCore::JSPannerNode::setDistanceModel):
      * bindings/js/JSSVGLengthCustom.cpp:
      (WebCore::JSSVGLength::convertToSpecifiedUnits):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      (WebCore::getObjectParameter):
      (WebCore::JSWebGLRenderingContext::getAttachedShaders):
      (WebCore::JSWebGLRenderingContext::getExtension):
      (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
      (WebCore::JSWebGLRenderingContext::getParameter):
      (WebCore::JSWebGLRenderingContext::getProgramParameter):
      (WebCore::JSWebGLRenderingContext::getShaderParameter):
      (WebCore::JSWebGLRenderingContext::getUniform):
      (WebCore::dataFunctionf):
      (WebCore::dataFunctioni):
      (WebCore::dataFunctionMatrix):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::open):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::CloneBase::throwStackOverflow):
      (WebCore::CloneDeserializer::throwValidationError):
      (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::evaluate):
      (WebCore::WorkerScriptController::setException):
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
      (JSC::Bindings::CInstance::invokeMethod):
      (JSC::Bindings::CInstance::invokeDefaultMethod):
      (JSC::Bindings::CInstance::invokeConstruct):
      (JSC::Bindings::CInstance::toJSPrimitive):
      * bridge/objc/objc_instance.mm:
      (ObjcInstance::invokeMethod):
      * bridge/objc/objc_runtime.mm:
      (JSC::Bindings::ObjcArray::setValueAt):
      (JSC::Bindings::ObjcArray::valueAt):
      * bridge/objc/objc_utility.mm:
      (JSC::Bindings::throwError):
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtField::valueFromInstance):
      (JSC::Bindings::QtField::setValueToInstance):
      * bridge/runtime_array.cpp:
      (JSC::RuntimeArray::put):
      (JSC::RuntimeArray::putByIndex):
      * bridge/runtime_object.cpp:
      (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
      
      Source/WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=119548
      Refactoring Exception throws.
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
      Reviewed by Geoffrey Garen.
      
      Moved setting an exception into the vm, These functions changed to use the new functionality.
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
      * Plugins/Hosted/ProxyInstance.mm:
      (WebKit::ProxyInstance::invokeMethod):
      
      Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=119548
      Refactoring Exception throws.
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
      Reviewed by Geoffrey Garen.
      
      Moved setting an exception into the vm, These functions changed to use the new functionality.
      
      * WebProcess/Plugins/Netscape/JSNPObject.cpp:
      (WebKit::JSNPObject::callMethod):
      (WebKit::JSNPObject::callObject):
      (WebKit::JSNPObject::callConstructor):
      (WebKit::JSNPObject::throwInvalidAccessError):
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=119548
      Refactoring Exception throws.
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
      Reviewed by Geoffrey Garen.
      
      Column/line information was added into these results.
      * fast/events/window-onerror4-expected.txt:
      * fast/js/global-recursion-on-full-stack-expected.txt:
      
      fixed a variable name in a case when shouldThrowType failed.
      * fast/js/mozilla/resources/js-test-pre.js:
      (shouldThrowType):
      
      Sorted the properties to allow the results always show in the same order.
      * fast/js/script-tests/exception-properties.js:
      * fast/js/exception-properties-expected.txt:
      
      This test needed to be modified to have the line numbers match on the output across
      wk and wk2. This test is inherently flaky because is relies on size of the available
      native stack. To account for the flakiness an additional call was made to force the
      results to match.
      This patch now records and outputs the line number where the errors were occurring.
      This was causing the test results to no longer match because of the line numbers.
      By changing how to account for the flakiness, the results match again.
      * fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt:
      * fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f922f9b
    • ap@apple.com's avatar
      Remove an unused data member from Page. · 8c23e6ea
      ap@apple.com authored
              Rubber-stamped by Brady Eidson.
      
              * page/Page.cpp:
              * page/Page.h:
              Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c23e6ea
    • kov@webkit.org's avatar
      Unreviewed build fix - copy/paste failure, copied too much. · c6bf3fea
      kov@webkit.org authored
      * bindings/gobject/WebKitDOMCustom.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c6bf3fea
    • dino@apple.com's avatar
      [WebGL] CoreGraphics can provide greyscale image data · 24b242ea
      dino@apple.com authored
      https://webkit.org/b/120443
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      CoreGraphics can decode greyscale or greyscale+alpha images
      while preserving the format. Our WebGL texture unpacker
      was seeing this and assuming it meant the data did not come
      from an <img> element. Since that method already special cased
      CoreGraphics, the fix was to simply return true for these
      extra types.
      
      I also renamed srcFormatComeFromDOMElementOrImageData
      to srcFormatComesFromDOMElementOrImageData.
      
      Test: fast/canvas/webgl/tex-image-with-greyscale-image.html
      
      * platform/graphics/GraphicsContext3D.cpp: Call new name.
      * platform/graphics/GraphicsContext3D.h:
      (WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
      Add support for R8, AR8, A8, and RA8 data formats.
      
      LayoutTests:
      
      New test that attempts to load and draw an image that only has grey
      and alpha channels.
      
      * fast/canvas/webgl/resources/greyscale.png: Added.
      * fast/canvas/webgl/tex-image-with-greyscale-image-expected.txt: Added.
      * fast/canvas/webgl/tex-image-with-greyscale-image.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24b242ea
    • kov@webkit.org's avatar
      [GTK] Please incorporate German translation update · 0318cc27
      kov@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120016
      
      Patch by Christian Kirbach <Christian.Kirbach@googlemail.com> on 2013-08-28
      Reviewed by Gustavo Noronha.
      
      * de.po: updated.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0318cc27
    • bfulgham@apple.com's avatar
      [Windows] LayoutTests on Windows debug fails and exits early · d0c7ac34
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120438
      
      Reviewed by Tim Horton.
      
      Visual Studio mishandles char* containing utf8-content. Must manually
      escape non-ASCII characters so the byte stream is correct for localized
      string lookup.
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::cannotShowURLError): Replace unicode apostrophe
      character with utf8-byte equivalent.
      (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto.
      (WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d0c7ac34
    • kov@webkit.org's avatar
      [GTK] Enable maintainer mode configure switch · fe757073
      kov@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120424
      
      Reviewed by Martin Robinson.
      
      The maintainer mode feature is used by ostree and other automated builders to ensure no autotools
      regeneration will happen for a regular tarball build; ostree builders, for instance, are very
      conservative with toolchain upgrades, and are still using aclocal 1.12. WebKit's latest tarball
      (2.1.90) for some reason tries to regenerate build files, and the build fails because it can't find
      the version of aclocal that was used for generating the tarball (1.13).
      
      * configure.ac: enable maintainer mode feature.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe757073
    • kov@webkit.org's avatar
      [GTK] HTMLElement lost setID and getID - need to add compatibility symbols · 8ffd3535
      kov@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120440
      
      Reviewed by Martin Robinson.
      
      No tests, just adding compatibility symbols.
      
      setID and getID were removed, and the parent class (Element) ones should be used instead.
      We need to keep our ABI compatible, though, so add compatibility symbols.
      
      * bindings/gobject/WebKitDOMCustom.cpp:
      (webkit_dom_html_element_get_id):
      (webkit_dom_html_element_set_id):
      * bindings/gobject/WebKitDOMCustom.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ffd3535
    • simon.fraser@apple.com's avatar
      Fix compositing layers in columns · 560a8a50
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120436
      
      Source/WebCore:
      
      Reviewed by Dave Hyatt.
      
      Remove the old hack in RenderLayer::updateLayerPosition() for placing
      layers in columns, which changed the layer position for composited
      layers; this broke hit-testing.
      
      Fix a better way by moving compositing layers to the correct
      positions that take column offsets into account, by fixing
      RenderLayer::convertToLayerCoords() to optionally apply column
      adjustment, and using this in the code which positions compositing layers.
      
      Tests: compositing/columns/ancestor-clipped-in-paginated.html
             compositing/columns/clipped-in-paginated.html
             compositing/columns/composited-columns-vertical-rl.html
             compositing/columns/composited-columns.html
             compositing/columns/composited-in-paginated-rl.html
             compositing/columns/composited-in-paginated-writing-mode-rl.html
             compositing/columns/composited-lr-paginated-repaint.html
             compositing/columns/composited-rl-paginated-repaint.html
             compositing/columns/hittest-composited-in-paginated.html
             compositing/columns/rotated-in-paginated.html
             compositing/columns/untransformed-composited-in-paginated.html
      
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::updateLayerPosition):
      (WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
      (WebCore::accumulateOffsetTowardsAncestor):
      (WebCore::RenderLayer::convertToLayerCoords):
      * rendering/RenderLayer.h:
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::updateCompositedBounds):
      (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
      
      LayoutTests:
      
      Reviewed by Dave Hyatt.
      
      Various testcases for compositing in columns.
      
      * compositing/columns/ancestor-clipped-in-paginated-expected.txt: Added.
      * compositing/columns/ancestor-clipped-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      * compositing/columns/clipped-in-paginated-expected.txt: Added.
      * compositing/columns/clipped-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      * compositing/columns/composited-columns-expected.txt: Added.
      * compositing/columns/composited-columns-vertical-rl-expected.txt: Added.
      * compositing/columns/composited-columns-vertical-rl.html: Added.
      * compositing/columns/composited-columns.html: Added.
      * compositing/columns/composited-in-paginated-rl-expected.txt: Added.
      * compositing/columns/composited-in-paginated-rl.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      * compositing/columns/composited-in-paginated-writing-mode-rl-expected.txt: Added.
      * compositing/columns/composited-in-paginated-writing-mode-rl.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      * compositing/columns/composited-in-paginated.html:
      * compositing/columns/composited-lr-paginated-repaint-expected.txt: Added.
      * compositing/columns/composited-lr-paginated-repaint.html: Added.
      * compositing/columns/composited-nested-columns-expected.txt: Added.
      * compositing/columns/composited-nested-columns.html: Added.
      * compositing/columns/composited-rl-paginated-repaint-expected.txt: Added.
      * compositing/columns/composited-rl-paginated-repaint.html: Added.
      * compositing/columns/hittest-composited-in-paginated-expected.txt: Added.
      * compositing/columns/hittest-composited-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      * compositing/columns/rotated-in-paginated-expected.txt: Added.
      * compositing/columns/rotated-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      * compositing/columns/untransformed-composited-in-paginated-expected.txt: Added.
      * compositing/columns/untransformed-composited-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      560a8a50
    • bfulgham@apple.com's avatar
      [WinCairo] Unreviewed build fix. · a39dd5c6
      bfulgham@apple.com authored
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
      missing Cairo symbols; don't export CG symbols for Cairo build.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a39dd5c6
    • bfulgham@apple.com's avatar
      [WinCairo] Unreviewed build fix. · 425c3c4f
      bfulgham@apple.com authored
      * WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
      window from the build.
      * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      425c3c4f
    • benjamin@webkit.org's avatar
      Fix the build after r154780 · 1ef2655d
      benjamin@webkit.org authored
      * dom/SpaceSplitString.cpp:
      (WebCore::SpaceSplitStringData::create):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ef2655d
    • commit-queue@webkit.org's avatar
      [GTK] accessibility/menu-list-sends-change-notification.html has incorrect expected results · 99665e93
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120419
      
      Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-08-28
      Reviewed by Chris Fleizach.
      
      Tools:
      
      Added a notification for AXFocusedUIElementChanged.
      
      * DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
      (axObjectEventListener): Added a notification for AXFocusedUIElementChanged.
      
      LayoutTests:
      
      Updated the expected results according to the fix added to AccessibilityCallbacksAtk.cpp
      where a notification was added for AXFocusedUIElementChanged.
      
      * platform/gtk/accessibility/menu-list-sends-change-notification-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99665e93
    • benjamin@webkit.org's avatar
      Simplify and clean SpaceSplitString · 590e91cd
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120385
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-08-27
      Reviewed by Ryosuke Niwa.
      
      Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
      This brings the following:
      - Fix the coding style of the header.
      - Remove the concepts of empty and null. The list can now be empty or have something.
        There is no null state.
      - Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.
      
      * WebCore.exp.in:
      * dom/ElementData.h:
      (WebCore::ElementData::hasClass):
      * dom/SpaceSplitString.cpp:
      (WebCore::tokenizeSpaceSplitString):
      (WebCore::SpaceSplitStringData::containsAll):
      (WebCore::SpaceSplitString::set):
      (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
      (WebCore::TokenCounterProcessor::TokenCounterProcessor):
      (WebCore::TokenCounterProcessor::processToken):
      (WebCore::TokenCounterProcessor::tokenCount):
      (WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
      (WebCore::TokenInitializerProcessor::processToken):
      (WebCore::TokenInitializerProcessor::nextMemoryBucket):
      (WebCore::SpaceSplitStringData::create):
      (WebCore::SpaceSplitStringData::destroy):
      * dom/SpaceSplitString.h:
      (WebCore::SpaceSplitStringData::contains):
      (WebCore::SpaceSplitStringData::size):
      (WebCore::SpaceSplitStringData::operator[]):
      (WebCore::SpaceSplitStringData::ref):
      (WebCore::SpaceSplitStringData::deref):
      (WebCore::SpaceSplitStringData::SpaceSplitStringData):
      (WebCore::SpaceSplitStringData::~SpaceSplitStringData):
      (WebCore::SpaceSplitStringData::tokenArrayStart):
      (WebCore::SpaceSplitString::SpaceSplitString):
      (WebCore::SpaceSplitString::operator!=):
      (WebCore::SpaceSplitString::clear):
      (WebCore::SpaceSplitString::contains):
      (WebCore::SpaceSplitString::containsAll):
      (WebCore::SpaceSplitString::size):
      (WebCore::SpaceSplitString::isEmpty):
      (WebCore::SpaceSplitString::operator[]):
      (WebCore::SpaceSplitString::spaceSplitStringContainsValue):
      * html/ClassList.cpp:
      (WebCore::ClassList::classNames):
      * page/EventHandler.cpp:
      (WebCore::findDropZone):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      590e91cd
    • rwlbuis@webkit.org's avatar
      Namespace prefix is blindly followed when serializing · 941d8ef6
      rwlbuis@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=19121
      Serializer doesn't handling inconsistent prefixes properly
      https://bugs.webkit.org/show_bug.cgi?id=117764
      Attribute namespaces are serialized as if they were element ones
      https://bugs.webkit.org/show_bug.cgi?id=22958
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Add code to make sure unique prefixes and namespace declarations are generated.
      Unique prefix generation happens when:
      - the same prefix is used to map to different namespaces or
      - no prefix is given but the attribute is in a namespace.
      
      This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
      the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
      is used, doing the following for attributes:
      if the attribute has a namespace then
        if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
          try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
          else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
          else generate a unique prefix for the namespace
      
      To keep track of in-scope namespaces a prefix to namespace mapping is used.
      
      Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
             fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
             fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
             svg/custom/xlink-prefix-generation-in-attributes.html
      
      * editing/MarkupAccumulator.cpp:
      (WebCore::MarkupAccumulator::MarkupAccumulator):
      (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
      (WebCore::MarkupAccumulator::appendNamespace):
      (WebCore::MarkupAccumulator::generateUniquePrefix):
      (WebCore::MarkupAccumulator::appendAttribute):
      * editing/MarkupAccumulator.h:
      
      LayoutTests:
      
      Add tests to make sure unique prefixes and namespace declarations are generated for the
      case when the same prefix is used to map to different namespaces. All testcases are based
      on the testcases attached to the bugs.
      
      * fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts-expected.txt: Added.
      * fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html: Added.
      * fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict-expected.txt: Added.
      * fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html: Added.
      * fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix-expected.txt: Added.
      * fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html: Added.
      * svg/custom/xlink-prefix-generation-in-attributes-expected.txt: Added.
      * svg/custom/xlink-prefix-generation-in-attributes.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      941d8ef6
    • commit-queue@webkit.org's avatar
      AX: Cancel button in search field not accessible. · c55bc639
      commit-queue@webkit.org authored
      <https://webkit.org/b/120322>
      
      Source/WebCore:
      
      Expose the cancel button that shows in an input element of
      type search to accessibility.
      
      Patch by Sam White <samuel_white@apple.com> on 2013-08-28
      Reviewed by Chris Fleizach.
      
      Test: platform/mac/accessibility/search-field-cancel-button.html
      
      * CMakeLists.txt:
      * English.lproj/Localizable.strings:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AXObjectCache.cpp:
      (WebCore::createFromRenderer):
      * accessibility/AccessibilityAllInOne.cpp:
      * accessibility/AccessibilitySearchFieldButtons.cpp: Added.
      (WebCore::AccessibilitySearchFieldCancelButton::create):
      (WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
      (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
      (WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
      (WebCore::AccessibilitySearchFieldCancelButton::press):
      (WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
      * accessibility/AccessibilitySearchFieldButtons.h: Added.
      * dom/Element.h:
      (WebCore::Element::isSearchFieldCancelButtonElement):
      * html/shadow/TextControlInnerElements.h:
      * platform/LocalizedStrings.cpp:
      (WebCore::AXSearchFieldCancelButtonText):
      * platform/LocalizedStrings.h:
      * platform/efl/LocalizedStringsEfl.cpp:
      (WebCore::AXSearchFieldCancelButtonText):
      * platform/gtk/LocalizedStringsGtk.cpp:
      (WebCore::AXSearchFieldCancelButtonText):
      * platform/qt/LocalizedStringsQt.cpp:
      (WebCore::AXSearchFieldCancelButtonText):
      
      LayoutTests:
      
      Make sure the cancel button that shows in an input element of
      type search is accessible and actionable.
      
      Patch by Sam White <samuel_white@apple.com> on 2013-08-28
      Reviewed by Chris Fleizach.
      
      * platform/mac/accessibility/search-field-cancel-button-expected.txt: Added.
      * platform/mac/accessibility/search-field-cancel-button.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c55bc639
    • joepeck@webkit.org's avatar
      Web Inspector: Give reload icon an :active state and allow CSS to style some SVG images · 7d7dd06a
      joepeck@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120384
      
      Reviewed by Timothy Hatcher.
      
      The Reload icon is duplicated just to provide different fill colors.
      Convert from using <img> to an <svg> document for this image, and style
      it with CSS. This also makes it trivial to add an :active state.
      
      * UserInterface/ImageUtilities.js:
      (.invokeCallbackWithDocument):
      (.imageLoad):
      (.imageError):
      (wrappedSVGDocument):
      Helpers for downloading and in memory caching SVG images.
      
      * UserInterface/Images/Reload.svg:
      * UserInterface/Images/ReloadSelected.svg: Removed.
      Updated Reload image better matches the original design (slightly
      larger). And the duplicate image can be removed.
      
      * UserInterface/ResourceTreeElement.css:
      (.item.resource > .status > .reload-button):
      (.item.resource > .status > .reload-button > svg *):
      (.item.resource.selected > .status > .reload-button > svg *):
      (.item.resource.selected > .status > .reload-button:active > svg *):
      Different styles, including a new :active style.
      
      * UserInterface/ResourceTreeElement.js:
      (WebInspector.ResourceTreeElement.prototype._updateStatusWithMainFrameButtons):
      (WebInspector.ResourceTreeElement.prototype._updateStatus):
      Handle updating the main frame's state asynchronously since loading the SVG
      image document is asynchronous.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d7dd06a
    • roger_fong@apple.com's avatar
      Decrease number of workers used in NRWT by the Windows port. · a534a4d6
      roger_fong@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120435.
      
      Reviewed by Brent Fulgham.
      
      * Scripts/webkitpy/port/win.py:
      (WinPort.default_child_processes):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a534a4d6
    • eric.carlson@apple.com's avatar
      MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer · 97ae6a3c
      eric.carlson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120170
      
      Reviewed by Simon Fraser.
      
      No new tests, it is only possible to test in the debugger.
      
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here.
      (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer,
          otherwise call paint().
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      97ae6a3c
    • antti@apple.com's avatar
      Add child and descendant const iterators · 6005794d
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120430
      
      Reviewed by Andreas Kling
      
      This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.
              
      Some const_casts have been applied where constness breaks.
      
      * dom/ChildIterator.h:
      (WebCore::::ChildConstIterator):
      (WebCore::::operator):
      (WebCore::=):
      (WebCore::::ChildConstIteratorAdapter):
      (WebCore::::begin):
      (WebCore::::end):
      (WebCore::elementChildren):
      (WebCore::childrenOfType):
      * dom/DescendantIterator.h:
      (WebCore::::DescendantConstIterator):
      (WebCore::::operator):
      (WebCore::=):
      (WebCore::::DescendantConstIteratorAdapter):
      (WebCore::::begin):
      (WebCore::::end):
      (WebCore::elementDescendants):
      (WebCore::descendantsOfType):
      * dom/Node.cpp:
      (WebCore::Node::numberOfScopedHTMLStyleChildren):
      * html/HTMLFieldSetElement.cpp:
      (WebCore::HTMLFieldSetElement::legend):
      * html/HTMLFieldSetElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::finishParsingChildren):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::containsJavaApplet):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::title):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
      (WebCore::SVGSVGElement::checkIntersection):
      (WebCore::SVGSVGElement::checkEnclosure):
      (WebCore::SVGSVGElement::getElementById):
      * svg/SVGSVGElement.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6005794d
    • commit-queue@webkit.org's avatar
      AX:Null pointer may be dereferenced. · c715ad65
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120300
      
      Patch by Lukasz Gajowy <l.gajowy@samsung.com> on 2013-08-28
      Reviewed by Chris Fleizach.
      
      Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::getOrCreate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c715ad65
    • psolanki@apple.com's avatar
      Document::elementSheet() should return a reference · 8c60b801
      psolanki@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120433
      
      Reviewed by Andreas Kling.
      
      Since elementSheet() always retruns a valid pointer, we can simply return a reference
      instead. Also rename m_elemSheet to m_elementSheet.
      
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseInlineStyleDeclaration):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
      * dom/Document.cpp:
      (WebCore::Document::~Document):
      (WebCore::Document::recalcStyle):
      (WebCore::Document::updateBaseURL):
      (WebCore::Document::elementSheet):
      * dom/Document.h:
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::setInlineStyleFromString):
      (WebCore::StyledElement::setInlineStyleProperty):
      (WebCore::StyledElement::addSubresourceAttributeURLs):
      (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c60b801
    • rniwa@webkit.org's avatar
      REGRESSION(r154586): Past names map should only be used when named item is empty · ed8925fb
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120432
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Don't add the element from the past names map if we've found elements of the given name.
      
      Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html
      
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::getNamedElements):
      
      LayoutTests: 
      
      Add a regression test so that we never regress again.
      
      * fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty-expected.txt: Added.
      * fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed8925fb
    • bfulgham@apple.com's avatar
      [Windows] Provide useful error messages for WebKitErrorDomain errors · d81e4fcc
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120428
      
      Reviewed by Anders Carlsson.
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::cancelledError): Provide text for this error.
      (WebFrameLoaderClient::blockedError): Hook up WEB_UI_STRING for this error.
      (WebFrameLoaderClient::cannotShowURLError): Ditto
      (WebFrameLoaderClient::interruptedForPolicyChangeError): Ditto
      (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto
      (WebFrameLoaderClient::fileDoesNotExistError): Provide text for this error.
      (WebFrameLoaderClient::pluginWillHandleLoadError): Hook up WEB_UI_STRING for this error.
      (WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto.
      (WebFrameLoaderClient::createJavaAppletWidget): Ditto.
      (WebFrameLoaderClient::webHistory): Remove blank line above method.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d81e4fcc
    • andersca@apple.com's avatar
      Allow the Flash plug-in to open its preference pane · 424b90f6
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120431
      <rdar://problem/14857039>
      
      Reviewed by Andreas Kling.
      
      Forward the -[NSWorkspace openFile:] call to the UI process and allow opening
      the Flash preference pane (if Flash asks for it).
      
      * PluginProcess/PluginProcess.h:
      * PluginProcess/mac/PluginProcessMac.mm:
      (WebKit::replacedNSWorkspace_openFile):
      (WebKit::initializeCocoaOverrides):
      (WebKit::PluginProcess::openFile):
      * UIProcess/Plugins/PluginProcessProxy.h:
      * UIProcess/Plugins/PluginProcessProxy.messages.in:
      * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
      (WebKit::PluginProcessProxy::openURL):
      (WebKit::shouldOpenFile):
      (WebKit::PluginProcessProxy::openFile):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      424b90f6
    • rniwa@webkit.org's avatar
      Fix a typo in the test name. · 1bb1c51c
      rniwa@webkit.org authored
      * fast/forms/past-names-map-should-not-contain-disassociated-elements-expected.txt: Copied from LayoutTests/fast/forms/past-names-map-should-not-contained-disassociated-elements-expected.txt.
      * fast/forms/past-names-map-should-not-contain-disassociated-elements.html: Copied from LayoutTests/fast/forms/past-names-map-should-not-contained-disassociated-elements.html.
      * fast/forms/past-names-map-should-not-contained-disassociated-elements-expected.txt: Removed.
      * fast/forms/past-names-map-should-not-contained-disassociated-elements.html: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1bb1c51c
    • rniwa@webkit.org's avatar
      Don't keep unassociated elements in the past names map · 490739fa
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120328
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      Remove elements from the past names map of a form element when they are disassociated with the form to match
      the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
      in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html
      
      Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
      element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
      by another mechanism.
      
      Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
      in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
      not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
      FormAssociatedElement and HTMLImageElement.
      
      Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html
      
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * html/FormAssociatedElement.cpp:
      * html/FormAssociatedElement.h:
      (WebCore::toHTMLElement):
      
      * html/FormNamedItem.h: Added.
      (WebCore::FormNamedItem::~FormNamedItem):
      
      * html/HTMLElement.h:
      (WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
      HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.
      
      * html/HTMLFormControlElement.h:
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::removeFormElement):
      (WebCore::HTMLFormElement::removeImgElement):
      (WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
      from the past names map is either a form associated element or an image element; the condition guarantees
      that the item will be removed from the map before its element gets destructed.
      
      (WebCore::HTMLFormElement::elementFromPastNamesMap):
      (WebCore::HTMLFormElement::addToPastNamesMap):
      (WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
      Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
      is already O(n).
      
      (WebCore::HTMLFormElement::getNamedElements):
      
      * html/HTMLFormElement.h:
      * html/HTMLImageElement.h:
      * html/HTMLObjectElement.h:
      
      LayoutTests: 
      
      Add a regression test. Also Updated the tests to expect the new behavior in which elements are not accessible via
      their past names in a form element's name getter once they're disassociated with the form element.
      
      * fast/forms/form-image-access-by-name-expected.txt:
      * fast/forms/form-image-access-by-name.html:
      * fast/forms/old-names-expected.txt:
      * fast/forms/old-names.html:
      * fast/forms/past-names-map-should-not-contained-disassociated-elements-expected.txt: Added.
      * fast/forms/past-names-map-should-not-contained-disassociated-elements.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      490739fa
    • commit-queue@webkit.org's avatar
      Duplicate in-band tracks when switching <source> elements · fda751c7
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120369
      
      Patch by Brendan Long <b.long@cablelabs.com> on 2013-08-28
      Reviewed by Eric Carlson.
      
      Source/WebCore:
      
      Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::createMediaPlayer):
      Delete existing in-band tracks before creating a new media player.
      
      LayoutTests:
      
      * media/track/track-in-band-duplicate-tracks-when-source-changes.html: Added.
      * media/track/track-in-band-duplicate-tracks-when-source-changes-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fda751c7
    • bfulgham@apple.com's avatar
      [Windows] Loader is not properly determining supported MIME types · df5c03c8
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120383
      
      Reviewed by Eric Carlson.
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::canShowMIMEType): Modify to ask WebView if it can
      display the media type. Use new helper function to avoid converting a String
      to BSTR, only to immediatly be converted from BSTR back to String.
      (WebFrameLoaderClient::canShowMIMETypeAsHTML): Ditto.
      * WebView.cpp:
      (WebView::canShowMIMEType): Move logic to a new (similarly named) helper function.
      (WebView::canShowMIMETypeAsHTML): Ditto.
      * WebView.h: Add declaration for two new helper functions.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df5c03c8
    • bjonesbe@adobe.com's avatar
      Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines · edd1f691
      bjonesbe@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120378
      
      Reviewed by Darin Adler.
      
      Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
      naming of this adapter has caused much confusion in reading the code,
      as it wasn't apparent that calls to it were actually doing anything
      other than searching the interval tree. The new name is a much better
      description of what it actually does.
      
      Also, rename m_lowValue and m_highValue member variables to make it
      easier to read the code that uses them.
      
      Removed the inlines based on a change by eseidel in Blink.
      
      No new tests, no behavior change.
      
      * rendering/RenderBlock.cpp:
      (WebCore::::updateOffsetIfNeeded): Update for renames.
      (WebCore::::collectIfNeeded): Ditto.
      (WebCore::::getHeightRemaining): Ditto.
      (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
      (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
      (WebCore::RenderBlock::FloatingObject::maxX): Ditto.
      (WebCore::RenderBlock::FloatingObject::y): Ditto.
      (WebCore::RenderBlock::FloatingObject::maxY): Ditto.
      (WebCore::RenderBlock::FloatingObject::width): Ditto.
      (WebCore::RenderBlock::FloatingObject::height): Ditto.
      (WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
      (WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
      (WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      edd1f691
    • commit-queue@webkit.org's avatar
      [CSS Exclusions] Differentiate names in the simple rectangle test script · b51a271d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105208
      
      Patch by Niklas Nielsen <nnielsen@adobe.com> on 2013-08-28
      Reviewed by Alexandru Chiculita.
      
      Rename createRectangleTest and createRectangleTestResult to drawTestRectangle and drawExpectedRectangle respectively.
      
      * fast/shapes/resources/simple-rectangle.js:
      (drawTextRectangle):
      (drawExpectedRectangle):
      * fast/shapes/shape-inside/shape-inside-floats-simple-expected.html:
      * fast/shapes/shape-inside/shape-inside-floats-simple.html:
      * fast/shapes/shape-inside/shape-inside-multiple-blocks-dynamic-expected.html:
      * fast/shapes/shape-inside/shape-inside-multiple-blocks-dynamic.html:
      * fast/shapes/shape-inside/shape-inside-outside-shape-expected.html:
      * fast/shapes/shape-inside/shape-inside-outside-shape.html:
      * fast/shapes/shape-inside/shape-inside-recursive-layout-expected.html:
      * fast/shapes/shape-inside/shape-inside-recursive-layout.html:
      * fast/shapes/shape-inside/shape-inside-subsequent-blocks-expected.html:
      * fast/shapes/shape-inside/shape-inside-subsequent-blocks.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b51a271d
    • commit-queue@webkit.org's avatar
      [wk2] Resolve unused parameters in WebPlatformStrategies.cpp · fae86581
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120410
      
      Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-28
      Reviewed by Darin Adler.
      
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::getPluginInfo):
      (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fae86581
    • commit-queue@webkit.org's avatar
      [wk2] Resolve unused parameter warnings in the WebProcess.cpp · 56c88373
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120412
      
      Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-28
      Reviewed by Darin Adler.
      
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::startMemorySampler):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56c88373
    • commit-queue@webkit.org's avatar
      Resolve unused parameter warning in ScriptedAnimationController.cpp. · 6a6160f8
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120408
      
      Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-28
      Reviewed by Darin Adler.
      
      * dom/ScriptedAnimationController.cpp:
      (WebCore::ScriptedAnimationController::setThrottled):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a6160f8
    • sergio@webkit.org's avatar
      [CSS Grid Layout] Handle 'span' positions during layout · 6fa74132
      sergio@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=119756
      
      Reviewed by Andreas Kling.
      
      From Blink r149133 by <jchaffraix@chromium.org>
      
      Source/WebCore:
      
      Properly handle the 'span' keyword during layout. We only had
      parsing support so far but with this change we are able to
      recognize these positions and act accordingly.
      
      * rendering/RenderGrid.cpp:
      (WebCore::RenderGrid::resolveGridPositionsFromStyle):
      (WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition):
      * rendering/RenderGrid.h:
      * rendering/style/GridPosition.h:
      (WebCore::GridPosition::shouldBeResolvedAgainstOppositePosition):
      
      LayoutTests:
      
      Added some new test cases to verify that we properly resolve
      'span' positions.
      
      * fast/css-grid-layout/grid-item-negative-position-resolution-expected.txt:
      * fast/css-grid-layout/grid-item-negative-position-resolution.html:
      * fast/css-grid-layout/grid-item-spanning-resolution-expected.txt:
      * fast/css-grid-layout/grid-item-spanning-resolution.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6fa74132
    • zeno.albisser@digia.com's avatar
      [Qt] Option key combinations do not work in Input Elements. · 422085a8
      zeno.albisser@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120423
      
      Q_WS_MAC is obsolete. We should use Q_OS_MAC instead.
      This caused QTBUG-32388.
      
      Reviewed by Darin Adler.
      
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::handleKeyboardEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      422085a8
    • antti@apple.com's avatar
      Factor descendant iterator assertions into a class. · 1502213a
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120422
      
      Reviewed by Darin Adler.
      
      Share the assertions between ChildIterator and DescendantIterator. We can use it for future const iterators too.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/ChildIterator.h:
      (WebCore::::ChildIterator):
      (WebCore::::operator):
      (WebCore::=):
      * dom/DescendantIterator.h:
      (WebCore::::DescendantIterator):
      (WebCore::::operator):
      (WebCore::=):
      * dom/DescendantIteratorAssertions.h: Added.
      (WebCore::DescendantIteratorAssertions::DescendantIteratorAssertions):
      (WebCore::DescendantIteratorAssertions::domTreeHasMutated):
      (WebCore::DescendantIteratorAssertions::dropEventDispatchAssertion):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1502213a
    • darin@apple.com's avatar
      Eliminate Pasteboard::generalPasteboard · 5556e115
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120392
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      * WebCore.exp.in: Removed the generalPasteboard function.
      It didn't need to be exported, because no one was using it.
      
      * editing/Editor.cpp:
      (WebCore::Editor::paste): Added an overload that takes a Pasteboard.
      (WebCore::Editor::copyURL): Ditto.
      * editing/Editor.h: Added overloads.
      
      * editing/EditorCommand.cpp:
      (WebCore::executePasteGlobalSelection): Put this function inside the same
      platform #if that the global selection code in the Pasteboard class was in.
      Changed to use Pasteboard::createForGlobalSelection instead of using the
      Pasteboard::setSelectionMode approach.
      (WebCore::createCommandMap): Put PasteGlobalSelection inside the platform #if.
      
      * inspector/InjectedScriptHost.cpp:
      (WebCore::InjectedScriptHost::copyText): Use Pasteboard::createForCopyAndPaste()
      instead of Pasteboard::generalPasteboard().
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::InspectorFrontendHost::copyText): Ditto.
      
      * platform/Pasteboard.h: Removed generalPasteboard. Replaced isSelectionMode
      and setSelectionMode with createForGlobalSelection.
      
      * platform/blackberry/PasteboardBlackBerry.cpp: Deleted generalPasteboard.
      * platform/efl/PasteboardEfl.cpp: Deleted generalPasteboard.
      
      * platform/gtk/PasteboardGtk.cpp: Deleted selectionClipboard, primaryClipboard,
      generalPasteboard, isSelectionMode, and setSelectionMode.
      (WebCore::Pasteboard::createForGlobalSelection): Added.
      * platform/gtk/PasteboardHelper.cpp: Deleted m_usePrimarySelectionClipboard,
      getCurrentClipboard, and getClipboard.
      * platform/gtk/PasteboardHelper.h: Deleted the above, plus
      setUsePrimarySelectionClipboard and usePrimarySelectionClipboard.
      
      * platform/ios/PasteboardIOS.mm: Deleted generalPasteboard.
      * platform/mac/PasteboardMac.mm: Deleted generalPasteboard.
      
      * platform/qt/PasteboardQt.cpp: Deleted generalPasteboard, isSelectionMode,
      and setSelectionMode.
      (WebCore::Pasteboard::createForGlobalSelection): Added.
      
      * platform/win/PasteboardWin.cpp: Deleted generalPasteboard.
      
      Source/WebKit/qt:
      
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::respondToChangedSelection):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::triggerAction):
      Use createForGlobalSelection instead of generalPasteboard and setSelectionMode.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::updateGlobalSelection):
      Use createForGlobalSelection instead of generalPasteboard and setSelectionMode.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5556e115