2009-04-10  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Timothy Hatcher.

        https://bugs.webkit.org/show_bug.cgi?id=25133
        Fix an error in InspectorController's bindings, clean up a few header
        includes, make empty object construction in ScriptObject less ambiguous.

        * bindings/js/JSInspectorControllerCustom.cpp:
        (WebCore::JSInspectorController::setSetting): Send correct argument from
            the bindings.
        * bindings/js/ScriptObject.cpp:
        (WebCore::ScriptObject::createNew): Added.
        * bindings/js/ScriptObject.h: Removed constructor, added decl for createNew.
        * inspector/ConsoleMessage.cpp: Remove unused header.
        * inspector/ConsoleMessage.h: Ditto.
        * inspector/InspectorResource.cpp:
        (WebCore::createHeadersObject): Changed to use ScriptObject::createNew.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-10  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        Fix for <rdar://problem/6648858>
        CrashTracer: [REGRESSION(Safari 4)] 60 crashes in Safari at com.apple.WebCore • WebCore::ScriptController::evaluate + 241

        The Frame (and therefore ScriptController) were being destroyed
        during JavaScript execution causing the JSDOMWindowShell to become
        null.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluate): Use a RefPtr to protect the Frame
        instead of the keep-alive timer, since a nested event loop used from with-in 
        JavaScript execution could cause the timer to fire before returning.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-10  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Dan Bernstein

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

        If you remove a class with a transition while that transition is running
        the animation timer will continue to fire after the transition is finished.
        This has no visual indication, but it does drain the processor. And in some
        cases it might even cause a glitch in future animations. Unfortunately there
        is no way to test this without putting in printfs.

        This happens because the animation logic is never traversed after a transition
        is removed, so we never get a chance to cleanup. So I added cleanup in the logic
        that fires the dispatch of the last style change when the animation finishes.

        Test: transitions/remove-transition-style.html

        * page/animation/AnimationController.cpp:
        (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::updateTransitions):
        (WebCore::CompositeAnimation::animate):
        (WebCore::CompositeAnimation::cleanupFinishedAnimations):
        * page/animation/CompositeAnimation.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Add our invidual IDL files back to Interfaces.vcproj, but disable them

        This allows the IDL files to be found in Solution Explorer.

        Rubber-stamped in advance by Steve Falkenburg.

        * WebKit.vcproj/Interfaces.vcproj:

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

2009-04-10  Darin Adler  <darin@apple.com>

        Reviewed by Brady Eidson.

        <rdar://problem/6773515> crash in push_heap inside WebCore when printing

        The crash was due to manipulating a timer on a different thread than the one it was created on.
        This adds some diagnostics so we'll catch that kind of mistake immediately.

        * platform/Timer.cpp:
        (WebCore::TimerBase::TimerBase): Store the thread identifier in debug versions.
        (WebCore::TimerBase::start): Assert it's the same thread the timer was created on.
        (WebCore::TimerBase::stop): Ditto.
        (WebCore::TimerBase::isActive): Ditto.
        (WebCore::TimerBase::setNextFireTime): Ditto.

        * platform/Timer.h: Added the thread identifier data member.

WebKit/mac:

2009-04-10  Darin Adler  <darin@apple.com>

        Reviewed by Brady Eidson.

        <rdar://problem/6773515> crash in push_heap inside WebCore when printing

        The crash was due to manipulating a timer on a different thread than the one it was created on.

        * History/WebHistoryItem.mm:
        (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread.
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView windowDidBecomeKey:]): Ditto.
        (-[WebHTMLView windowDidResignKey:]): Ditto.
        (-[WebHTMLView windowWillClose:]): Ditto.
        (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of
        our override of _windowChangedKeyState.
        (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if
        called on non-main thread.
        * WebView/WebPreferences.mm:
        (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called
        on non-main thread



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-10  Grace Kloba  <klobag@gmail.com>

        Reviewed by Darin Adler.

        Move WORKERS header files inside ENABLE(WORKERS).
        So if WORKERS is not enabled and the generated files are not generated, the build is still working.

        * bindings/js/JSDOMGlobalObject.cpp:
        * bindings/js/JSMessageChannelConstructor.cpp:
        * bindings/js/ScheduledAction.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Add our new test font to the list that DRT knows about

        Reviewed by Dan Bernstein.

        * DumpRenderTree/win/DumpRenderTree.cpp:
        (initialize): Added WebKit Layout Tests 2.ttf.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Fixed https://bugs.webkit.org/show_bug.cgi?id=25137

        If we reload, the animation controller sticks around and has
        a stale animation time. So the needed delay is computed wrong.
        I added a reset of the animation timer on load.

        I did not do a test case because this only happens on reload so I
        couldn't make an automated test. I tried using an iframe and using
        reload() but that doesn't tickle the bug.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Anders Carlsson.

        - test and expected result updates following r42379

        * fast/text/offsetForPosition-cluster-at-zero-expected.txt: Updated
        results.
        * fast/text/offsetForPosition-cluster-at-zero.html: Removed
        font-dependent alert that was accidently left in this test.
        * platform/mac-tiger/fast/text/international/thai-line-breaks-expected.checksum:
        * platform/mac-tiger/fast/text/international/thai-line-breaks-expected.png:
        * platform/mac-tiger/fast/text/international/thai-line-breaks-expected.txt:
        * platform/mac-tiger/fast/text/monospace-width-cache-expected.checksum: Added.
        * platform/mac-tiger/fast/text/monospace-width-cache-expected.png: Added.
        * platform/mac-tiger/fast/text/monospace-width-cache-expected.txt: Added.
        * platform/win/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-10  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin Adler.

        Add back the keepAlive timer for after the script execution to
        protect the callers of evaluate, as was part of the original intent
        of timer.

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluate):
        * page/mac/FrameMac.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-10  Sam Weinig  <sam@webkit.org>

        Reviewed by Adele Peterson.

        Remove unused include for JSLock.

        * page/mac/FrameMac.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/6676024> REGRESSION (PB-40B1): Safari crashes on launch on tablet PC
        
        r21436 changed the semantics of AXObjectCache::get() to not create
        objects on demand. Changing this get() call into a getOrCreate() call
        fixes the crash.
        
        Rubber stamped by Jon Honeycutt.

        * AccessibleDocument.cpp:
        (AccessibleDocument::AccessibleDocument):



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

        Rubber stamped by Adam Roben.

        Disabled fast/dom/gc-8.html, which was using Timer in an unsafe way that now
        triggers an assertion.

        We'll reenable the test after fixing the problem. But this is a test-only problem.

        * fast/dom/gc-8.html: Removed.
        * fast/dom/gc-8.html-disabled: Copied from fast/dom/gc-8.html.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42420 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Land corrected results for complex-character-based-fallback.html

        * platform/win/fast/text/international/complex-character-based-fallback-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42421 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Allow page navigation and reload while stopped at a breakpoint.

        <rdar://problem/6781108> Having a breakpoint active prevents page reload

        Reviewed by Darin Adler.

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::didContinue): Call the resumedScript function.
        * inspector/InspectorController.h: Added didContinue.
        * inspector/JavaScriptDebugListener.h: Ditto.
        * inspector/JavaScriptDebugServer.cpp:
        (WebCore::JavaScriptDebugServer::pauseIfNeeded): Call didContinue on the listeners.
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype.debuggerResumed): Update the interface and state.
        * inspector/front-end/inspector.js:
        (WebInspector.resumedScript): Call ScriptsPanel.debuggerResumed.
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Call resumeDebugger.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Jon Honeycutt.

        - fix <rdar://problem/6752340> Light blue-green background in content
          area in Mail

        * WebView/WebView.mm:
        (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
        Use device white, rather than calibrated white, as the default
        background color.



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

        Reviewed by Darin Adler.

        - fix <rdar://problem/6643103> Unscaled values from body.scrollHeight

        Test: fast/css/zoom-body-scroll.html

        Adjust scroll{Left,Top,Width,Height} values for zoom in getters and
        setters.

        * html/HTMLBodyElement.cpp:
        (WebCore::adjustForZoom):
        (WebCore::HTMLBodyElement::scrollLeft):
        (WebCore::HTMLBodyElement::setScrollLeft):
        (WebCore::HTMLBodyElement::scrollTop):
        (WebCore::HTMLBodyElement::setScrollTop):
        (WebCore::HTMLBodyElement::scrollHeight):
        (WebCore::HTMLBodyElement::scrollWidth):

LayoutTests:

        Reviewed by Darin Adler.

        - test for <rdar://problem/6643103> Unscaled values from body.scrollHeight

        * fast/css/zoom-body-scroll-expected.txt: Added.
        * fast/css/zoom-body-scroll.html: Added.



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

2009-04-11  Adele Peterson  <adele@apple.com>

        Reviewed by Dan Bernstein.

        Fix for <rdar://problem/6609479> Pressing return inside a table cell that's inside quoted content will split the table

        Test: editing/inserting/6609479.html

        Don't break a blockquote if pasting or inserting into a table.

        * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
        * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):

LayoutTests:

2009-04-11  Adele Peterson  <adele@apple.com>

        Reviewed by Dan Bernstein.

        Tests for <rdar://problem/6609479> Pressing return inside a table cell that's inside quoted content will split the table

        * editing/inserting/5418891.html: Changed test so it doesn't involve tables.
        * editing/inserting/6609479-expected.txt: Added.
        * editing/inserting/6609479.html: Added.
        * platform/mac/editing/inserting/5418891-expected.checksum:
        * platform/mac/editing/inserting/5418891-expected.png:
        * platform/mac/editing/inserting/5418891-expected.txt:



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

2009-04-12  Adele Peterson  <adele@apple.com>

        Reviewed by Darin Adler.

        Test: editing/inserting/6609479-1.html

        Follow-up to <rdar://problem/6609479>.

        Before my last change, a Mail blockquote would've been broken up earlier, and you would've been guaranteed that the inserted content
        was at the start of a paragraph.  Now we need to check for that explicitly, and only merge the start of the inserted content if it is 
        at the start of a paragraph.

        * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeStart):

LayoutTests:

2009-04-12  Adele Peterson  <adele@apple.com>

        Reviewed by Darin Adler.

        Another test for <rdar://problem/6609479>.  This covers inserting HTML in a quoted table.

        * editing/inserting/6609479-1-expected.txt: Added.
        * editing/inserting/6609479-1.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        A resource's filename is not correct after a redirect in the Inspector.

        Reviewed by Dan Bernstein.

        * inspector/InspectorResource.cpp:
        (WebCore::InspectorResource::updateScriptObject): Fix a typo in the
        lastPathComponent property name.

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