1. 29 Aug, 2013 23 commits
    • mark.lam@apple.com's avatar
      Gardening: fixed broken non-DFG build. · be668e75
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120481.
      
      Not reviewed.
      
      * interpreter/StackIterator.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be668e75
    • robert@webkit.org's avatar
      Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width · 38663b36
      robert@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93735
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
      intrinsic height or width. This causes them to go down the wrong height and width computation
      path in RenderBox when they are absolute positioned.
      
      The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
      possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
      of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
      To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
      the helpers for returning their approximation of intrinsic height and width.
      
      The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
      intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
      The fix for this issue is captured in intrinsic-button-and-input-height.html.
      
      Tests: fast/replaced/intrinsic-button-and-input-height.html
             fast/replaced/width-and-height-of-positioned-replaced-elements.html
      
      * rendering/RenderBox.cpp:
      (WebCore::isReplacedElement):
      (WebCore::RenderBox::computePositionedLogicalWidth):
      (WebCore::RenderBox::computePositionedLogicalHeight):
      * rendering/RenderBox.h:
      (WebCore::RenderBox::intrinsicSize):
      * rendering/RenderButton.h:
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::RenderListBox):
      (WebCore::RenderListBox::computePreferredLogicalWidths):
      (WebCore::RenderListBox::computeLogicalHeight):
      * rendering/RenderListBox.h:
      * rendering/RenderMenuList.h:
      * rendering/RenderReplaced.h:
      * rendering/RenderSlider.cpp:
      (WebCore::RenderSlider::computePreferredLogicalWidths):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::RenderTextControl):
      (WebCore::RenderTextControl::computeLogicalHeight):
      * rendering/RenderTextControl.h:
      
      LayoutTests:
      
      * fast/replaced/intrinsic-button-and-input-height-expected.txt: Added.
      * fast/replaced/intrinsic-button-and-input-height.html: Added.
      * fast/replaced/width-and-height-of-positioned-replaced-elements.html: Added.
      * platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Added.
      * platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38663b36
    • bfulgham@apple.com's avatar
      [Windows] Unreviewed gardening. Add missing *.css files from project. · fdaac04c
      bfulgham@apple.com authored
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdaac04c
    • fpizlo@apple.com's avatar
      CodeBlock compilation and installation should be simplified and rationalized · 62b6af85
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120326
      
      Reviewed by Oliver Hunt.
              
      Rolling r154804 back in after fixing no-LLInt build.
              
      Previously Executable owned the code for generating JIT code; you always had
      to go through Executable. But often you also had to go through CodeBlock,
      because ScriptExecutable couldn't have virtual methods, but CodeBlock could.
      So you'd ask CodeBlock to do something, which would dispatch through a
      virtual method that would select the appropriate Executable subtype's method.
      This all meant that the same code would often be duplicated, because most of
      the work needed to compile something was identical regardless of code type.
      But then we tried to fix this, by having templatized helpers in
      ExecutionHarness.h and JITDriver.h. The result was that if you wanted to find
      out what happened when you asked for something to be compiled, you'd go on a
      wild ride that started with CodeBlock, touched upon Executable, and then
      ricocheted into either ExecutionHarness or JITDriver (likely both).
              
      Another awkwardness was that for concurrent compiles, the DFG::Worklist had
      super-special inside knowledge of what JITStubs.cpp's cti_optimize would have
      done once the compilation finished.
              
      Also, most of the DFG JIT drivers assumed that they couldn't install the
      JITCode into the CodeBlock directly - instead they would return it via a
      reference, which happened to be a reference to the JITCode pointer in
      Executable. This was super weird.
              
      Finally, there was no notion of compiling code into a special CodeBlock that
      wasn't used for handling calls into an Executable. I'd like this for FTL OSR
      entry.
              
      This patch solves these problems by reducing all of that complexity into just
      three primitives:
              
      - Executable::newCodeBlock(). This gives you a new code block, either for call
        or for construct, and either to serve as the baseline code or the optimized
        code. The new code block is then owned by the caller; Executable doesn't
        register it anywhere. The new code block has no JITCode and isn't callable,
        but it has all of the bytecode.
              
      - CodeBlock::prepareForExecution(). This takes the CodeBlock's bytecode and
        produces a JITCode, and then installs the JITCode into the CodeBlock. This
        method takes a JITType, and always compiles with that JIT. If you ask for
        JITCode::InterpreterThunk then you'll get JITCode that just points to the
        LLInt entrypoints. Once this returns, it is possible to call into the
        CodeBlock if you do so manually - but the Executable still won't know about
        it so JS calls to that Executable will still be routed to whatever CodeBlock
        is associated with the Executable.
              
      - Executable::installCode(). This takes a CodeBlock and makes it the code-for-
        entry for that Executable. This involves unlinking the Executable's last
        CodeBlock, if there was one. This also tells the GC about any effect on
        memory usage and does a bunch of weird data structure rewiring, since
        Executable caches some of CodeBlock's fields for the benefit of virtual call
        fast paths.
              
      This functionality is then wrapped around three convenience methods:
              
      - Executable::prepareForExecution(). If there is no code block for that
        Executable, then one is created (newCodeBlock()), compiled
        (CodeBlock::prepareForExecution()) and installed (installCode()).
              
      - CodeBlock::newReplacement(). Asks the Executable for a new CodeBlock that
        can serve as an optimized replacement of the current one.
              
      - CodeBlock::install(). Asks the Executable to install this code block.
              
      This patch allows me to kill *a lot* of code and to remove a lot of
      specializations for functions vs. not-functions, and a lot of places where we
      pass around JITCode references and such. ExecutionHarness and JITDriver are
      both gone. Overall this patch has more red than green.
              
      It also allows me to work on FTL OSR entry and tier-up:
              
      - FTL tier-up: this will involve DFGOperations.cpp asking the DFG::Worklist
        to do some compilation, but it will require the DFG::Worklist to do
        something different than what JITStubs.cpp would want, once the compilation
        finishes. This patch introduces a callback mechanism for that purpose.
              
      - FTL OSR entry: this will involve creating a special auto-jettisoned
        CodeBlock that is used only for FTL OSR entry. The new set of primitives
        allows for this: Executable can vend you a fresh new CodeBlock, and you can
        ask that CodeBlock to compile itself with any JIT of your choosing. Or you
        can take that CodeBlock and compile it yourself. Previously the act of
        producing a CodeBlock-for-optimization and the act of compiling code for it
        were tightly coupled; now you can separate them and you can create such
        auto-jettisoned CodeBlocks that are used for a one-shot OSR entry.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::unlinkIncomingCalls):
      (JSC::CodeBlock::prepareForExecutionImpl):
      (JSC::CodeBlock::prepareForExecution):
      (JSC::CodeBlock::prepareForExecutionAsynchronously):
      (JSC::CodeBlock::install):
      (JSC::CodeBlock::newReplacement):
      (JSC::FunctionCodeBlock::jettisonImpl):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::hasBaselineJITProfiling):
      * bytecode/DeferredCompilationCallback.cpp: Added.
      (JSC::DeferredCompilationCallback::DeferredCompilationCallback):
      (JSC::DeferredCompilationCallback::~DeferredCompilationCallback):
      * bytecode/DeferredCompilationCallback.h: Added.
      * dfg/DFGDriver.cpp:
      (JSC::DFG::tryCompile):
      * dfg/DFGDriver.h:
      (JSC::DFG::tryCompile):
      * dfg/DFGFailedFinalizer.cpp:
      (JSC::DFG::FailedFinalizer::finalize):
      (JSC::DFG::FailedFinalizer::finalizeFunction):
      * dfg/DFGFailedFinalizer.h:
      * dfg/DFGFinalizer.h:
      * dfg/DFGJITFinalizer.cpp:
      (JSC::DFG::JITFinalizer::finalize):
      (JSC::DFG::JITFinalizer::finalizeFunction):
      * dfg/DFGJITFinalizer.h:
      * dfg/DFGOSRExitPreparation.cpp:
      (JSC::DFG::prepareCodeOriginForOSRExit):
      * dfg/DFGOperations.cpp:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::Plan):
      (JSC::DFG::Plan::compileInThreadImpl):
      (JSC::DFG::Plan::notifyReady):
      (JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
      (JSC::DFG::Plan::finalizeAndNotifyCallback):
      * dfg/DFGPlan.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGWorklist.cpp:
      (JSC::DFG::Worklist::completeAllReadyPlansForVM):
      (JSC::DFG::Worklist::runThread):
      * ftl/FTLJITFinalizer.cpp:
      (JSC::FTL::JITFinalizer::finalize):
      (JSC::FTL::JITFinalizer::finalizeFunction):
      * ftl/FTLJITFinalizer.h:
      * heap/Heap.h:
      (JSC::Heap::isDeferred):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      * jit/JITDriver.h: Removed.
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::jitCompileFor):
      (JSC::lazyLinkFor):
      * jit/JITToDFGDeferredCompilationCallback.cpp: Added.
      (JSC::JITToDFGDeferredCompilationCallback::JITToDFGDeferredCompilationCallback):
      (JSC::JITToDFGDeferredCompilationCallback::~JITToDFGDeferredCompilationCallback):
      (JSC::JITToDFGDeferredCompilationCallback::create):
      (JSC::JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
      (JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
      * jit/JITToDFGDeferredCompilationCallback.h: Added.
      * llint/LLIntEntrypoints.cpp:
      (JSC::LLInt::setFunctionEntrypoint):
      (JSC::LLInt::setEvalEntrypoint):
      (JSC::LLInt::setProgramEntrypoint):
      * llint/LLIntEntrypoints.h:
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::jitCompileAndSetHeuristics):
      (JSC::LLInt::setUpCall):
      * runtime/ArrayPrototype.cpp:
      (JSC::isNumericCompareFunction):
      * runtime/CommonSlowPaths.cpp:
      * runtime/CompilationResult.cpp:
      (WTF::printInternal):
      * runtime/CompilationResult.h:
      * runtime/Executable.cpp:
      (JSC::ScriptExecutable::installCode):
      (JSC::ScriptExecutable::newCodeBlockFor):
      (JSC::ScriptExecutable::newReplacementCodeBlockFor):
      (JSC::ScriptExecutable::prepareForExecutionImpl):
      * runtime/Executable.h:
      (JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor):
      (JSC::ExecutableBase::offsetOfNumParametersFor):
      (JSC::ScriptExecutable::prepareForExecution):
      (JSC::FunctionExecutable::jettisonOptimizedCodeFor):
      * runtime/ExecutionHarness.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62b6af85
    • psolanki@apple.com's avatar
      SharedBuffer m_segments and m_dataArray must be exclusive · 262a9905
      psolanki@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=77715
      
      Patch by Pratik Solanki <pratik.solanki@gmail.com> on 2013-08-29
      Reviewed by Benjamin Poulain.
      
      When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
      data. We do not use m_segments. Since they are exclusive in practice, do not define or use
      m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.
      
      No new tests because no functional changes.
      
      * platform/SharedBuffer.cpp:
      (WebCore::SharedBuffer::append):
      (WebCore::SharedBuffer::clear):
      (WebCore::SharedBuffer::copy):
      (WebCore::SharedBuffer::buffer):
      (WebCore::SharedBuffer::getSomeData):
      * platform/SharedBuffer.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      262a9905
    • commit-queue@webkit.org's avatar
      Web Inspector: Consolidate inspector-protocol Debugger tests · 5b4714c6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120449
      
      Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-29
      Reviewed by Timothy Hatcher.
      
      Move the tests, and clean-up their syntax a bit to be more
      consistent, readable, and compact.
      
      * inspector-protocol/debugger/column-breakpoint.html:
      * inspector-protocol/debugger/pause-dedicated-worker-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt.
      * inspector-protocol/debugger/pause-dedicated-worker.html: Renamed from LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html.
      * inspector-protocol/debugger/resources/dedicated-worker.js: Renamed from LayoutTests/inspector-protocol/resources/dedicated-worker.js.
      * inspector-protocol/debugger/setVariableValue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-setVariableValue-expected.txt.
      * inspector-protocol/debugger/setVariableValue.html: Renamed from LayoutTests/inspector-protocol/debugger-setVariableValue.html.
      * inspector-protocol/debugger/terminate-dedicated-worker-while-paused-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-terminate-dedicated-worker-while-paused-expected.txt.
      * inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html: Renamed from LayoutTests/inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html.
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b4714c6
    • mark.lam@apple.com's avatar
      Change StackIterator to not require writes to the JS stack. · fd86164a
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119657.
      
      Reviewed by Geoffrey Garen.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * interpreter/CallFrame.h:
      - Removed references to StackIteratorPrivate.h.
      * interpreter/StackIterator.cpp:
      (JSC::StackIterator::numberOfFrames):
      (JSC::StackIterator::gotoFrameAtIndex):
      (JSC::StackIterator::gotoNextFrame):
      (JSC::StackIterator::resetIterator):
      (JSC::StackIterator::find):
      (JSC::StackIterator::readFrame):
      (JSC::StackIterator::readNonInlinedFrame):
      - Reads in the current CallFrame's data for non-inlined frames.
      (JSC::inlinedFrameOffset):
      - Convenience function to compute the inlined frame offset based on the
        CodeOrigin. If the offset is 0, then we're looking at the physical frame.
        Otherwise, it's an inlined frame.
      (JSC::StackIterator::readInlinedFrame):
      - Determines the inlined frame's caller frame. Will read in the caller
        frame if it is also an inlined frame i.e. we haven't reached the
        outer most frame yet. Otherwise, will call readNonInlinedFrame() to
        read on the outer most frame.
        This is based on the old StackIterator::Frame::logicalFrame().
      (JSC::StackIterator::updateFrame):
      - Reads the data of the caller frame of the current one. This function
        is renamed and moved from the old StackIterator::Frame::logicalCallerFrame(),
        but is now simplified because it delegates to the readInlinedFrame()
        to get the caller for inlined frames.
      (JSC::StackIterator::Frame::arguments):
      - Fixed to use the inlined frame versions of Arguments::create() and
        Arguments::tearOff() when the frame is an inlined frame.
      (JSC::StackIterator::Frame::print):
      (debugPrintCallFrame):
      (debugPrintStack):
      - Because sometimes, we want to see the whole stack while debugging.
      * interpreter/StackIterator.h:
      (JSC::StackIterator::Frame::argumentCount):
      (JSC::StackIterator::Frame::callerFrame):
      (JSC::StackIterator::Frame::callee):
      (JSC::StackIterator::Frame::scope):
      (JSC::StackIterator::Frame::codeBlock):
      (JSC::StackIterator::Frame::bytecodeOffset):
      (JSC::StackIterator::Frame::inlinedFrameInfo):
      (JSC::StackIterator::Frame::isJSFrame):
      (JSC::StackIterator::Frame::isInlinedFrame):
      (JSC::StackIterator::Frame::callFrame):
      (JSC::StackIterator::Frame::Frame):
      (JSC::StackIterator::Frame::~Frame):
      - StackIterator::Frame now caches commonly used accessed values from
        the CallFrame. It still delegates argument queries to the CallFrame.
      (JSC::StackIterator::operator*):
      (JSC::StackIterator::operator->):
      (JSC::StackIterator::operator!=):
      (JSC::StackIterator::operator++):
      (JSC::StackIterator::end):
      (JSC::StackIterator::operator==):
      * interpreter/StackIteratorPrivate.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd86164a
    • dbates@webkit.org's avatar
      [iOS] Upstream changes to WebCore/style · 619fc75d
      dbates@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120173
      
      Reviewed by Darin Adler.
      
      * style/StyleResolveTree.cpp:
      (WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
      (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
      (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
      (WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      619fc75d
    • a.renevier@samsung.com's avatar
      [cairo] canvas drawing on itself doesn't work with accelerated canvas · 242efe66
      a.renevier@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=118808
      
      Reviewed by Martin Robinson.
      
      Source/WebCore:
      
      When copying an accelerated image, we try to get its dimensions with
      cairo_image_surface_get_width/cairo_image_surface_get_height. As
      surface is not an image, this returns width and height of 0.
      
      Many other places use cairo_image_surface_get although the surface may
      be a gl surface.
      
      This patch fixes those issues by implementing a cairoSurfaceSize
      helper that returns the surface size whatever type it is.
      
      It use cairo_surface_create_similar instead of
      cairo_image_surface_create in copyCairoImageSurface. It also calls
      cairo_paint in encodeImage when a drawing over a black background is
      needed.
      
      It copies the surface to an image surface if needed in extractImage.
      
      No new tests. Covered by existing tests.
      
      * platform/graphics/cairo/BitmapImageCairo.cpp:
      (WebCore::BitmapImage::BitmapImage):
      (WebCore::BitmapImage::draw):
      (WebCore::BitmapImage::checkForSolidColor):
      * platform/graphics/cairo/CairoUtilities.cpp:
      (WebCore::copyCairoImageSurface):
      (WebCore::cairoSurfaceSize):
      * platform/graphics/cairo/CairoUtilities.h:
      * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
      (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
      * platform/graphics/gtk/GdkCairoUtilities.cpp:
      (cairoSurfaceToGdkPixbuf):
      * platform/graphics/gtk/GdkCairoUtilities.h:
      * platform/graphics/gtk/ImageBufferGtk.cpp:
      (WebCore::encodeImage):
      * platform/graphics/gtk/ImageGtk.cpp:
      (WebCore::BitmapImage::getGdkPixbuf):
      * platform/gtk/DragIcon.cpp:
      (WebCore::DragIcon::setImage):
      
      Source/WebKit/gtk:
      
      Change cairoImageSurfaceToGdkPixbuf to cairoSurfaceToGdkPixbuf.
      
      * webkit/webkitfavicondatabase.cpp:
      (getIconPixbufSynchronously):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      242efe66
    • commit-queue@webkit.org's avatar
      [GTK] [WK2] TestWebKitWebView page-visibility fails · c8d15608
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120406
      
      Patch by Brian Holt <brian.holt@samsung.com> on 2013-08-29
      Reviewed by Gustavo Noronha Silva.
      
      Removed the webkit prefix for document visibility properties.
      
      * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
      (testWebViewPageVisibility):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c8d15608
    • commit-queue@webkit.org's avatar
      Source/JavaScriptCore: VM::throwException() crashes reproducibly in testapi with !ENABLE(JIT) · 31da4579
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120472
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-29
      Reviewed by Filip Pizlo.
      
      With the JIT disabled, interpreterThrowInCaller was attempting to throw an error,
      but the topCallFrame was not set yet. By passing the error object into interpreterThrowInCaller
      throwException can be called when topCallFrame is set.
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * runtime/CommonSlowPaths.cpp:
      (JSC::SLOW_PATH_DECL):
      * runtime/CommonSlowPathsExceptions.cpp:
      (JSC::CommonSlowPaths::interpreterThrowInCaller):
      * runtime/CommonSlowPathsExceptions.h:
      
      Renamed genericThrow -> genericUnwind, because this function no longer has the ability
      to throw errors. It unwinds the stack in order to report them.
      * dfg/DFGOperations.cpp:
      * jit/JITExceptions.cpp:
      (JSC::genericUnwind):
      (JSC::jitThrowNew):
      (JSC::jitThrow):
      * jit/JITExceptions.h:
      * llint/LLIntExceptions.cpp:
      (JSC::LLInt::doThrow):
      
      LayoutTests: VM::throwException() crashes reproducibly in testapi with !ENABLE(JIT)
      https://bugs.webkit.org/show_bug.cgi?id=120472
      
      Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-29
      Reviewed by Filip Pizlo.
      An error that was not being reported before is now caught and being reported.
      * media/track/track-cue-rendering-on-resize-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31da4579
    • bfulgham@apple.com's avatar
      [Windows] Unreviewed build fix after r154809 · 4de95fca
      bfulgham@apple.com authored
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove two no-longer-existing
      export symbols.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4de95fca
    • simon.pena@samsung.com's avatar
      Follow-up to r154810 and r154810: Missing tests and fix one misplaced call to setCaptionDisplayMode · 629fcfd5
      simon.pena@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120474
      
      Reviewed by Eric Carlson.
      
      I previously used a regular expression that didn't catch all the tests needing this
      update. Additionally, in one of them I put the setCaptionDisplayMode in the wrong place,
      before the function was defined by video-test.js. This new patch addresses all of that.
      
      * media/track/media-element-enqueue-event-crash.html:
      * media/track/regions-webvtt/text-track-cue-region-attribute.html:
      * media/track/regions-webvtt/text-track-region-parser.html:
      * media/track/track-add-remove-cue.html:
      * media/track/track-cue-mutable-fragment.html:
      * media/track/track-cue-mutable-text.html:
      * media/track/track-cue-mutable.html:
      * media/track/track-cue-negative-timestamp.html:
      * media/track/track-cue-rendering-on-resize.html:
      * media/track/track-cues-cuechange.html:
      * media/track/track-cues-enter-exit.html:
      * media/track/track-cues-missed.html:
      * media/track/track-cues-pause-on-exit.html:
      * media/track/track-cues-seeking.html:
      * media/track/track-cues-sorted-before-dispatch.html:
      * media/track/track-default-attribute.html:
      * media/track/track-load-from-element-readyState.html:
      * media/track/track-mode-disabled-crash.html:
      * media/track/track-remove-quickly.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      629fcfd5
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r154804. · ea1f9022
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/154804
      https://bugs.webkit.org/show_bug.cgi?id=120477
      
      Broke Windows build (assumes LLInt features not enabled on
      this build) (Requested by bfulgham on #webkit).
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::linkIncomingCall):
      (JSC::CodeBlock::unlinkIncomingCalls):
      (JSC::CodeBlock::reoptimize):
      (JSC::ProgramCodeBlock::replacement):
      (JSC::EvalCodeBlock::replacement):
      (JSC::FunctionCodeBlock::replacement):
      (JSC::ProgramCodeBlock::compileOptimized):
      (JSC::ProgramCodeBlock::replaceWithDeferredOptimizedCode):
      (JSC::EvalCodeBlock::compileOptimized):
      (JSC::EvalCodeBlock::replaceWithDeferredOptimizedCode):
      (JSC::FunctionCodeBlock::compileOptimized):
      (JSC::FunctionCodeBlock::replaceWithDeferredOptimizedCode):
      (JSC::ProgramCodeBlock::jitCompileImpl):
      (JSC::EvalCodeBlock::jitCompileImpl):
      (JSC::FunctionCodeBlock::jitCompileImpl):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::jitType):
      (JSC::CodeBlock::jitCompile):
      * bytecode/DeferredCompilationCallback.cpp: Removed.
      * bytecode/DeferredCompilationCallback.h: Removed.
      * dfg/DFGDriver.cpp:
      (JSC::DFG::compile):
      (JSC::DFG::tryCompile):
      (JSC::DFG::tryCompileFunction):
      (JSC::DFG::tryFinalizePlan):
      * dfg/DFGDriver.h:
      (JSC::DFG::tryCompile):
      (JSC::DFG::tryCompileFunction):
      (JSC::DFG::tryFinalizePlan):
      * dfg/DFGFailedFinalizer.cpp:
      (JSC::DFG::FailedFinalizer::finalize):
      (JSC::DFG::FailedFinalizer::finalizeFunction):
      * dfg/DFGFailedFinalizer.h:
      * dfg/DFGFinalizer.h:
      * dfg/DFGJITFinalizer.cpp:
      (JSC::DFG::JITFinalizer::finalize):
      (JSC::DFG::JITFinalizer::finalizeFunction):
      * dfg/DFGJITFinalizer.h:
      * dfg/DFGOSRExitPreparation.cpp:
      (JSC::DFG::prepareCodeOriginForOSRExit):
      * dfg/DFGOperations.cpp:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::Plan):
      (JSC::DFG::Plan::compileInThreadImpl):
      (JSC::DFG::Plan::finalize):
      * dfg/DFGPlan.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGWorklist.cpp:
      (JSC::DFG::Worklist::completeAllReadyPlansForVM):
      (JSC::DFG::Worklist::runThread):
      * ftl/FTLJITFinalizer.cpp:
      (JSC::FTL::JITFinalizer::finalize):
      (JSC::FTL::JITFinalizer::finalizeFunction):
      * ftl/FTLJITFinalizer.h:
      * heap/Heap.h:
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      * jit/JITDriver.h: Added.
      (JSC::jitCompileIfAppropriateImpl):
      (JSC::jitCompileFunctionIfAppropriateImpl):
      (JSC::jitCompileIfAppropriate):
      (JSC::jitCompileFunctionIfAppropriate):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::jitCompileFor):
      (JSC::lazyLinkFor):
      * jit/JITToDFGDeferredCompilationCallback.cpp: Removed.
      * jit/JITToDFGDeferredCompilationCallback.h: Removed.
      * llint/LLIntEntrypoints.cpp:
      (JSC::LLInt::getFunctionEntrypoint):
      (JSC::LLInt::getEvalEntrypoint):
      (JSC::LLInt::getProgramEntrypoint):
      * llint/LLIntEntrypoints.h:
      (JSC::LLInt::getEntrypoint):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::jitCompileAndSetHeuristics):
      (JSC::LLInt::setUpCall):
      * runtime/ArrayPrototype.cpp:
      (JSC::isNumericCompareFunction):
      * runtime/CommonSlowPaths.cpp:
      * runtime/CompilationResult.cpp:
      (WTF::printInternal):
      * runtime/CompilationResult.h:
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compileOptimized):
      (JSC::EvalExecutable::jitCompile):
      (JSC::EvalExecutable::compileInternal):
      (JSC::EvalExecutable::replaceWithDeferredOptimizedCode):
      (JSC::ProgramExecutable::compileOptimized):
      (JSC::ProgramExecutable::jitCompile):
      (JSC::ProgramExecutable::compileInternal):
      (JSC::ProgramExecutable::replaceWithDeferredOptimizedCode):
      (JSC::FunctionExecutable::compileOptimizedForCall):
      (JSC::FunctionExecutable::compileOptimizedForConstruct):
      (JSC::FunctionExecutable::jitCompileForCall):
      (JSC::FunctionExecutable::jitCompileForConstruct):
      (JSC::FunctionExecutable::produceCodeBlockFor):
      (JSC::FunctionExecutable::compileForCallInternal):
      (JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeForCall):
      (JSC::FunctionExecutable::compileForConstructInternal):
      (JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeForConstruct):
      * runtime/Executable.h:
      (JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor):
      (JSC::ExecutableBase::offsetOfNumParametersFor):
      (JSC::ExecutableBase::catchRoutineFor):
      (JSC::EvalExecutable::compile):
      (JSC::ProgramExecutable::compile):
      (JSC::FunctionExecutable::compileForCall):
      (JSC::FunctionExecutable::compileForConstruct):
      (JSC::FunctionExecutable::compileFor):
      (JSC::FunctionExecutable::compileOptimizedFor):
      (JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeFor):
      (JSC::FunctionExecutable::jitCompileFor):
      * runtime/ExecutionHarness.h: Added.
      (JSC::prepareForExecutionImpl):
      (JSC::prepareFunctionForExecutionImpl):
      (JSC::installOptimizedCode):
      (JSC::prepareForExecution):
      (JSC::prepareFunctionForExecution):
      (JSC::replaceWithDeferredOptimizedCode):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ea1f9022
    • ossy@webkit.org's avatar
      Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms. · 82dd0838
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120461
      
      Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-29
      Reviewed by Csaba Osztrogonác.
      
      moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
      block (and only once), so it should be guarded too.
      
      * style/StyleResolveTree.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82dd0838
    • ddkilzer@apple.com's avatar
      BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS · 3afffe65
      ddkilzer@apple.com authored
      See: AX: Cancel button in search field not accessible.
      <https://webkit.org/b/120322>
      
      Fixes the following build error:
      
          In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
          Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
              return AXSearchFieldCancelButtonText();
                     ^
          1 error generated.
      
      * accessibility/AccessibilitySearchFieldButtons.cpp:
      (WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
      Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3afffe65
    • simon.pena@samsung.com's avatar
      [GTK] Unreviewed gardening. Rebaselining after r154479 and r154702 · 93b070cd
      simon.pena@samsung.com authored
      * platform/gtk/editing/deleting/delete-br-004-expected.txt: Rebaseline after r154479.
      * platform/gtk/editing/deleting/delete-br-005-expected.txt: Ditto.
      * platform/gtk/editing/deleting/delete-br-006-expected.txt: Ditto.
      * platform/gtk/editing/selection/5057506-2-expected.txt: Rebaseline after r154702.
      * platform/gtk/editing/selection/5057506-expected.txt: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      93b070cd
    • simon.pena@samsung.com's avatar
      Add setCaptionDisplayMode('Automatic') to remaining tests with track 'default'... · efc0ee2d
      simon.pena@samsung.com authored
      Add setCaptionDisplayMode('Automatic') to remaining tests with track 'default' attribute after r154527
      https://bugs.webkit.org/show_bug.cgi?id=120471
      
      Reviewed by Eric Carlson.
      
      As done in r154527, some LayoutTests with track 'default' attribute
      need the caption mode set to automatic.
      
      * media/track/track-css-all-cues.html:
      * media/track/track-css-cue-lifetime.html:
      * media/track/track-css-matching-default.html:
      * media/track/track-css-matching-lang.html:
      * media/track/track-css-matching-timestamps.html:
      * media/track/track-css-matching.html:
      * media/track/track-css-property-whitelist.html:
      * media/track/track-css-user-override.html:
      * media/track/track-cue-container-rendering-position.html:
      * media/track/track-cue-nothing-to-render.html:
      * media/track/track-cue-rendering-on-resize.html:
      * media/track/track-cue-rendering-rtl.html:
      * media/track/track-cue-rendering-snap-to-lines-not-set.html:
      * media/track/track-cue-rendering-with-padding.html:
      * media/track/track-cue-rendering.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efc0ee2d
    • antti@apple.com's avatar
      Remove NodeRenderingContext · 395cd888
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120466
      
      Reviewed by Andreas Kling.
      
      Switch the few remaining clients of this class to call the underlying code directly.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::State::initForStyleResolve):
      * dom/DOMAllInOne.cpp:
      * dom/Node.cpp:
      * dom/Node.h:
              
          Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
      
      * dom/NodeRenderingContext.cpp: Removed.
      * dom/NodeRenderingContext.h: Removed.
      * dom/ShadowRoot.h:
      * dom/Text.cpp:
      * dom/Text.h:
      * dom/TreeScope.cpp:
      * dom/TreeScope.h:
                  
          Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
      
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::detailsElement):
      * style/StyleResolveTree.cpp:
      (WebCore::Style::createTextRendererIfNeeded):
              
          For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
          This difference is probably not testable in current trunk.
      
      (WebCore::Style::resolveTree):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      395cd888
    • g.czajkowski@samsung.com's avatar
      [GTK] Skip grammar checking tests. · 8e2ce0d1
      g.czajkowski@samsung.com authored
      Unreviewed gardening after r154675.
      
      
      * platform/gtk/TestExpectations:
      Skip failing tests after r154675 until GTK+ implements
      grammar checking feature.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e2ce0d1
    • berto@igalia.com's avatar
      [GTK] Update apt dependency list · 33fa3d09
      berto@igalia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120399
      
      Reviewed by Philippe Normand.
      
      Remove bogus package gail-3.0, add xfonts-utils (needed by
      xorg-xserver) and switch to the latest versions of libtiff and
      libjpeg.
      
      * gtk/install-dependencies:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33fa3d09
    • antti@apple.com's avatar
      Move element renderer creation out of NodeRenderingContext · b6157e02
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120461
      
      Reviewed by Andreas Kling.
      
      Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.
              
      Tighten typing and constness. Refactor sligthly to be more understandable.
      
      * dom/Element.cpp:
      (WebCore::Element::shouldMoveToFlowThread):
      * dom/Element.h:
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRenderingContext::NodeRenderingContext):
      (WebCore::NodeRenderingContext::nextRenderer):
      (WebCore::NodeRenderingContext::previousRenderer):
      (WebCore::NodeRenderingContext::parentRenderer):
      * dom/NodeRenderingContext.h:
      * dom/PseudoElement.h:
      * style/StyleResolveTree.cpp:
      (WebCore::Style::nextSiblingRenderer):
      (WebCore::Style::shouldCreateRenderer):
      (WebCore::Style::elementInsideRegionNeedsRenderer):
      (WebCore::Style::moveToFlowThreadIfNeeded):
      (WebCore::Style::createRendererIfNeeded):
      (WebCore::Style::attachRenderTree):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::shouldMoveToFlowThread):
      * svg/SVGElement.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6157e02
    • ap@apple.com's avatar
      [WK2][Mac] WebKitTestRunner doesn't force system appearance · 6df83014
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120437
      
      Reviewed by Darin Adler.
      
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
      (WTR::InjectedBundle::platformInitialize): Set AppleAquaColorVariant,
      AppleHighlightColor and AppleOtherHighlightColor to the same values that DRT uses.
      Fixed formatting.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6df83014
  2. 28 Aug, 2013 17 commits
    • fpizlo@apple.com's avatar
      CodeBlock compilation and installation should be simplified and rationalized · 4ea262e2
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120326
      
      Reviewed by Oliver Hunt.
              
      Previously Executable owned the code for generating JIT code; you always had
      to go through Executable. But often you also had to go through CodeBlock,
      because ScriptExecutable couldn't have virtual methods, but CodeBlock could.
      So you'd ask CodeBlock to do something, which would dispatch through a
      virtual method that would select the appropriate Executable subtype's method.
      This all meant that the same code would often be duplicated, because most of
      the work needed to compile something was identical regardless of code type.
      But then we tried to fix this, by having templatized helpers in
      ExecutionHarness.h and JITDriver.h. The result was that if you wanted to find
      out what happened when you asked for something to be compiled, you'd go on a
      wild ride that started with CodeBlock, touched upon Executable, and then
      ricocheted into either ExecutionHarness or JITDriver (likely both).
              
      Another awkwardness was that for concurrent compiles, the DFG::Worklist had
      super-special inside knowledge of what JITStubs.cpp's cti_optimize would have
      done once the compilation finished.
              
      Also, most of the DFG JIT drivers assumed that they couldn't install the
      JITCode into the CodeBlock directly - instead they would return it via a
      reference, which happened to be a reference to the JITCode pointer in
      Executable. This was super weird.
              
      Finally, there was no notion of compiling code into a special CodeBlock that
      wasn't used for handling calls into an Executable. I'd like this for FTL OSR
      entry.
              
      This patch solves these problems by reducing all of that complexity into just
      three primitives:
              
      - Executable::newCodeBlock(). This gives you a new code block, either for call
        or for construct, and either to serve as the baseline code or the optimized
        code. The new code block is then owned by the caller; Executable doesn't
        register it anywhere. The new code block has no JITCode and isn't callable,
        but it has all of the bytecode.
              
      - CodeBlock::prepareForExecution(). This takes the CodeBlock's bytecode and
        produces a JITCode, and then installs the JITCode into the CodeBlock. This
        method takes a JITType, and always compiles with that JIT. If you ask for
        JITCode::InterpreterThunk then you'll get JITCode that just points to the
        LLInt entrypoints. Once this returns, it is possible to call into the
        CodeBlock if you do so manually - but the Executable still won't know about
        it so JS calls to that Executable will still be routed to whatever CodeBlock
        is associated with the Executable.
              
      - Executable::installCode(). This takes a CodeBlock and makes it the code-for-
        entry for that Executable. This involves unlinking the Executable's last
        CodeBlock, if there was one. This also tells the GC about any effect on
        memory usage and does a bunch of weird data structure rewiring, since
        Executable caches some of CodeBlock's fields for the benefit of virtual call
        fast paths.
              
      This functionality is then wrapped around three convenience methods:
              
      - Executable::prepareForExecution(). If there is no code block for that
        Executable, then one is created (newCodeBlock()), compiled
        (CodeBlock::prepareForExecution()) and installed (installCode()).
              
      - CodeBlock::newReplacement(). Asks the Executable for a new CodeBlock that
        can serve as an optimized replacement of the current one.
              
      - CodeBlock::install(). Asks the Executable to install this code block.
              
      This patch allows me to kill *a lot* of code and to remove a lot of
      specializations for functions vs. not-functions, and a lot of places where we
      pass around JITCode references and such. ExecutionHarness and JITDriver are
      both gone. Overall this patch has more red than green.
              
      It also allows me to work on FTL OSR entry and tier-up:
              
      - FTL tier-up: this will involve DFGOperations.cpp asking the DFG::Worklist
        to do some compilation, but it will require the DFG::Worklist to do
        something different than what JITStubs.cpp would want, once the compilation
        finishes. This patch introduces a callback mechanism for that purpose.
              
      - FTL OSR entry: this will involve creating a special auto-jettisoned
        CodeBlock that is used only for FTL OSR entry. The new set of primitives
        allows for this: Executable can vend you a fresh new CodeBlock, and you can
        ask that CodeBlock to compile itself with any JIT of your choosing. Or you
        can take that CodeBlock and compile it yourself. Previously the act of
        producing a CodeBlock-for-optimization and the act of compiling code for it
        were tightly coupled; now you can separate them and you can create such
        auto-jettisoned CodeBlocks that are used for a one-shot OSR entry.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::prepareForExecution):
      (JSC::CodeBlock::install):
      (JSC::CodeBlock::newReplacement):
      (JSC::FunctionCodeBlock::jettisonImpl):
      (JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::hasBaselineJITProfiling):
      * bytecode/DeferredCompilationCallback.cpp: Added.
      (JSC::DeferredCompilationCallback::DeferredCompilationCallback):
      (JSC::DeferredCompilationCallback::~DeferredCompilationCallback):
      * bytecode/DeferredCompilationCallback.h: Added.
      * dfg/DFGDriver.cpp:
      (JSC::DFG::tryCompile):
      * dfg/DFGDriver.h:
      (JSC::DFG::tryCompile):
      * dfg/DFGFailedFinalizer.cpp:
      (JSC::DFG::FailedFinalizer::finalize):
      (JSC::DFG::FailedFinalizer::finalizeFunction):
      * dfg/DFGFailedFinalizer.h:
      * dfg/DFGFinalizer.h:
      * dfg/DFGJITFinalizer.cpp:
      (JSC::DFG::JITFinalizer::finalize):
      (JSC::DFG::JITFinalizer::finalizeFunction):
      * dfg/DFGJITFinalizer.h:
      * dfg/DFGOSRExitPreparation.cpp:
      (JSC::DFG::prepareCodeOriginForOSRExit):
      * dfg/DFGOperations.cpp:
      * dfg/DFGPlan.cpp:
      (JSC::DFG::Plan::Plan):
      (JSC::DFG::Plan::compileInThreadImpl):
      (JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
      (JSC::DFG::Plan::finalizeAndNotifyCallback):
      * dfg/DFGPlan.h:
      * dfg/DFGWorklist.cpp:
      (JSC::DFG::Worklist::completeAllReadyPlansForVM):
      * ftl/FTLJITFinalizer.cpp:
      (JSC::FTL::JITFinalizer::finalize):
      (JSC::FTL::JITFinalizer::finalizeFunction):
      * ftl/FTLJITFinalizer.h:
      * heap/Heap.h:
      (JSC::Heap::isDeferred):
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::execute):
      (JSC::Interpreter::executeCall):
      (JSC::Interpreter::executeConstruct):
      (JSC::Interpreter::prepareForRepeatCall):
      * jit/JITDriver.h: Removed.
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::jitCompileFor):
      (JSC::lazyLinkFor):
      * jit/JITToDFGDeferredCompilationCallback.cpp: Added.
      (JSC::JITToDFGDeferredCompilationCallback::JITToDFGDeferredCompilationCallback):
      (JSC::JITToDFGDeferredCompilationCallback::~JITToDFGDeferredCompilationCallback):
      (JSC::JITToDFGDeferredCompilationCallback::create):
      (JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
      * jit/JITToDFGDeferredCompilationCallback.h: Added.
      * llint/LLIntEntrypoints.cpp:
      (JSC::LLInt::setFunctionEntrypoint):
      (JSC::LLInt::setEvalEntrypoint):
      (JSC::LLInt::setProgramEntrypoint):
      * llint/LLIntEntrypoints.h:
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::jitCompileAndSetHeuristics):
      (JSC::LLInt::setUpCall):
      * runtime/ArrayPrototype.cpp:
      (JSC::isNumericCompareFunction):
      * runtime/CommonSlowPaths.cpp:
      * runtime/CompilationResult.cpp:
      (WTF::printInternal):
      * runtime/CompilationResult.h:
      * runtime/Executable.cpp:
      (JSC::ScriptExecutable::installCode):
      (JSC::ScriptExecutable::newCodeBlockFor):
      (JSC::ScriptExecutable::newReplacementCodeBlockFor):
      (JSC::ScriptExecutable::prepareForExecutionImpl):
      * runtime/Executable.h:
      (JSC::ScriptExecutable::prepareForExecution):
      (JSC::FunctionExecutable::jettisonOptimizedCodeFor):
      * runtime/ExecutionHarness.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ea262e2
    • rniwa@webkit.org's avatar
      <https://webkit.org/b/119806> [Mac] Add a way to easily test attributed string generation · cb1d0344
      rniwa@webkit.org authored
      Reviewed by Darin Adler.
      
      Tools: 
      
      Add textInputController.legacyAttributedString to retrieve the attributed string for copy & paste.
      
      We can't use textInputController.attributedSubstringFromRange as it uses WebHTMLConverter's static
      editingAttributedStringFromRange function, which doesn't implement the full converter at the moment.
      
      Also NSMutableAttributedString.ranges and WebNSRange so that JavaScript can get a list of all
      ranges in a given attributed string.
      
      * DumpRenderTree/mac/TextInputController.m:
      (-[WebNSRange initWithNSRange:]):
      (-[WebNSRange location]):
      (-[WebNSRange length]):
      (+[WebNSRange isSelectorExcludedFromWebScript:]):
      (+[NSMutableAttributedString isSelectorExcludedFromWebScript:]):
      (+[NSMutableAttributedString webScriptNameForSelector:]):
      (-[NSMutableAttributedString ranges]): Added.
      (+[TextInputController isSelectorExcludedFromWebScript:]):
      (+[TextInputController webScriptNameForSelector:]):
      (-[TextInputController legacyAttributedString:]):
      
      LayoutTests: 
      
      Add basic tests for textInputController.legacyAttributedString.
      
      * platform/mac-wk2/TestExpectations:
      * platform/mac/editing/attributed-string: Added.
      * platform/mac/editing/attributed-string/anchor-element-expected.txt: Added.
      * platform/mac/editing/attributed-string/anchor-element.html: Added.
      * platform/mac/editing/attributed-string/basic-expected.txt: Added.
      * platform/mac/editing/attributed-string/basic.html: Added.
      * platform/mac/editing/attributed-string/font-size-expected.txt: Added.
      * platform/mac/editing/attributed-string/font-size.html: Added.
      * platform/mac/editing/attributed-string/font-style-variant-effect-expected.txt: Added.
      * platform/mac/editing/attributed-string/font-style-variant-effect.html: Added.
      * platform/mac/editing/attributed-string/font-weight-expected.txt: Added.
      * platform/mac/editing/attributed-string/font-weight.html: Added.
      * platform/mac/editing/attributed-string/letter-spacing-expected.txt: Added.
      * platform/mac/editing/attributed-string/letter-spacing.html: Added.
      * platform/mac/editing/attributed-string/resources: Added.
      * platform/mac/editing/attributed-string/resources/dump-attributed-string.js: Added.
      (.):
      * platform/mac/editing/attributed-string/text-decorations-expected.txt: Added.
      * platform/mac/editing/attributed-string/text-decorations.html: Added.
      * platform/mac/editing/attributed-string/vertical-align-expected.txt: Added.
      * platform/mac/editing/attributed-string/vertical-align.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb1d0344
    • cfleizach@apple.com's avatar
      AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27 · 41a32f0d
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120434
      
      Reviewed by Darin Adler.
      
      Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
      happen in Document was null.
      
      Unfortunately, there are no reproducible steps and no other information to construct a test case.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::rootObject):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      41a32f0d
    • rniwa@webkit.org's avatar
      The code to look for an ancestor form element is duplicated in three different places · f7bf3768
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120391
      
      Reviewed by Darin Adler.
      
      Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.
      
      * WebCore.order:
      * html/FormAssociatedElement.cpp:
      (WebCore::FormAssociatedElement::findAssociatedForm):
      (WebCore::FormAssociatedElement::formAttributeChanged):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::virtualForm):
      * html/HTMLElement.h:
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::HTMLFormControlElement):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::findClosestFormAncestor):
      * html/HTMLFormElement.h:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::insertedInto):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::HTMLObjectElement):
      * html/parser/HTMLTreeBuilder.cpp:
      (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f7bf3768
    • rniwa@webkit.org's avatar
      Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters · 00a46b95
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120446
      
      Reviewed by Alexey Proskuryakov.
      
      Merge https://chromium.googlesource.com/chromium/blink/+/c8188c21452501b68950a9fcc1f5cbc7b4de4df5
      
      Unlike 'responseText' and 'responseXML', 'responseBlob' and
      'responseArrayBuffer' are not exposed to JavaScript (they don't
      appear in the IDL or in the specification). As they are only called from
      custom bindings in response to a JavaScript call to the 'response' getter,
      we can safely replace the exception-throwing code in the implementation
      with an ASSERT that the request type is correct.
      
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::response):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::responseBlob):
      (WebCore::XMLHttpRequest::responseArrayBuffer):
      * xml/XMLHttpRequest.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00a46b95
    • 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