2009-04-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        Move more window event related code into DOMWindow.

        * dom/Document.cpp:
        (WebCore::Document::implicitClose):
        (WebCore::Document::setWindowAttributeEventListener):
        (WebCore::Document::dispatchWindowEvent):
        (WebCore::Document::dispatchLoadEvent):
        * dom/Document.h:
        * dom/Element.cpp:
        * dom/Element.h:
        * dom/Node.cpp:
        * dom/Node.h:
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::parseMappedAttribute):
        * html/HTMLFrameSetElement.cpp:
        (WebCore::HTMLFrameSetElement::parseMappedAttribute):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::stopLoading):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
        (WebCore::DOMWindow::postMessageTimerFired):
        (WebCore::DOMWindow::dispatchEvent):
        (WebCore::DOMWindow::dispatchEventWithDocumentAsTarget):
        (WebCore::DOMWindow::dispatchLoadEvent):
        (WebCore::DOMWindow::dispatchUnloadEvent):
        (WebCore::DOMWindow::dispatchBeforeUnloadEvent):
        * page/DOMWindow.h:
        * page/Frame.cpp:
        (WebCore::Frame::shouldClose):
        * svg/SVGSVGElement.cpp:
        (WebCore::SVGSVGElement::parseMappedAttribute):



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

        Reviewed by Darin Adler

        <rdar://problem/6642221> REGRESSION: With the Movie widget, movie trailer fails to
        load if movie had been previously viewed

        Fix the Dashboard quirk for display:none plug-ins by moving the code from HTMLObjectElement
        to HTMLEmebedElement. It has to be in HTMLEmbedElement because the content we care about uses <embed>.

        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::rendererIsNeeded):
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::rendererIsNeeded):

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

        Reviewed by Adele Peterson

        <rdar://problem/6822225> Full page zooming of <video> element in the browser window doesn't work well

        Fix a 'size changed' notification thrash that caused standalone video elements
        to continually resize after full page zooming, by using the movie's natual size (which is independent
        of zooming), rather than its current size (which is not).

        Note that this regresses <https://bugs.webkit.org/show_bug.cgi?id=25029>, so we have to
        disable the media/video-size-intrinsic-scale.html test. However, we have to stop using
        QTMovieCurrentSizeAttribute anyway; this will be addressed, and the test re-enabled via
        <rdar://problem/6822344>.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::naturalSize):

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

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

        Add pixel test for zoomed video with controls, with and without a transform.

        * media/video-zoom-controls.html: Added.
        * platform/mac/media/video-zoom-controls-expected.checksum: Added.
        * platform/mac/media/video-zoom-controls-expected.png: Added.
        * platform/mac/media/video-zoom-controls-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        If it has been set to allow any HTTPS certificates for this host, set 
        kCFStreamSSLAllowsExpiredCertificates to true to allow expired 
        certificate, and set kCFStreamSSLValidatesCertificateChain false to skip
        certificate chain validation. (<rdar://problem/6382059>)

        Reviewed by John Sullivan.

        * platform/network/cf/ResourceHandleCFNet.cpp:
        (WebCore::makeFinalRequest):



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

2009-04-27  Beth Dakin  <bdakin@apple.com>

        Reviewed by Dave Hyatt.

        Fix for <rdar://problem/6709057> REGRESSION (4PB-TOT): http://www.winway.com/main3/support/faq.aspx selector doesn't look right or work

        The problem here is that we had a self-painting layer nested inside 
        a non-self-painting layer. We ended up ignoring the self-painting 
        layer both during painting and hit-testing. This patch corrects 
        that. 

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::paintLayer):
        (WebCore::RenderLayer::hitTestLayer):

LayoutTests:

2009-04-27  Beth Dakin  <bdakin@apple.com>

        Reviewed by Dave Hyatt.

        Test for <rdar://problem/6709057> REGRESSION (4PB-TOT): http://www.winway.com/main3/support/faq.aspx selector doesn't look right or work

        * fast/css/nested-layers-with-hover.html: Added.
        * platform/mac/fast/css/nested-layers-with-hover-expected.checksum: Added.
        * platform/mac/fast/css/nested-layers-with-hover-expected.png: Added.
        * platform/mac/fast/css/nested-layers-with-hover-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-27  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/6822344> Use of QTMovieCurrentSizeAttribute generates exception and will crash

        QTMovieCurrentSizeAttribute generates an exception with some versions of QTKit, so calculate a 
        multiplier to scale from natural size to current size when a movie is opened and use that to 
        return the correct value from the naturalSize() method.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_scaleFactor.
        (WebCore::MediaPlayerPrivate::naturalSize): Return naturalSize transformed by initial scale.
        (WebCore::MediaPlayerPrivate::cacheMovieScale): New, calculate difference between initial
        size and natural size so naturalSize() accounts for non-identity movie matrix.
        (WebCore::MediaPlayerPrivate::updateStates): Call cacheMovieScale when load state reaches
        QTMovieLoadStateLoaded for the first time.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-27  Eric Roman  <eroman@chromium.org>

        Reviewed by Darin Fisher.

        Fix a compile breakage.
        <https://bugs.webkit.org/show_bug.cgi?id=25384>

        * bindings/v8/custom/V8DOMWindowCustom.cpp:
        (WebCore::CALLBACK_FUNC_DECL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-27  Pierre d'Herbemont  <pdherbemont@apple.com>

        Reviewed by Simon Fraser

        Fix video-played.html layout test.

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

        We implement playForMillisecs() which makes sure the video
        will have been playing for a minimum time.

        Note, this does not ensure a strict synchronization between the time
        asked and the media playback. But given that media playback is the
        slow part we just need to compensate for the delay involved by playback.
        (And not the other way around.)

        Moreover, we split the test in 3 in order to be more gentle which
        slower machines that may tend to timeout more easily on those tests.

        * media/video-played-collapse-expected.txt: Added.
        * media/video-played-collapse.html: Added.
        * media/video-played-expected.txt:
        * media/video-played-reset-expected.txt: Added.
        * media/video-played-reset.html: Added.
        * media/video-played.html:
        - Split tests in multiple files.
        - Makes sure we always play as much as requested by using
        playForMillisecs();
        * media/video-played.js: Added.
        (testRanges):
        (nextTest):
        (pause):
        (canplay):
        (willCreateNewRange):
        (startPlayingInNewRange):
        (startPlaying):
        (secToMilli):
        (milliToSecs):
        (playForMillisecs.callPauseIfTimeIsReached):
        (playForMillisecs):
        (videoPlayedMain):

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

        Reviewed by Mark Rowe.

        Disable test intermittent failing test.

        * svg/custom/filter-source-alpha.svg: Removed.
        * svg/custom/filter-source-alpha.svg-disabled: Copied from svg/custom/filter-source-alpha.svg.



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

        Reviewed by Maciej Stachowiak.

        Tweak a loop condition to keep GCC happy,
        some GCCs seem to be having issues with this. :-/

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::breakTarget):
        * wtf/Platform.h:



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

        Rubber stamped by Maciej "Henry Morgan" Stachowiak.

        Enable YARR.
        (Again.)

        * wtf/Platform.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Justin Garcia.

        https://bugs.webkit.org/show_bug.cgi?id=16135
        [GTK] Support caret browsing

        Based on a patch by Alp Toker.

        Implement basic support for caret browsing, active only when the
        corresponding setting is enabled.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseReleaseEvent):
        * page/FocusController.cpp:
        (WebCore::FocusController::advanceFocus):
        (WebCore::clearSelectionIfNeeded):
        (WebCore::FocusController::setFocusedNode):
        * page/Frame.cpp:
        (WebCore::Frame::setFocusedNodeIfNeeded):
        (WebCore::Frame::setSelectionFromNone):
        (WebCore::Frame::respondToChangedSelection):
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        * page/Settings.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintCaret):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        https://bugs.webkit.org/show_bug.cgi?id=16135
        [GTK] Support caret browsing

        Based on a patch by Alp Toker.

        Add enable-caret-browsing setting to WebKitWebView.

        * webkit/webkitwebsettings.cpp:
        (_WebKitWebSettingsPrivate::):
        (_WebKitWebSettingsPrivate::webkit_web_settings_class_init):
        (_WebKitWebSettingsPrivate::webkit_web_settings_set_property):
        (_WebKitWebSettingsPrivate::webkit_web_settings_get_property):
        (_WebKitWebSettingsPrivate::webkit_web_settings_copy):
        * webkit/webkitwebview.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-28  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        https://bugs.webkit.org/show_bug.cgi?id=16135
        [GTK] Support caret browsing

        Refactor keyboard event handling to work properly under caret
        browsing mode. Most of the code comes from the Windows port.

        * WebCoreSupport/EditorClientGtk.cpp:
        (WebKit::):
        (WebKit::interpretKeyEvent):
        (WebKit::handleEditingKeyboardEvent):
        (WebKit::EditorClient::handleKeyboardEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-28  Xan Lopez  <xlopez@igalia.com>

        Unreviewed: committed a few bits by mistake, remove them.

        * WebCoreSupport/EditorClientGtk.cpp:
        (WebKit::handleEditingKeyboardEvent):

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

        Not reviewed, build fix.

        - fix initialization order to match declaration order to fix release build

        * page/Settings.cpp:
        (WebCore::Settings::Settings):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-04-28  Simon Hausmann  <simon.hausmann@nokia.com>

        Reviewed by Tor Arne Vestbø.

        Fix some qdoc warnings.

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

        <rdar://problem/6820221> REGRESSION: 2-byte character names of images are displayed as %-encoded ASCII

        Reviewed by Adam Roben

        * loader/ImageDocument.cpp:
        (WebCore::ImageTokenizer::finish):
        decode the filename before processing it as part of the image name that's passed to the client



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed by Kevin Ollivier.
        
Add a function for resetting the zoom factor to 1.0.
        
https://bugs.webkit.org/show_bug.cgi?id=25447


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