2008-12-12  Beth Dakin  <bdakin@apple.com>

        Rubber Stamped by Steve Falkenburg.

        Build fix.

        * platform/KURL.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Stephanie Lewis  <slewis@apple.com>

        Reviewed by Geoff Garen.

        Shrink Cache Sizes.

        * WebView/WebView.mm:
        (+[WebView _setCacheModel:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Dave Moore  <davemoore@google.com>

        Reviewed by Eric Seidel.

        Fixed https://bugs.webkit.org/show_bug.cgi?id=22798

        In Font::drawTextUsingSVGFont() a variable of type SVGTextRunWalkerDrawTextData
        is created on the stack (called data). One of its fields, charsConsumed, is
        unitialized, leading to random values after calling walk() on the
        SVGTextRunWalker created with it. I now initialize the variable

        This bug was revealed in our Purify run. I don't know of any specific incorrect
        behavior caused by it but it would lead to the charsConsumed field having a
        a wrong value.

        * svg/SVGFont.cpp:
        (WebCore::Font::drawTextUsingSVGFont):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Move slow-cases of JIT code generation over to the MacroAssembler interface.

        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::Label::Label):
        (JSC::MacroAssembler::jae32):
        (JSC::MacroAssembler::jg32):
        (JSC::MacroAssembler::jzPtr):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompile):
        (JSC::JIT::emitGetVariableObjectRegister):
        (JSC::JIT::emitPutVariableObjectRegister):
        * jit/JIT.h:
        (JSC::SlowCaseEntry::SlowCaseEntry):
        (JSC::JIT::getSlowCase):
        (JSC::JIT::linkSlowCase):
        * jit/JITArithmetic.cpp:
        (JSC::JIT::compileBinaryArithOpSlowCase):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
        (JSC::JIT::linkSlowCaseIfNotJSCell):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compilePutByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::compilePutByIdSlowCase):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Darin Adler  <darin@apple.com>

        Rubber stamped by Adam Roben.

        - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
          login sheet after clicking static text, due to AppKit key loop change

        * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
        * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
        * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
        * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
        Set nextKeyView of the selectable static texts to the editable text.
        Updated nib format.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Oliver Hunt.

        Bug 22835: Crash during bytecode generation when comparing to null
        <https://bugs.webkit.org/show_bug.cgi?id=22835>
        <rdar://problem/6286749>

        Change the special cases in bytecode generation for comparison to null
        to use tempDestination().

        JavaScriptCore:

        * parser/Nodes.cpp:
        (JSC::BinaryOpNode::emitBytecode):
        (JSC::EqualNode::emitBytecode):

        LayoutTests:

        * fast/js/ignored-result-null-comparison-crash-expected.txt: Added.
        * fast/js/ignored-result-null-comparison-crash.html: Added.
        * fast/js/resources/ignored-result-null-comparison-crash.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Dean Jackson  <dino@apple.com>

        Reviewed by Darin Adler.

        Expose WebKitAnimationEvent, WebKitTransitionEvent,
        WebKitCSSTransformValue, WebKitCSSKeyframeRule and
        WebKitCSSKeyframesRule to Window object.
        This required generating constructors for the event
        interfaces.

        https://bugs.webkit.org/show_bug.cgi?id=20560

        WebCore:
            * dom/WebKitAnimationEvent.idl:
            * dom/WebKitTransitionEvent.idl:
            * page/DOMWindow.idl:

        LayoutTests:
            * animations/keyframes-rule-expected.txt:
            * animations/keyframes-rule.html:
            * fast/dom/Window/window-properties-expected.txt:
            * fast/events/event-instanceof-expected.txt:
            * fast/events/resources/event-instanceof.js:
            * fast/js/global-constructors-expected.txt:
            * transforms/transform-value-types-expected.txt:
            * transforms/transform-value-types.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Sam Weinig  <sam@webkit.org>

        Reviewed by Cameron Zwarich.

        <rdar://problem/6428342> Look into feasibility of discarding bytecode after native codegen

        Move more JIT functionality to using offsets into the Instruction buffer
        instead of raw pointers. Two to go!

        * interpreter/Interpreter.cpp:
        (JSC::bytecodeOffsetForPC): Rename from vPCForPC.
        (JSC::Interpreter::resolve): Pass offset to exception helper.
        (JSC::Interpreter::resolveSkip): Ditto.
        (JSC::Interpreter::resolveGlobal): Ditto.
        (JSC::Interpreter::resolveBaseAndProperty): Ditto.
        (JSC::Interpreter::resolveBaseAndFunc): Ditto.
        (JSC::isNotObject): Ditto.
        (JSC::Interpreter::unwindCallFrame): Call bytecodeOffsetForPC.
        (JSC::Interpreter::throwException): Use offsets instead of vPCs.
        (JSC::Interpreter::privateExecute): Pass offset to exception helper.
        (JSC::Interpreter::retrieveLastCaller): Ditto.
        (JSC::Interpreter::cti_op_instanceof): Ditto.
        (JSC::Interpreter::cti_op_call_NotJSFunction): Ditto.
        (JSC::Interpreter::cti_op_resolve): Pass offset to exception helper.
        (JSC::Interpreter::cti_op_construct_NotJSConstruct): Ditto.
        (JSC::Interpreter::cti_op_resolve_func): Ditto.
        (JSC::Interpreter::cti_op_resolve_skip): Ditto.
        (JSC::Interpreter::cti_op_resolve_global): Ditto.
        (JSC::Interpreter::cti_op_resolve_with_base): Ditto.
        (JSC::Interpreter::cti_op_throw): Ditto.
        (JSC::Interpreter::cti_op_in): Ditto.
        (JSC::Interpreter::cti_vm_throw): Ditto.
        * interpreter/Interpreter.h:

        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass): Don't pass unnecessary vPC to stub.
        * jit/JIT.h: Remove ARG_instr1 - ARG_instr3 and ARG_instr5 - ARG_instr6.
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallEvalSetupArgs): Don't pass unnecessary vPC to stub..
        (JSC::JIT::compileOpConstructSetupArgs): Ditto.

        * runtime/ExceptionHelpers.cpp:
        (JSC::createUndefinedVariableError): Take an offset instead of vPC.
        (JSC::createInvalidParamError): Ditto.
        (JSC::createNotAConstructorError): Ditto.
        (JSC::createNotAFunctionError): Ditto.
        (JSC::createNotAnObjectError): Ditto.
        * runtime/ExceptionHelpers.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Remove loop counter 'i' from the JIT generation passes, replace with a member m_bytecodeIndex.

        No impact on performance.

        * jit/JIT.cpp:
        (JSC::JIT::compileOpStrictEq):
        (JSC::JIT::emitSlowScriptCheck):
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompile):
        * jit/JIT.h:
        (JSC::CallRecord::CallRecord):
        (JSC::JmpTable::JmpTable):
        (JSC::JIT::emitCTICall):
        * jit/JITArithmetic.cpp:
        (JSC::JIT::compileBinaryArithOp):
        (JSC::JIT::compileBinaryArithOpSlowCase):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitGetVirtualRegister):
        (JSC::JIT::emitGetVirtualRegisters):
        (JSC::JIT::emitNakedCall):
        (JSC::JIT::emitCTICall_internal):
        (JSC::JIT::emitJumpSlowCaseIfJSCell):
        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
        (JSC::JIT::emitJumpSlowCaseIfNotImmNum):
        (JSC::JIT::emitJumpSlowCaseIfNotImmNums):
        (JSC::JIT::emitFastArithIntToImmOrSlowCase):
        (JSC::JIT::addSlowCase):
        (JSC::JIT::addJump):
        (JSC::JIT::emitJumpSlowToHot):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::compilePutByIdHotPath):
        (JSC::JIT::compilePutByIdSlowCase):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Gavin Barraclough  <barraclough@apple.com>

        Fix windows builds.

        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompile):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Camron Zwarich.

        Replace emitPutCallArg methods with emitPutJITStubArg methods.  Primarily to make the argument numbering
        more sensible (1-based incrementing by 1, rather than 0-based incrementing by 4).  The CTI name also seems
        to be being deprecated from the code generally.

        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JIT.h:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::compileBinaryArithOp):
        (JSC::JIT::compileBinaryArithOpSlowCase):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallSetupArgs):
        (JSC::JIT::compileOpCallEvalSetupArgs):
        (JSC::JIT::compileOpConstructSetupArgs):
        (JSC::JIT::compileOpCall):
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitPutJITStubArg):
        (JSC::JIT::emitPutJITStubArgConstant):
        (JSC::JIT::emitGetJITStubArg):
        (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compilePutByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::compilePutByIdSlowCase):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Update Windows cache sizes to match recent Mac change.
        
        Reviewed by Stephanie Lewis, Sam Weinig.

        * WebView.cpp:
        (WebView::setCacheModel):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore:

2008-12-12  Brent Fulgham  <bfulgham@gmail.com>

        Reviewed by Oliver Hunt.

        Fixes: https://bugs.webkit.org/show_bug.cgi?id=22805

        Provides implementation of image dragging logic for Windows Cairo
        back-end.

        * platform/win/DragImageCGWin.cpp:
        (WebCore::deallocContext): Add a generic CGContextRef destructor.
        * platform/win/DragImageCairoWin.cpp:
        (WebCore::deallocContext): Add a generic cairo_* destructor. 
        (WebCore::allocImage):  New implementation to allocate a Cairo
        surface of a specified size.
        (WebCore::createCairoContextFromBitmap): New implementation to
        create a Cairo surface from a Windows BITMAP.
        (WebCore::scaleDragImage): Replace stub with implementation to
        actually create a scaled image.
        (WebCore::createDragImageFromImage): Replace stub with implementation
        to actually create an image.

WebKit/win:

2008-12-12  Brent Fulgham  <bfulgham@gmail.com>

        Reviewed by Oliver Hunt.

        Fixes: https://bugs.webkit.org/show_bug.cgi?id=22805

        Provides implementation of image drag for Windows Cairo back-end.
        Switch to generic PlatformGraphicsContext data type, rather than
        specific use of CoreGraphics types.

        * WebCoreSupport/WebDragClient.cpp:
        (WebDragClient::createDragImageForLink): Revise calls to use more
        generic PlatformGraphicsContext data types and calls for better
        portability.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-12  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Sam Weinig.

        Fix the failures of the following layout tests, which regressed in
        r39255:

        fast/dom/StyleSheet/ownerNode-lifetime-2.html
        fast/xsl/transform-xhr-doc.xhtml

        The binary search in CodeBlock::getByIdExceptionInfoForBytecodeOffset()
        doesn't guarantee that it actually finds a match, so add an explicit check
        for this.

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
wx build fix.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed by Kevin Ollivier.

Expose findString in wxWebView as FindString.

https://bugs.webkit.org/show_bug.cgi?id=22458


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/gtk
2008-12-13  Zan Dobersek  <zandobersek@gmail.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=22039

        Implement animation and transition pausing as needed by DumpRenderTree.

        * webkit/webkitprivate.h:
        * webkit/webkitwebframe.cpp:

WebKitTools
2008-12-13  Zan Dobersek  <zandobersek@gmail.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=22039

        Implement animation and transition pausing.

        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
        (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
        (LayoutTestController::pauseTransitionAtTimeOnElementWithId):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-13  Adam Bergkvist <adam.bergkvist@ericsson.com>

        Reviewed by Holger Freyther.

        https://bugs.webkit.org/show_bug.cgi?id=22779

        Check for GTK version >= 2.14.0 before using gtk_test_init.

        * tests/main.c:
        (main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-12-13  Dirk Schulze  <krit@webkit.org>

        Reviewed by Darin Adler.

        WebCore:

        Fixes behavior of gradients on empty path in canvas/Cg

        https://bugs.webkit.org/show_bug.cgi?id=22844
        [Cg] Canvas fill() draws gradients even without a path

        Test: fast/canvas/canvas-gradient-without-path.html

        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::fill):
        (WebCore::CanvasRenderingContext2D::stroke):

        LayoutTest:

        Checks behavior of gradients on an empty path in canvas.

        * fast/canvas/canvas-gradient-without-path-expected.txt: Added.
        * fast/canvas/canvas-gradient-without-path.html: Added.
        * fast/canvas/resources/canvas-gradient-without-path.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change ENABLE(FONT_FAST_PATH) to USE(FONT_FAST_PATH) and
revert pixel test results back to the state as before r39254.

https://bugs.webkit.org/show_bug.cgi?id=22824

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39277 268f45cc-cd09-0410-ab3c-d52691b4dbfc