Fix exception handling in API

Reviewed by Cameron Zwarich.

We can't just use the ExecState exception slot for returning exceptions
from class introspection functions provided through the API as many JSC
functions will explicitly clear the ExecState exception when returning.


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

        Reviewed by Holger Freyther.

        Require gnome-keyring 2.26.0, since we were depending on an
        unreleased trunk revision between 2.25.91 and 2.26.0.

        * configure.ac:

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

        Reviewed by Adele Peterson.

        https://bugs.webkit.org/show_bug.cgi?id=24588
        
        Update media element implementation to current HTML5 spec

        New tests: 
               media/media-constants.html
               media/video-seek-no-src-exception.html
               media/video-source-add-src.html
               media/video-src-invalid-remove.html
               media/video-src-plus-source.html
               media/video-timeupdate-during-playback.html

        * dom/EventNames.h: Remove obsolute events, add new ones.
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars.
        (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't
        have a source.
        (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes.
        (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and 
        add it to the event queue to be dispatch when the timer fires.
        (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add
        it to the event queue to be dispatch when the timer fires.
        (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the 
        asynch event timer.
        (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events.
        (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or
        try to load the next <source> url.
        (WebCore::HTMLMediaElement::load): Minor style change.
        (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup
        the current load (if any) and set up state for a new load.
        (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart'
        event, and initiate load from 'src' if present.
        (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger
        noneSupported() if no more to consider.
        (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url.
        (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer.
        (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid 
        media url was found.
        (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid 
        media engine failed with a decode error or a network error.
        (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
        (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states.
        (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
        (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state.
        (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active.
        (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or
        if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag
        we use to guard against sending 'ended' more than once.
        (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata.
        (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an
        invalid rate. 
        (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an
        invalid rate. Cache rate being set so we can use it later if media engine isn't ready now.
        (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just
        starts loading asynchronously.
        (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing'
        event depending on current state.
        (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just
        starts loading asynchronously.
        (WebCore::HTMLMediaElement::pauseInternal): Remove exception param.
        (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent
        (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent
        (WebCore::HTMLMediaElement::togglePlayState): Remove exception param.
        (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param.
        (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per
        second when the movie is playing to timeupdate so we can post 'timeupdate' events.
        (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc.
        (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate'
        event because we both fire them them when the spec says we should and when the media engine
        says that time has jumped, but we don't want to fire more than one at a given movie time. We also
        use this bottleneck to keep track of the last time one was posted so we won't fire too often
        during playback.
        (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata.
        (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source>
        element with a 'src' attribute that we have not tried to load yet.
        (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next
        <source> element that we haven't tried to load.
        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes.
        Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since
        some media engines call this proc more than once when playback reaches the end and stops, but we
        don't want to post 'ended' more than once.
        (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform
        when the movie duration changes and we can post 'durationchanged' event.
        (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when
        the rate changed and we can updated our cached rate. This is useful because we only want to know
        post periodic 'timeupdate' events when the movie is actually playing, and because we want to know
        the actual playback rate when it differs from what we tried to set.
        (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when
        a movie's intrinsic size changes and we can inform the renderer.
        (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now
        uses "actively playing" for this concept. Update logic for new state names and un-comment calls
        to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons
        are part of the answer.
        (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names. 
        (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of
        the determination of "potentially playing".
        (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user
        agent supports this spec concept.
        (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate' 
        events when we pauses the movie. Set the media engine rate before calling play() in case it
        wasn't set up when the rate was changed.
        (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate'
        event timers.
        (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive
        and updated for the current spec.
        (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad.
        (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments.
        (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the 
        initial url.
        * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
        update for changes in .cpp.
        (WebCore::HTMLMediaElement::):

        * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
        defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.

        * html/HTMLSourceElement.cpp:
        (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.

        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.

        * html/MediaError.h:
        (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.

        * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.

        * loader/MediaDocument.cpp:
        (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes.
        (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes.
        (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes.
        (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes.
        * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec
        states.
        (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
        (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
        (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
        (WebCore::MediaPlayer::):

        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
        (WebCore::MediaPlayerPrivate::load): Ditto.
        (WebCore::MediaPlayerPrivate::updateStates): Ditto.
        (WebCore::MediaPlayerPrivate::loadingFailed): Ditto.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes.
        Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration.
        (WebCore::MediaPlayerPrivate::metaDataAvailable):
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize
        m_enabledTrackCount and m_duration. Update for network/ready state name changes.
        (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes.
        (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
        (WebCore::MediaPlayerPrivate::pause): Ditto.
        (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime.
        (WebCore::MediaPlayerPrivate::seek): Ditto.
        (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is
        already zero.
        (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime.
        (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return
        different errors depending on what causes a failure. Watch for and report duration changes.
        (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes.
        (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes.
        (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer.
        (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes.
        (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported
        tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure.

        * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
        (WebCore::MediaPlayerPrivate::load): Ditto.
        (WebCore::MediaPlayerPrivate::duration): Ditto.
        (WebCore::MediaPlayerPrivate::updateStates): Ditto.
        (WebCore::MediaPlayerPrivate::naturalSize): Ditto.

        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for 
        network/ready state name changes.
        (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more
        m_endPointTimer.
        (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
        (WebCore::MediaPlayerPrivate::pause): Ditto. 
        (WebCore::MediaPlayerPrivate::setEndTime): Ditto.
        (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes.
        (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer.
        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state 
        name changes.
        (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.

2009-03-23  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adele Peterson.
        
        https://bugs.webkit.org/show_bug.cgi?id=24588
        Bug 24588: Update media element implementation to current spec

        * media/media-constants-expected.txt: Test all media constants.
        * media/media-constants.html: Ditto.
        * media/remove-from-document-expected.txt: Updated for spec changes.
        * media/remove-from-document-no-load.html: Ditto.
        * media/remove-from-document.html: Ditto.
        * media/unsupported-rtsp-expected.txt: Ditto.
        * media/unsupported-rtsp.html: Ditto.
        * media/video-currentTime-set-expected.txt: Ditto.
        * media/video-currentTime-set.html: Ditto.
        * media/video-error-does-not-exist-expected.txt: Ditto.
        * media/video-error-does-not-exist.html: Ditto.
        * media/video-load-networkState-expected.txt: Ditto.
        * media/video-load-networkState.html: Ditto.
        * media/video-load-readyState-expected.txt: Ditto.
        * media/video-load-readyState.html: Ditto.
        * media/video-loop-expected.txt: Ditto.
        * media/video-loop.html: Ditto.
        * media/video-pause-empty-events-expected.txt: Ditto.
        * media/video-pause-empty-events.html: Ditto.
        * media/video-play-empty-events-expected.txt: Ditto.
        * media/video-play-empty-events.html: Ditto.
        * media/video-play-pause-events-expected.txt: Ditto.
        * media/video-play-pause-events.html: Ditto.
        * media/video-play-pause-exception-expected.txt: Ditto.
        * media/video-play-pause-exception.html: Ditto.
        * media/video-seek-no-src-exception-expected.txt: Test that seeking 
        whene there is no 'src' attribute throws an INVALID_STATE_ERR exception.
        * media/video-seek-no-src-exception.html: 
        * media/video-seek-past-end-playing-expected.txt: Ditto.
        * media/video-seek-past-end-playing.html: Ditto.
        * media/video-seeking-expected.txt: Ditto.
        * media/video-seeking.html: Ditto.
        * media/video-source-add-src-expected.txt: Test that adding a 'src' 
        attribute does nothing when a <source> element has already been chosen.
        * media/video-source-add-src.html: 
        * media/video-src-change-expected.txt: Ditto.
        * media/video-src-change.html: Ditto.
        * media/video-src-invalid-remove-expected.txt: Test that removing invalid 
        'src' attribute triggers <source> elements loading.
        * media/video-src-invalid-remove.html: 
        * media/video-src-plus-source-expected.txt: Test that a <source> element 
        is not used when a bogus 'src' attribute is present.
        * media/video-src-plus-source.html: 
        * media/video-src-remove-expected.txt: Ditto.
        * media/video-src-remove.html: Ditto.
        * media/video-test.js: 
        (findMediaElement):
        (testExpected):
        (waitForEvent):
        (failTest):
        * media/video-timeupdate-during-playback-expected.txt: Test that 'timeupdate' events
        are posted while an element is playing but not while paused.
        * media/video-timeupdate-during-playback.html:

        * platform/mac/Skipped: Skip media/video-error-abort.html for now, need to figure out how to 
        test now that the 'loadstart' event is now fired asynchronously.
        * platform/win/Skipped



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

        Reviewed by Adam Roben.

        <rdar://problem/6704282>
        https://bugs.webkit.org/show_bug.cgi?id=24719
        QTMovieWinTimer logic inversion

        Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always
        use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of
        this was that a movie timer would sometimes be blocked for significant amounts of time 
        because WM_TIMER messages are not processed when the thread's message queue has any
        higher priority messages, and WebCore/Win's timer uses PostMessage for low interval
        timers. Also change SetTimer call to use HWND and custom message instead of 
        timer function since the timer already has an HWND for processing PostMessage.

        Not possible to make a test for this because it is so timing dependant.

        * platform/graphics/win/QTMovieWinTimer.cpp:
        (TimerWindowWndProc):
        (setSharedTimerFireDelay):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-03-23  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

        Reviewed by Adam Roben.

        https://bugs.webkit.org/show_bug.cgi?id=24674
        Crashes in !PLATFORM(MAC)'s formatLocaleDate, in very specific situations

        Make sure strftime never returns 2-digits years to avoid ambiguity
        and a crash. We wrap this new code option in HAVE_LANGINFO_H,
        since it is apparently not available in all platforms.

        * runtime/DatePrototype.cpp:
        (JSC::formatLocaleDate):
        * wtf/Platform.h:

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

        * WebView/WebTextIterator.h: Fixed a spelling error in a comment.



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

        Reviewed by Dan Bernstein

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

        The rect for CSS 'clip' needs to have zooming applied to it.

        Test: fast/css/clip-zooming.html

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Provide JavaScript exception information after slow script timeout

        Reviewed by Oliver Hunt.

JavaScriptCore:

        * runtime/Completion.cpp:
        (JSC::evaluate): Set the exception object as the Completion
        object's value for slow script timeouts.  This is used in
        WebCore when reporting the exception.
        * runtime/ExceptionHelpers.cpp:
        (JSC::InterruptedExecutionError::toString): Added.  Provides a
        description message for the exception when it is reported.

WebCore:

        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::evaluate): Changed to report
        exceptions for the Interrupted completion type as well.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-03-23  Glen Murphy  <glen@chromium.org>

        Reviewed by Darin Fisher.

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

        Fix Skia drawing of highly scaled bitmaps; the conversion to
        IntRect produced visible layout test failures in highly scaled 
        coordinate systems.

        Test: svg/custom/image-small-width-height.svg

        * WebCore\platform\graphics\skia\ImageSkia.cpp:



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

        Reviewed by Darin Adler

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

        Fix three mostly-unrelated problems with full-page zoom:

        * dom/Document.cpp:
        (WebCore::Document::elementFromPoint):
        Document::elementFromPoint() needs to take full-page zoom into account.

        * dom/MouseRelatedEvent.cpp:
        (WebCore::MouseRelatedEvent::receivedTarget):
        Take full-page zoom into account when computing offsetX/offsetY.

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
        Don't use offsetX/offsetY when hit testing list boxes; offsets were broken
        with full-page zoom, and using pageX/pageY is easier because we don't
        have to worry about the event target, and we already have a point in
        absolute coordinates.

        Tests: fast/forms/listbox-hit-test-zoomed.html
               fast/forms/search-zoomed.html
               fast/forms/slider-zoomed.html

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-03-20  Peter Kasting  <pkasting@google.com>

        Reviewed by Darin Fisher.

        https://bugs.webkit.org/show_bug.cgi?id=24720
        RenderThemeChromium should draw something for Slider parts instead of
        dropping them on the floor.

        * platform/chromium/ChromiumBridge.h:
        * rendering/RenderThemeChromiumWin.cpp:
        (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
        (WebCore::RenderThemeChromiumWin::paintSliderTrack):
        (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
        (WebCore::RenderThemeChromiumWin::getThemeData):
        * rendering/RenderThemeChromiumWin.h:
        (WebCore::RenderThemeChromiumWin::paintSliderThumb):



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

        Reviewed by Antti Koivisto.

        Based on a patch by Nico Weber <nicolasweber@gmx.de>

        Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
        https://bugs.webkit.org/show_bug.cgi?id=24755

        * platform/text/TextEncoding.cpp:
        (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding
        is UTF7 without loading extended codecs.
        (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead
        of comparing with UTF7Encoding(). Eliminate the explicit check of
        noExtendedTextEncodingNameUsed() because that's now handled by the functions
        that this function calls instead.

        * platform/text/TextEncoding.h: Added isUTF7Encoding function.
        Also tweaked formatting a bit.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-03-23  Mike Belshe  <mike@belshe.com>

        Reviewed by Darin Adler.

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

        Rework StringImpl::create methods to try to allocate a single buffer
        rather than allocating both the StringImpl class and a separate data
        buffer.

        * platform/text/StringImpl.cpp:
        * platform/text/StringImpl.h:



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

        Reviewed by Antti Koivisto

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

        Fix media controller with full-page zoom. Previously, the media controller
        shadow nodes never saw style changes on the RenderMedia, so did not respond
        to zooming at all. Now, we update the style on the shadow renderers
        whenever RenderMedia gets a style change. Also fix the video thumb in
        the theme to be scaled properly.

        Test: media/video-controls-zoomed.html

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlShadowRootElement::updateStyle):
        (WebCore::MediaTextDisplayElement::MediaTextDisplayElement):
        (WebCore::MediaTextDisplayElement::updateStyle):
        (WebCore::MediaControlInputElement::MediaControlInputElement):
        (WebCore::MediaControlInputElement::updateStyle):
        * rendering/MediaControlElements.h:
        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::styleDidChange):
        * rendering/RenderMedia.h:
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::adjustSliderThumbSize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-03-23  Darin Fisher  <darin@chromium.org>

        Reviewed by Antti Koivisto.

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

        Adds a unique across-browser-sessions identifier to FormData, which may
        be used by ResourceHandle as a secondary cache key to enable cached
        form submissions.

        At issue: two otherwise identical form submissions may result in
        completely independent responses, which may each be appropriate to
        store and reuse from cache.

        * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
        we only enable cached form submissions for those generated by HTML.  This
        way we do not bother with POSTs generated by XMLHttpRequest.
        (WebCore::generateFormDataIdentifier):
        (WebCore::HTMLFormElement::createFormData):
        * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
        the unspecified identifier.  So by default there is no identifier and
        nothing changes.
        (WebCore::FormData::FormData):
        * platform/network/FormData.h: Added m_identifier with setter and getter.
        (WebCore::FormData::setIdentifier):
        (WebCore::FormData::identifier):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-03-23  David Levin  <levin@chromium.org>

        Reviewed by Dimitri Glazkov.

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

        Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
        class names.  Also fixed some headers that got mangled in search/replace
        operations.

        No change in behavior, so no test.

        * bindings/v8/V8NodeFilter.h: Removed.
        * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
        * bindings/v8/V8NodeFilterCondition.h: Added.
        * bindings/v8/custom/V8ClipboardCustom.cpp:
        * bindings/v8/custom/V8DocumentCustom.cpp:
        * bindings/v8/custom/V8ElementCustom.cpp:
        * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
        * bindings/v8/custom/V8NavigatorCustom.cpp:

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

        Reviewed by Sam Weinig.

        * platform/KURL.h: Removed now-incorrect comments.
        None of the parts include the separator characters any more, now that
        query doesn't include the "?", so the comments explaining which do and do
        not are no-longer helpful.



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

        Reviewed by Anders Carlsson.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
        REGRESSION: Java Applets broken
        <rdar://problem/6707494>

        Fix loading Java applets without a codeBase. Only pass the base (up to the
        the last path component) of the baseURL to the plug-in.

        * html/HTMLAppletElement.cpp:
        (WebCore::HTMLAppletElement::createRenderer):
        * platform/KURL.cpp:
        (WebCore::KURL::baseAsString):
        * platform/KURL.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        https://bugs.webkit.org/show_bug.cgi?id=24762
        Support text-indent in <option> elements on windows platform.

        Reviewed by Adele Peterson.

        * css/themeWin.css:
        * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now.  Make this
        explicit via windows themed default stylesheet.
        (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
        (WebCore::PopupMenuStyle::textIndent):
        (WebCore::PopupMenuStyle::textDirection):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and 
        text-indent is specified with LTR direction.
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
        (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
        (WebCore::RenderMenuList::menuStyle): Ditto.
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added.  Default is false since we are only supporting it in windows for now.
        * rendering/RenderThemeWin.h:
        (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make testapi run as part of the standard JavaScriptCore tests.

Reviewed by Geoff Garen.

We only run testapi on the mac as currently windows webkit doesn't
place all the necessary files for testapi, and we also test the
JSC/CF APIs as well.

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