2009-01-26  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Gavin Barraclough.

        Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
        <https://bugs.webkit.org/show_bug.cgi?id=23552>
        <rdar://problem/6398839>

        Dashcode will crash when using the evaluator because it saves a global call
        frame, even after global code has finished executing, and then uses this as
        a launching pad to execute new JS in the evaluator. The fix is to detect
        when Dashcode is attempting to do this and execute code from a global call
        frame instead.        

        JavaScriptCore:

        * JavaScriptCore.exp:
        * debugger/Debugger.cpp:
        (JSC::evaluateInGlobalCallFrame): Added so that WebScriptCallFrame can
        evaluate JS starting from a global call frame.
        * debugger/Debugger.h:

        WebKit/mac:

        * ForwardingHeaders/runtime/Protect.h: Added.
        * WebView/WebScriptDebugDelegate.mm:
        (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
        Added debugger, a WebScriptDebugger* argument.
        (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
        a stale WebScriptCallFrame to execute new JS and evaluate it starting from
        the global object's global call frame instead.
        * WebView/WebScriptDebugger.h:
        (WebScriptDebugger::globalObject): Added.
        (WebScriptDebugger::globalCallFrame): Added.
        * WebView/WebScriptDebugger.mm:
        (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
        (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
        so that the global call frame can be saved immediately after being created.
        (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
        WebScriptCallFrame's _initWithGlobalObject method.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Change Web Archive serialization back to the binary property list format.

        <rdar://problem/6127865> Web archives saved with Safari 4 cannot be read by Safari 3

        Reviewed by Brady Eidson.

        * loader/archive/cf/LegacyWebArchive.cpp:
        (WebCore::LegacyWebArchive::rawDataRepresentation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Pierre-Olivier Latour  <pol@apple.com>

        Updated the reference images for the video tests that rely on the H264 test movie,
        as QuickTime 7.6 apparently slightly changed the results from the 7.5.5 version.

        * platform/mac/media/video-aspect-ratio-expected.checksum:
        * platform/mac/media/video-aspect-ratio-expected.png:
        * platform/mac/media/video-controls-rendering-expected.checksum:
        * platform/mac/media/video-controls-rendering-expected.png:
        * platform/mac/media/video-display-toggle-expected.checksum:
        * platform/mac/media/video-display-toggle-expected.png:
        * platform/mac/media/video-layer-crash-expected.checksum:
        * platform/mac/media/video-layer-crash-expected.png:
        * platform/mac/media/video-transformed-expected.checksum:
        * platform/mac/media/video-transformed-expected.png:
        * platform/mac/media/video-zoom-expected.checksum:
        * platform/mac/media/video-zoom-expected.png:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add the ability for a plug-in to show or hide the menu bar.
        
        * Plugins/Hosted/NetscapePluginHostProxy.h:
        * Plugins/Hosted/NetscapePluginHostProxy.mm:
        (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
        (WebKit::NetscapePluginHostProxy::pluginHostDied):
        (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
        (WKPCSetMenuBarVisible):
        * Plugins/Hosted/WebKitPluginClient.defs:



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

2009-01-26  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=18141
        Acid3 tests 77 and 78 fail on reload due to SVG font race
        <rdar://problem/6504899>

        Match Opera's behavior of loading SVGFonts as soon as <font-face-uri>
        tag is inserted into the document and not at the first use of the font
        as is done for CSS web fonts.

        This fixes a race condition noticeable by some in the Acid3 test that
        happened because the onload event handler for an iframe containing a
        <font-face-uri> with an external reference was not delayed by the pending
        load of the font.

        Test: http/tests/misc/SVGFont-delayed-load.html

        * svg/SVGFontFaceUriElement.cpp:
        (WebCore::SVGFontFaceUriElement::~SVGFontFaceUriElement):
        (WebCore::SVGFontFaceUriElement::parseMappedAttribute): Call loadFont if
        the href attribute changes.
        (WebCore::SVGFontFaceUriElement::insertedIntoDocument): Call loadFont.
        (WebCore::SVGFontFaceUriElement::loadFont): Force a load of the
        font specified in href attribute.
        * svg/SVGFontFaceUriElement.h:

LayoutTests:

2009-01-26  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        Test for https://bugs.webkit.org/show_bug.cgi?id=18141
        Acid3 tests 77 and 78 fail on reload due to SVG font race
        <rdar://problem/6504899>

        * http/tests/misc/SVGFont-delayed-load-expected.txt: Added.
        * http/tests/misc/SVGFont-delayed-load.html: Added.
        * http/tests/misc/resources/SVGFont-delayed-loader.svg: Added.
        * svg/custom/acid3-test-77.html:
        * svg/custom/resources/Acid3Font-loader.svg:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Darin Adler.

        Fixes for eq null & neq null, on 64-bit JIT.
        https://bugs.webkit.org/show_bug.cgi?id=23559

        This patch degrades 64-bit JIT performance on some benchmarks,
        due to the whole not-being-incorrect thing.

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  John Sullivan  <sullivan@apple.com>

        fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets 
        stuck in the Name field rather than cycling around

        Reviewed by Dan Bernstein

        * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
        * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
        The two static text fields and the last button all had their "next key view" outlets set to the
        name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
        selectable view have exactly one "next key view" set to it.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add the ability for plug-ins to make WebKit operate in "modal mode"
        
        * Plugins/Hosted/NetscapePluginHostProxy.h:
        * Plugins/Hosted/NetscapePluginHostProxy.mm:
        (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
        (WebKit::NetscapePluginHostProxy::pluginHostDied):
        If the plug-in crashes while we're modal, make sure to leave the modal mode.
        
        (WebKit::NetscapePluginHostProxy::setModal):
        (WKPCSetModal):
        * Plugins/Hosted/WebKitPluginClient.defs:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Adele Peterson  <adele@apple.com>

        Build fix.  

        * debugger/Debugger.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sam did _not_ review this

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Fix misspelling of "lowercase" in font-face-locally-installed.html

        Reviewed by Dan Bernstein.

        * fast/css/font-face-locally-installed.html: Updated.
        * platform/mac/fast/css/font-face-locally-installed-expected.checksum: Updated.
        * platform/mac/fast/css/font-face-locally-installed-expected.png: Updated.
        * platform/mac/fast/css/font-face-locally-installed-expected.txt: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow option of hit testing frame content without clipping to the visible
viewport.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        -Make the recently added back/forward cache logging much better by actually
         walking the entire frame tree and indenting the resulting output.
        -Fix a null-termination bug in HistoryItem tree logging 

        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::showTreeWithIndent):

        * loader/FrameLoader.cpp:
        (WebCore::pageCacheLogPrefix):
        (WebCore::pageCacheLog):
        (WebCore::FrameLoader::logCanCachePageDecision):
        (WebCore::FrameLoader::logCanCacheFrameDecision):
        * loader/FrameLoader.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by David Hyatt

        Back out r40285, because it was checked in with no bug number, no
        testcase, is rendering change that did not get thorough review,
        and broke the Mac build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-26  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dave Hyatt

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

        Add variants of all the methods that compute dirty rects for repainting
        with versions that compute those rects relative to some container
        RenderBox that acts as a painting root.

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

2009-01-27  Brady Eidson  <beidson@apple.com>

        Reviewed by Dan Bernstein

        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage

        * WebCore.base.exp:
        * history/CachedPage.cpp:
        * history/CachedPage.h:
        (WebCore::CachedPage::cachedMainFrame):

        * loader/EmptyClients.h:
        (WebCore::EmptyFrameLoaderClient::savePlatformDataToCachedFrame):
        (WebCore::EmptyFrameLoaderClient::transitionToCommittedFromCachedFrame):

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::restoreDocumentState):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::cachePageForHistoryItem):
        * loader/FrameLoaderClient.h:

WebKit/gtk:

2009-01-27  Brady Eidson  <beidson@apple.com>

        Reviewed by Dan Bernstein

        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::savePlatformDataToCachedFrame):
        (WebKit::FrameLoaderClient::transitionToCommittedFromCachedFrame):
        * WebCoreSupport/FrameLoaderClientGtk.h:

WebKit/mac:

2009-01-27  Brady Eidson  <beidson@apple.com>

        Reviewed by Dan Bernstein

        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage

        * History/WebHistoryItem.mm:

        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::savePlatformDataToCachedFrame):
        (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
        * WebKit.order:

WebKit/qt:

2009-01-27  Brady Eidson  <beidson@apple.com>

        Reviewed by Dan Bernstein

        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::savePlatformDataToCachedFrame):
        (WebCore::FrameLoaderClientQt::transitionToCommittedFromCachedFrame):
        * WebCoreSupport/FrameLoaderClientQt.h:

WebKit/win:

2009-01-27  Brady Eidson  <beidson@apple.com>

        Reviewed by Dan Bernstein

        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::savePlatformDataToCachedFrame):
        (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
        * WebCoreSupport/WebFrameLoaderClient.h:

        * WebFrame.cpp:
        * WebFrame.h:

WebKit/wx:

2009-01-27  Brady Eidson  <beidson@apple.com>

        Reviewed by Dan Bernstein

        Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage

        * WebKitSupport/FrameLoaderClientWx.cpp:
        (WebCore::FrameLoaderClientWx::savePlatformDataToCachedFrame):
        (WebCore::FrameLoaderClientWx::transitionToCommittedFromCachedFrame):
        * WebKitSupport/FrameLoaderClientWx.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-27  Ariya Hidayat  <ariya.hidayat@trolltech.com>

        Reviewed by Simon Hausmann.

        http://www.qtsoftware.com/developer/task-tracker/index_html?id=238391&method=entry

        [Qt] If QPainter fails to start on a QPrinter instance, do not
        continue printing.

        * Api/qwebframe.cpp:
        (QWebFrame::print):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-27  Ariya Hidayat  <ariya.hidayat@trolltech.com>

        Rubber-stamped by Simon Hausmann.

        http://www.qtsoftware.com/developer/task-tracker/index_html?id=238662&method=entry

        [Qt] Map function keys F1 to F24.

        * platform/qt/PlatformKeyboardEventQt.cpp:
        (WebCore::windowsKeyCodeForKeyEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-27  Evan Stade  <estade@chromium.org>

        Reviewed by Nikolas Zimmermann.

        https://bugs.webkit.org/show_bug.cgi?id=23435
        Make spreadMethod a member of Gradient rather than GraphicsContext.
        Implement spreadMethod for Skia.

        * platform/graphics/Gradient.cpp:
        (WebCore::Gradient::Gradient):
        * platform/graphics/Gradient.h:
        (WebCore::Gradient::setSpreadMethod):
        (WebCore::Gradient::spreadMethod):
        * platform/graphics/GraphicsContext.cpp:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/GraphicsContextPrivate.h:
        * platform/graphics/GraphicsTypes.h:
        (WebCore::):
        * platform/graphics/cairo/GradientCairo.cpp:
        (WebCore::Gradient::platformGradient):
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::fillPath):
        (WebCore::GraphicsContext::strokePath):
        * platform/graphics/qt/GradientQt.cpp:
        (WebCore::Gradient::platformGradient):
        * platform/graphics/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContext::fillPath):
        (WebCore::GraphicsContext::strokePath):
        * platform/graphics/skia/GradientSkia.cpp:
        (WebCore::Gradient::platformGradient):
        * svg/SVGLinearGradientElement.cpp:
        (WebCore::SVGLinearGradientElement::buildGradient):
        * svg/SVGRadialGradientElement.cpp:
        (WebCore::SVGRadialGradientElement::buildGradient):
        * svg/graphics/SVGPaintServerGradient.cpp:
        (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
        (WebCore::SVGPaintServerGradient::setup):
        (WebCore::SVGPaintServerGradient::externalRepresentation):
        * svg/graphics/SVGPaintServerGradient.h:

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

2009-01-27  Mads Ager  <ager@chromium.org>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=23300
        Follow Firefox in throwing exceptions when using selection
        functions on HTMLInputElements that cannot have selection.

        This requires custom setSelectionRange, setSelectionStart and
        setSelectionEnd implementations, but it gets rid of the custom
        getOwnPropertySlot.

        * bindings/js/JSHTMLInputElementCustom.cpp:
        (WebCore::JSHTMLInputElement::selectionStart):
        (WebCore::JSHTMLInputElement::selectionEnd):
        (WebCore::JSHTMLInputElement::setSelectionRange):
        * html/HTMLInputElement.idl:

LayoutTests:

2009-01-27  Mads Ager  <ager@chromium.org>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=23300
        Update test of selection functions on HTMLInputElements to expect
        the selection functions to throw exceptions when used on buttons.
        This is consistent with the Firefox behavior.

        * fast/forms/selection-functions-expected.txt:
        * fast/forms/selection-functions.html:

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