WebCore:

        Reviewed by Dave Kilzer.

        - fix https://bugs.webkit.org/show_bug.cgi?id=25602
          REGRESSION: fast/overflow/overflow-focus-ring.html seems double-drawn
          on ToT

        Test: fast/layers/self-painting-outline.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer): Paint the layer's own outline only
        if it is a self-painting layer.

LayoutTests:

        Reviewed by Dave Kilzer.

        - new test and correct results for https://bugs.webkit.org/show_bug.cgi?id=25602
          REGRESSION: fast/overflow/overflow-focus-ring.html seems double-drawn
          on ToT

        * fast/layers/self-painting-outline.html: Added.
        * platform/mac/fast/overflow/overflow-focus-ring-expected.checksum: Updated.
        * platform/mac/fast/overflow/overflow-focus-ring-expected.png: Updated.
        * platform/mac/fast/layers/self-painting-outline-expected.checksum: Added.
        * platform/mac/fast/layers/self-painting-outline-expected.png: Added.
        * platform/mac/fast/layers/self-painting-outline-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Dan Bernstein.

        Match newer XMLHttpRequest draft and make withCredential setter raise an exception when
        called at a wrong time.

        No test, because we are waiting for a newer version of system frameworks to test the attribute.

        * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setWithCredentials):
        * xml/XMLHttpRequest.h:
        * xml/XMLHttpRequest.idl:
        Raise INVALID_STATE_ERR if the state is not OPENED, or if the send() flag is true.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Dan Bernstein.

        <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page

        Use credentials from WebCore storage when downloading.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Geoff Garen.

        "Class const *" is the same as "const Class*", use the latter syntax consistently.

        See <http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.9>.

        * pcre/pcre_compile.cpp:
        (calculateCompiledPatternLength):
        * runtime/JSObject.h:
        (JSC::JSObject::offsetForLocation):
        (JSC::JSObject::locationForOffset):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Dan Bernstein.

        <rdar://problem/6867598> REGRESSION (r42483): Have to enter credentials twice when trying
        to view protected MobileMe video

        Add a temporary workaround.

        * platform/network/ResourceHandleInternal.h:
        (WebCore::ResourceHandleInternal::ResourceHandleInternal):
        Added an m_useSiteSpecificQuirks boolean (Mac-only). A Frame pointer is only available when
        starting a request, so we need to store this data for later use.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::start): Initialize m_useSiteSpecificQuirks.
        (WebCore::ResourceHandle::receivedCredential): Use per-session credentials with gallery.me.com.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-10  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Geoffrey Garen.

        https://bugs.webkit.org/show_bug.cgi?id=25670
        Remove no longer valid chunk of code from dtoa.

        * wtf/dtoa.cpp:
        (WTF::dtoa): Removed invalid code.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-10  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        Bug 25674: syntax tree nodes should use arena allocation
        Part one: Change lifetimes so we won't have to use reference
        counting so much, but don't eliminate the reference counts
        entirely yet.

        * JavaScriptCore.exp: Updated.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::BytecodeGenerator): Update for use of raw pointers
        instead of RefPtr.
        (JSC::BytecodeGenerator::emitCall): Ditto.
        (JSC::BytecodeGenerator::emitConstruct): Ditto.

        * parser/Grammar.y: Update node creating code to use new (JSGlobalData*)
        instead of the plain new. At the moment this is just a hook for future
        arena allocation; it's inline and JSGlobalData* is not used.

        * parser/NodeConstructors.h: Updated for name change of parserObjects to
        parserArena. Also added explicit initialization for raw pointers that used
        to be RefPtr. Also removed some uses of get() that aren't needed now that
        the pointers are raw pointers. Also eliminated m_parameter from FuncExprNode
        and FuncDeclNode. Also changed node-creating code to use new (JSGlobalData*)
        as above.

        * parser/Nodes.cpp: Eliminated NodeReleaser and all use of it.
        (JSC::ParserRefCounted::ParserRefCounted): Updated for name change of
        parserObjects to parserArena.
        (JSC::SourceElements::append): Use raw pointers.
        (JSC::ArrayNode::emitBytecode): Ditto.
        (JSC::ArrayNode::isSimpleArray): Ditto.
        (JSC::ArrayNode::toArgumentList): Ditto.
        (JSC::ObjectLiteralNode::emitBytecode): Ditto.
        (JSC::PropertyListNode::emitBytecode): Ditto.
        (JSC::BracketAccessorNode::emitBytecode): Ditto.
        (JSC::DotAccessorNode::emitBytecode): Ditto.
        (JSC::ArgumentListNode::emitBytecode): Ditto.
        (JSC::NewExprNode::emitBytecode): Ditto.
        (JSC::EvalFunctionCallNode::emitBytecode): Ditto.
        (JSC::FunctionCallValueNode::emitBytecode): Ditto.
        (JSC::FunctionCallResolveNode::emitBytecode): Ditto.
        (JSC::FunctionCallBracketNode::emitBytecode): Ditto.
        (JSC::FunctionCallDotNode::emitBytecode): Ditto.
        (JSC::CallFunctionCallDotNode::emitBytecode): Ditto.
        (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto.
        (JSC::PostfixBracketNode::emitBytecode): Ditto.
        (JSC::PostfixDotNode::emitBytecode): Ditto.
        (JSC::DeleteBracketNode::emitBytecode): Ditto.
        (JSC::DeleteDotNode::emitBytecode): Ditto.
        (JSC::DeleteValueNode::emitBytecode): Ditto.
        (JSC::VoidNode::emitBytecode): Ditto.
        (JSC::TypeOfValueNode::emitBytecode): Ditto.
        (JSC::PrefixBracketNode::emitBytecode): Ditto.
        (JSC::PrefixDotNode::emitBytecode): Ditto.
        (JSC::UnaryOpNode::emitBytecode): Ditto.
        (JSC::BinaryOpNode::emitStrcat): Ditto.
        (JSC::BinaryOpNode::emitBytecode): Ditto.
        (JSC::EqualNode::emitBytecode): Ditto.
        (JSC::StrictEqualNode::emitBytecode): Ditto.
        (JSC::ReverseBinaryOpNode::emitBytecode): Ditto.
        (JSC::ThrowableBinaryOpNode::emitBytecode): Ditto.
        (JSC::InstanceOfNode::emitBytecode): Ditto.
        (JSC::LogicalOpNode::emitBytecode): Ditto.
        (JSC::ConditionalNode::emitBytecode): Ditto.
        (JSC::ReadModifyResolveNode::emitBytecode): Ditto.
        (JSC::AssignResolveNode::emitBytecode): Ditto.
        (JSC::AssignDotNode::emitBytecode): Ditto.
        (JSC::ReadModifyDotNode::emitBytecode): Ditto.
        (JSC::AssignBracketNode::emitBytecode): Ditto.
        (JSC::ReadModifyBracketNode::emitBytecode): Ditto.
        (JSC::CommaNode::emitBytecode): Ditto.
        (JSC::ConstDeclNode::emitCodeSingle): Ditto.
        (JSC::ConstDeclNode::emitBytecode): Ditto.
        (JSC::ConstStatementNode::emitBytecode): Ditto.
        (JSC::statementListEmitCode): Ditto.
        (JSC::BlockNode::emitBytecode): Ditto.
        (JSC::ExprStatementNode::emitBytecode): Ditto.
        (JSC::VarStatementNode::emitBytecode): Ditto.
        (JSC::IfNode::emitBytecode): Ditto.
        (JSC::IfElseNode::emitBytecode): Ditto.
        (JSC::DoWhileNode::emitBytecode): Ditto.
        (JSC::WhileNode::emitBytecode): Ditto.
        (JSC::ForNode::emitBytecode): Ditto.
        (JSC::ForInNode::emitBytecode): Ditto.
        (JSC::ReturnNode::emitBytecode): Ditto.
        (JSC::WithNode::emitBytecode): Ditto.
        (JSC::CaseBlockNode::tryOptimizedSwitch): Ditto.
        (JSC::CaseBlockNode::emitBytecodeForBlock): Ditto.
        (JSC::SwitchNode::emitBytecode): Ditto.
        (JSC::LabelNode::emitBytecode): Ditto.
        (JSC::ThrowNode::emitBytecode): Ditto.
        (JSC::TryNode::emitBytecode): Ditto.
        (JSC::ScopeNodeData::ScopeNodeData): Use swap to transfer ownership
        of the arena, varStack and functionStack.
        (JSC::ScopeNode::ScopeNode): Pass in the arena when creating the
        ScopeNodeData.
        (JSC::ProgramNode::ProgramNode): Made this inline since it's used
        in only one place.
        (JSC::ProgramNode::create): Changed this to return a PassRefPtr since
        we plan to have the scope nodes be outside the arena, so they will need
        some kind of ownership transfer (maybe auto_ptr instead of PassRefPtr
        in the future, though). Remove the node from the newly-created arena to
        avoid a circular reference. Later we'll keep the node out of the arena
        by using a different operator new, but for now it's the ParserRefCounted
        constructor that puts the node into the arena, and there's no way to
        bypass that.
        (JSC::EvalNode::EvalNode): Ditto.
        (JSC::EvalNode::create): Ditto.
        (JSC::FunctionBodyNode::FunctionBodyNode): Ditto.
        (JSC::FunctionBodyNode::createNativeThunk): Moved the code that
        reseets the arena here instead of the caller.
        (JSC::FunctionBodyNode::create): Same change as the other create
        functions above.
        (JSC::FunctionBodyNode::emitBytecode): Use raw pointers.

        * parser/Nodes.h: Removed NodeReleaser. Changed FunctionStack to
        use raw pointers. Removed the releaseNodes function. Added an override
        of operator new that takes a JSGlobalData* to prepare for future arena use.
        Use raw pointers instead of RefPtr everywhere possible.

        * parser/Parser.cpp:
        (JSC::Parser::reparseInPlace): Pass the arena in.

        * parser/Parser.h:
        (JSC::Parser::parse): Updated for name change of parserObjects to parserArena.
        (JSC::Parser::reparse): Ditto.
        * runtime/FunctionConstructor.cpp:
        (JSC::extractFunctionBody): Ditto.
        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::~JSGlobalData): Ditto.
        (JSC::JSGlobalData::createNativeThunk): Moved arena manipulation into the
        FunctionBodyNode::createNativeThunk function.

        * runtime/JSGlobalData.h: Tweaked formatting and renamed parserObjects to
        parserArena.

        * wtf/NotFound.h: Added the usual "using WTF" to this header to match the
        rest of WTF.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-10  Darin Adler  <darin@apple.com>

        Reviewed by Maciej Stachowiak.

        Quick fix for failures seen on buildbot. Maciej plans a better fix later.

        * wtf/dtoa.cpp: Change the hardcoded number of 32-bit words in a BigInt
        from 32 to 64. Parsing "1e500", for example, requires more than 32 words.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Test for Bug 23741: StyleRareNonInheritedData::operator==() should not compare ContentData objects by pointer

        Rubber-stamped by Geoff Garen.

        Original test by Simon Fraser.

        * fast/css/compare-content-style.html: Added.
        * platform/mac/fast/css/compare-content-style-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Touch Nodes.cpp to try to fix Windows build

        * parser/Nodes.cpp: Removed whitespace.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Try to fix the Windows build by removing an unknown symbol

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:

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

        Reviewed by Darin Adler.

        - fix a crash when deactivating a document that had adopted a <form>
          element

        Test: fast/dom/HTMLFormElement/document-deactivation-callback-crash.html

        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::didMoveToNewOwnerDocument): Corrected the
        logic here: <form> elements should be registered for document activation
        callbacks if and only if autocomplete is off.

LayoutTests:

        Reviewed by Darin Adler.

        - test for a crash when deactivating a document that had adopted a
          <form> element

        * fast/dom/HTMLFormElement/document-deactivation-callback-crash-expected.txt: Added.
        * fast/dom/HTMLFormElement/document-deactivation-callback-crash.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Part 2: Try to fix the Windows build by adding a symbol which is really just a re-mangling of a changed method signature

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-10  Darin Adler  <darin@apple.com>

        Reviewed by Cameron Zwarich.

        Bug 25674: syntax tree nodes should use arena allocation
        https://bugs.webkit.org/show_bug.cgi?id=25674

        Part two: Remove reference counting from most nodes.

        * JavaScriptCore.exp: Updated.

        * JavaScriptCore.xcodeproj/project.pbxproj: Added ParserArena.h and .cpp.

        * parser/Grammar.y: Replaced uses of ParserRefCountedData with uses of
        ParserArenaData. Took out now-nonfunctional code that tries to manually
        release declaration list. Changed the new calls that create FuncDeclNode
        and FuncExprNode so that they use the proper version of operator new for
        the reference-counted idiom, not the deletion idiom.

        * parser/NodeConstructors.h:
        (JSC::ParserArenaDeletable::operator new): Added.
        (JSC::ParserArenaRefCounted::ParserArenaRefCounted): Added.
        (JSC::Node::Node): Removed ParserRefCounted initializer.
        (JSC::ElementNode::ElementNode): Ditto.
        (JSC::PropertyNode::PropertyNode): Ditto.
        (JSC::ArgumentsNode::ArgumentsNode): Ditto.
        (JSC::SourceElements::SourceElements): Ditto.
        (JSC::ParameterNode::ParameterNode): Ditto.
        (JSC::FuncExprNode::FuncExprNode): Added ParserArenaRefCounted initializer.
        (JSC::FuncDeclNode::FuncDeclNode): Ditto.
        (JSC::CaseClauseNode::CaseClauseNode): Removed ParserRefCounted initializer.
        (JSC::ClauseListNode::ClauseListNode): Ditto.
        (JSC::CaseBlockNode::CaseBlockNode): Ditto.

        * parser/NodeInfo.h: Replaced uses of ParserRefCountedData with uses of
        ParserArenaData.

        * parser/Nodes.cpp:
        (JSC::ScopeNode::ScopeNode): Added ParserArenaRefCounted initializer.
        (JSC::ProgramNode::create): Use the proper version of operator new for
        the reference-counted idiom, not the deletion idiom. Use the arena
        contains function instead of the vecctor find function.
        (JSC::EvalNode::create): Use the proper version of operator new for
        the reference-counted idiom, not the deletion idiom. Use the arena
        reset function instead of the vector shrink function.
        (JSC::FunctionBodyNode::createNativeThunk): Use the proper version
        of operator new for the reference-counted idiom, not the deletion idiom.
        (JSC::FunctionBodyNode::create): More of the same.

        * parser/Nodes.h: Added ParserArenaDeletable and ParserArenaRefCounted
        to replace ParserRefCounted. Fixed inheritance so only the classes that
        need reference counting inherit from ParserArenaRefCounted.

        * parser/Parser.cpp:
        (JSC::Parser::parse): Set m_sourceElements to 0 since it now starts
        uninitialized. Just set it to 0 again in the failure case, since it's
        now just a raw pointer, not an owning one.
        (JSC::Parser::reparseInPlace): Removed now-unneeded get() function.
        (JSC::Parser::didFinishParsing): Replaced uses of ParserRefCountedData
        with uses of ParserArenaData.

        * parser/Parser.h: Less RefPtr, more arena.

        * parser/ParserArena.cpp: Added.
        * parser/ParserArena.h: Added.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::~JSGlobalData): Removed arena-related code, since it's
        now in the Parser.
        (JSC::JSGlobalData::createLeaked): Removed unneeded #ifndef.
        (JSC::JSGlobalData::createNativeThunk): Tweaked #if a bit.

        * runtime/JSGlobalData.h: Removed parserArena, which is now in Parser.

        * wtf/RefCounted.h: Added deletionHasBegun function, for use in
        assertions to catch deletion not done by the deref function.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff Garen.
        
        - fixed REGRESSION(r43432): Many JavaScriptCore tests crash in 64-bit
        https://bugs.webkit.org/show_bug.cgi?id=25680

        Accound for the 64-bit instruction prefix when rewriting mov to lea on 64-bit.
        
        * jit/JIT.h:
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::patchGetByIdSelf):
        (JSC::JIT::patchPutByIdReplace):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-11  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by NOBODY (BuildFix).

        Add ParserArena to AllInOneFile as well as gtk, qt and wx build
        scripts.

        * AllInOneFile.cpp:
        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCoreSources.bkl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert "2009-05-11  Jan Michael Alonzo  <jmalonzo@webkit.org>"

This reverts commit r43485 as it fails the mac bots.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-05-11  Anton Shestakov  <engored@ya.ru>

        Rubber-stamped by Gustavo Noronha.

        New Russian translation.

        * ru.po: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Windows build fixes after r43479

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added
        ParserArena to the project.

        * parser/NodeConstructors.h: Added a missing include.
        (JSC::ParserArenaDeletable::operator new): Marked these as inline.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        More Windows build fixes after r43479

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
        Export ParserArena::reset.

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