11 years ago2009-03-23 Darin Adler <darin@apple.com>
darin@apple.com [Mon, 23 Mar 2009 16:47:16 +0000 (16:47 +0000)]
2009-03-23  Darin Adler  <darin@apple.com>

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

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

11 years ago2009-03-23 Gustavo Noronha Silva <gns@gnome.org> and Thadeu Lima de Souza Cascardo...
kov@webkit.org [Mon, 23 Mar 2009 15:13:57 +0000 (15:13 +0000)]
2009-03-23  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

        Reviewed by Adam Roben.

        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:
        * wtf/Platform.h:

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

11 years ago2009-03-23 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Mon, 23 Mar 2009 15:07:55 +0000 (15:07 +0000)]
2009-03-23  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adam Roben.

        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:

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

11 years ago2009-03-23 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Mon, 23 Mar 2009 15:02:34 +0000 (15:02 +0000)]
2009-03-23  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adele Peterson.


        Update media element implementation to current HTML5 spec

        New tests:

        * 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::setNetworkState): Updated for new spec network states.
        (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.

        * 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
        (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
        (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
        (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.

        * 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.
        * 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
        (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.

        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:
        * 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: https://svn.webkit.org/repository/webkit/trunk@41907 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years ago2009-03-21 Xan Lopez <xlopez@igalia.com>
xan@webkit.org [Mon, 23 Mar 2009 12:43:09 +0000 (12:43 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@41906 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix exception handling in API
oliver@apple.com [Mon, 23 Mar 2009 06:01:46 +0000 (06:01 +0000)]
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: https://svn.webkit.org/repository/webkit/trunk@41905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 years agoFix instanceof implementation to handle API object overriding hasInstance
oliver@apple.com [Mon, 23 Mar 2009 04:31:39 +0000 (04:31 +0000)]
Fix instanceof implementation to handle API object overriding hasInstance

Reviewed by Cameron Zwarich.

We can only take the fast paths for instanceof if the object doesn't override
hasInstance, so we have to check for that.

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

11 years ago Reviewed by John Sullivan.
mitz@apple.com [Mon, 23 Mar 2009 03:46:17 +0000 (03:46 +0000)]
    Reviewed by John Sullivan.

        - fix <rdar://problem/6640741> Messages not displaying after the
          Safari 4 beta was installed

        Mail assumes that if -[WebArchive subresources] is not nil, then it
        contains at least one object.

        * WebView/WebArchive.mm:
        (-[WebArchive subresources]): Preserve the behavior of returning nil
        if there are no subresources.

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

11 years ago2009-03-22 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Sun, 22 Mar 2009 19:50:18 +0000 (19:50 +0000)]
2009-03-22  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein


        Image-map code in RenderImage could result in RenderImage::nodeAtPoint()
        setting HitTestResult::innerNode(), but returning false, which violates
        hit testing rules. Use a temporary HitTestResult so that we only fill in
        result when we know we've hit.

        * rendering/RenderImage.cpp:

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

11 years agowxGTK build fix. Add missing header.
kevino@webkit.org [Sun, 22 Mar 2009 19:45:33 +0000 (19:45 +0000)]
wxGTK build fix. Add missing header.

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

11 years ago2009-03-22 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Sun, 22 Mar 2009 18:43:32 +0000 (18:43 +0000)]
2009-03-22  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein


        Fix hit testing regression from r41840. We need to pass the temporary
        HitTestResult when testing sublayers, then only copy to 'result' when
        the layer is known to have been hit.

        Test: fast/layers/zindex-hit-test.html

        * rendering/RenderLayer.cpp:

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

11 years ago2009-03-20 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Sun, 22 Mar 2009 17:35:38 +0000 (17:35 +0000)]
2009-03-20  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Darin Adler


        Fix hit testing on video controls after full page zoom by fixing wider issue
        with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be
        invariant under zooming (for JavaScript), so we keep an actual page point around
        in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere.

        * dom/MouseRelatedEvent.cpp:
        * dom/MouseRelatedEvent.h:
        Member var, and getter and setter for absoluteLocation.
        New method, computePageLocation(), to compute the actual page point,
        and call it when creating and initting mouse-related events.

        * dom/Node.cpp:
        Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation()
        on the event to replace a potentially rounded point.

        * html/HTMLInputElement.cpp:
        Clean up slider handling code.

        * html/HTMLSelectElement.cpp:
        Add FIXME comment for use of offsetX/offsetY.

        * page/ContextMenuController.cpp:
        Use absoluteLocation() when hit testing for context menus.

        * rendering/RenderFrameSet.cpp:
        Use absoluteLocation() when resizing frames.

        * rendering/RenderMedia.cpp:
        Use absoluteLocation() when hit testing media controls.

        * rendering/RenderSlider.cpp:
        Use absoluteLocation() when handling slider events.

        Factor some code out of HTMLInputElement::defaultEventHandler().

        * rendering/RenderTextControlSingleLine.cpp:
        Use absoluteLocation() when hit testing search field buttons, which fixees
        bugs in the search field with zooming.

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

11 years ago2009-03-21 David Levin <levin@chromium.org>
levin@chromium.org [Sun, 22 Mar 2009 07:34:29 +0000 (07:34 +0000)]
2009-03-21  David Levin  <levin@chromium.org>

        Reviewed by Dimitri Glazkov.

        Add V8XMLHttpRequest*.

        * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added.
        * bindings/v8/V8XMLHttpRequestUtilities.h: Added.
        * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added.
        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added.
        * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added.

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

11 years ago2009-03-21 David Levin <levin@chromium.org>
levin@chromium.org [Sun, 22 Mar 2009 07:34:18 +0000 (07:34 +0000)]
2009-03-21  David Levin  <levin@chromium.org>

        Reviewed by Dimitri Glazkov.

        Add V8NodeFilter.

        * bindings/v8/V8NodeFilter.cpp: Added.
        * bindings/v8/V8NodeFilter.h: Added.

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

11 years ago2009-03-21 Cameron Zwarich <cwzwarich@uwaterloo.ca>
cwzwarich@webkit.org [Sun, 22 Mar 2009 03:01:59 +0000 (03:01 +0000)]
2009-03-21  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver Hunt.

        Bug 20049: testapi failure: MyObject - 0 should be NaN but instead is 1.

        In this case, the test is wrong. According to the ECMA spec, subtraction
        uses ToNumber, not ToPrimitive. Change the test to match the spec.

        * API/tests/testapi.js:

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

11 years agoEnsure that JSObjectMakeFunction doesn't produce incorrect line numbers.
oliver@apple.com [Sun, 22 Mar 2009 02:52:41 +0000 (02:52 +0000)]
Ensure that JSObjectMakeFunction doesn't produce incorrect line numbers.

Reviewed by Cameron Zwarich.

Also make test api correctly propagate failures.

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

11 years agoMake build-jsc build testapi and minidom in addition to jsc itself.
oliver@apple.com [Sun, 22 Mar 2009 01:40:26 +0000 (01:40 +0000)]
Make build-jsc build testapi and minidom in addition to jsc itself.

Reviewed by Mark Rowe.

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

11 years agoImprove testapi by making it report failures in a way we can pick up
oliver@apple.com [Sun, 22 Mar 2009 01:40:22 +0000 (01:40 +0000)]
Improve testapi by making it report failures in a way we can pick up
from our test scripts.

Reviewed by Mark Rowe.

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

11 years ago Rubber-stamped by Kevin Decker
mitz@apple.com [Sat, 21 Mar 2009 18:34:36 +0000 (18:34 +0000)]
    Rubber-stamped by Kevin Decker

        - remove some redundant #include statements

        * bindings/js/JSDOMWindowBase.cpp:

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

11 years agoRevert "2009-03-20 Mike Hommey <glandium@debian.org>"
xan@webkit.org [Sat, 21 Mar 2009 18:15:55 +0000 (18:15 +0000)]
Revert "2009-03-20  Mike Hommey  <glandium@debian.org>"

This reverts commit 2ee472cbd180a196c08f3386b2b976d540a1d9e2.

Breaks JIT on x86 (at least linux) massively.

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

11 years agoRevert "2009-03-20 Mike Hommey <glandium@debian.org>"
xan@webkit.org [Sat, 21 Mar 2009 18:15:43 +0000 (18:15 +0000)]
Revert "2009-03-20  Mike Hommey  <glandium@debian.org>"

This reverts commit cb79d9c35d714a9e463a188a5cb295033715308e.

Breaks JIT on x86 (at least linux) massively.

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

11 years ago Reviewed by Mark Rowe.
mitz@apple.com [Sat, 21 Mar 2009 06:02:24 +0000 (06:02 +0000)]
    Reviewed by Mark Rowe.

        - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code

        * platform/graphics/win/FontCGWin.cpp:
        (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each
        glyph as a separate path, instead of all glyphs as a single path. This
        matches what CGContextShowGlyphsWithAdvances() does, and has comparable

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

11 years ago2009-03-20 Dean Jackson <dino@apple.com>
dino@apple.com [Sat, 21 Mar 2009 01:47:31 +0000 (01:47 +0000)]
2009-03-20  Dean Jackson  <dino@apple.com>

        Reviewed by Simon Fraser

        Build fix for ENABLE(3D_RENDERING)

        * rendering/RenderObject.h:

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

11 years ago2009-03-20 Mike Hommey <glandium@debian.org>
jmalonzo@webkit.org [Sat, 21 Mar 2009 01:29:21 +0000 (01:29 +0000)]
2009-03-20  Mike Hommey  <glandium@debian.org>

        Reviewed by Gavin Barraclough. Landed by Jan Alonzo.

        Enable JIT on x86-64

        Enable JIT on x86-64 gtk+

        * configure.ac:
        * JavaScriptCore/GNUmakefile.am:

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

11 years ago2009-03-20 Mike Hommey <glandium@debian.org>
jmalonzo@webkit.org [Sat, 21 Mar 2009 01:18:16 +0000 (01:18 +0000)]
2009-03-20  Mike Hommey  <glandium@debian.org>

        Reviewed by Mark Rowe. Committed by Jan Alonzo.

        Use the proper definition of RETURN_PAIR on !MSVC

        The other version is actually a work around for a quirk in the windows
        ABI, so checking whether we're under MSVC is more a appropriate check for
        it. It also happens this workaround is not 64-bits safe, so we also error
        out on x86-64 MSVC.

        Thanks Gavin Barraclough.

        * jit/JITStubs.h:

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

11 years ago2009-03-20 Adele Peterson <adele@apple.com>
adele@apple.com [Sat, 21 Mar 2009 00:57:55 +0000 (00:57 +0000)]
2009-03-20  Adele Peterson  <adele@apple.com>

        Build fix.

        Reviewed by Darin Adler.

        * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]):

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

11 years ago2009-03-20 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Sat, 21 Mar 2009 00:15:39 +0000 (00:15 +0000)]
2009-03-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed a JavaScriptCore crash on the Windows buildbot.

        * bytecompiler/BytecodeGenerator.h: Reduced the AST recursion limit.
        Apparently, Windows has small stacks.

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

11 years ago2009-03-20 Tony Chang <tony@chromium.org>
levin@chromium.org [Fri, 20 Mar 2009 23:46:24 +0000 (23:46 +0000)]
2009-03-20  Tony Chang  <tony@chromium.org>

        Reviewed by Alexey Proskuryakov.


        Change the layout test from using a data: URL to using a file:///
        URL for the iframe.  If DRT's frame loader has
        AllowLocalLoadsForLocalOnly, then it's not possible to load an image
        from disk into the iframe.  Since this test is about D&D, not
        local load checks, switch to a local file that doesn't have this

        This should fix the test on win DRT as well.

        * fast/events/resources/standalone-image-drag-to-editable-frame.html: Added.
        * fast/events/standalone-image-drag-to-editable.html:

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

11 years ago2009-03-20 Dave Moore <davemoore@google.com>
levin@chromium.org [Fri, 20 Mar 2009 23:46:18 +0000 (23:46 +0000)]
2009-03-20  Dave Moore  <davemoore@google.com>

        Reviewed by Dimitri Glazkov.


        A bug in the V8 bindings is preventing chromium from setting the href on the
        location object...any attempt throws a security error, not just for javascript

        * page/Location.idl:

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

11 years ago2009-03-20 Craig Schlenter <craig.schlenter@gmail.com>
levin@chromium.org [Fri, 20 Mar 2009 23:46:12 +0000 (23:46 +0000)]
2009-03-20  Craig Schlenter  <craig.schlenter@gmail.com>

        Reviewed by Dimitri Glazkov.


        Include stdio.h needed for printf on gcc 4.4.0

        * platform/KURLGoogle.cpp:

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

11 years ago2009-03-20 Mike Belshe <mike@belshe.com>
levin@chromium.org [Fri, 20 Mar 2009 23:46:04 +0000 (23:46 +0000)]
2009-03-20  Mike Belshe <mike@belshe.com>

        Reviewed by Darin Fisher.


        Don't let comments at the end of an event handler
        break the event handler.

        No change in behavior, so no test.

        * bindings/v8/V8LazyEventListener.cpp:

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

11 years agoJavaScriptCore:
levin@chromium.org [Fri, 20 Mar 2009 23:45:58 +0000 (23:45 +0000)]

2009-03-20  Norbert Leser  <norbert.leser@nokia.com>

        Reviewed by Darin Adler.


        Fixes missing line terminator character (;) after macro call.
        It is common practice to add the trailing ";" where macros are substituted
        and not where they are defined with #define.
        This change is consistent with other macro declarations across webkit,
        and it also solves compilation failure with symbian compilers.

        * runtime/UString.cpp:
        * wtf/Assertions.h:


2009-03-20  Norbert Leser  <norbert.leser@nokia.com>

        Reviewed by Darin Adler.


        Fixes missing line terminator character (;) after macro call.
        It is common practice to add the trailing ";" where macros are substituted
        and not where they are defined with #define.
        This change is consistent with other macro declarations across webkit,
        and it also solves compilation failure with symbian compilers.

        No change in behavior, so no test.

        * bindings/js/JSDOMWindowShell.cpp:
        * bindings/js/JSEventListener.cpp:
        * bindings/js/JSImageConstructor.cpp:
        * bindings/js/JSInspectedObjectWrapper.cpp:
        * bindings/js/JSInspectorCallbackWrapper.cpp:
        * bindings/js/JSNamedNodesCollection.cpp:
        * bindings/js/JSNodeFilterCondition.cpp:
        * bindings/js/JSOptionConstructor.cpp:
        * bindings/js/JSQuarantinedObjectWrapper.cpp:
        * bindings/js/JSRGBColor.cpp:
        * bindings/js/JSWorkerContextBase.cpp:
        * bindings/js/JSXMLHttpRequestConstructor.cpp:
        * bindings/js/JSXSLTProcessorConstructor.cpp:
        * bindings/scripts/CodeGeneratorJS.pm:

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

11 years ago2009-03-20 Mike Belshe <mike@belshe.com>
levin@chromium.org [Fri, 20 Mar 2009 23:45:45 +0000 (23:45 +0000)]
2009-03-20  Mike Belshe  <mike@belshe.com>

        Reviewed by Dimitri Glazkov and Dave Hyatt.


        Make the minimum timer configurable for different platforms.

        * page/DOMTimer.cpp:
        * page/DOMTimer.h:

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

11 years ago2009-03-20 Dean McNamee <deanm@chromium.org>
levin@chromium.org [Fri, 20 Mar 2009 23:45:37 +0000 (23:45 +0000)]
2009-03-20  Dean McNamee  <deanm@chromium.org>

        Reviewed by Darin Adler.


        Make sure to consistently match new/delete and fastMalloc/fastFree.

        * css/CSSSelectorList.cpp:

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

11 years agoWebCore:
mitz@apple.com [Fri, 20 Mar 2009 23:41:54 +0000 (23:41 +0000)]

        Reviewed by Dave Hyatt.

        - fix https://bugs.webkit.org/show_bug.cgi?id=23739
          <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::percentHeightDescendants): Added this accessor.
        * rendering/RenderBlock.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::layoutRows): Extended the check for
        children that flex to include other descendants with percent height
        which is relative to the cell.


        Reviewed by Dave Hyatt.

        - test, updated test and results for https://bugs.webkit.org/show_bug.cgi?id=23739
          <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load

        * fast/replaced/percent-height-in-anonymous-block-in-table.html: Added.
        * fast/replaced/table-percent-height-expected.txt:
        * fast/replaced/table-percent-height.html:
        * platform/mac/fast/replaced/percent-height-in-anonymous-block-in-table-expected.checksum: Added.
        * platform/mac/fast/replaced/percent-height-in-anonymous-block-in-table-expected.png: Added.
        * platform/mac/fast/replaced/percent-height-in-anonymous-block-in-table-expected.txt: Added.

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

11 years ago2009-03-20 Dmitry Titov <dimich@chromium.org>
dimich@chromium.org [Fri, 20 Mar 2009 23:29:22 +0000 (23:29 +0000)]
2009-03-20  Dmitry Titov  <dimich@chromium.org>

        Fix broken LayoutTest/http/tests/workers/text-encoding.html.
        Forgot to add a new file with the previous patch.

        * http/tests/workers/resources/subworker-encoded.php: Added.

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

11 years ago2009-03-20 Alpha Lam <hclam@chromium.org>
darin@chromium.org [Fri, 20 Mar 2009 23:24:22 +0000 (23:24 +0000)]
2009-03-20  Alpha Lam  <hclam@chromium.org>

        Reviewed by Darin Fisher.


        The test in this change is just to verify a no crash.  Full tree
        dump is not necessary, so change to test to dumpAsText and update
        the affected test results.

        * fast/block/float/crash-on-absolute-positioning-expected.txt: Added.
        * fast/block/float/crash-on-absolute-positioning.html:
        * platform/mac/fast/block/float/crash-on-absolute-positioning-expected.txt: Removed.

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

11 years ago2009-03-20 Jan Michael Alonzo <jmalonzo@gmail.com>
jmalonzo@webkit.org [Fri, 20 Mar 2009 23:03:15 +0000 (23:03 +0000)]
2009-03-20  Jan Michael Alonzo  <jmalonzo@gmail.com>

        Not reviewed. Fix style issues with my previous commit (r41866) as
        suggested by Holger in https://bugs.webkit.org/show_bug.cgi?id=24493

        * tests/testwebhistoryitem.c:

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

11 years ago2009-03-20 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 20 Mar 2009 22:56:27 +0000 (22:56 +0000)]
2009-03-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        A little cleanup in the RegisterFile code.

        Moved large inline functions out of the class declaration, to make it
        more readable.

        Switched over to using the roundUpAllocationSize function to avoid
        duplicate code and subtle bugs.

        Renamed m_maxCommitted to m_commitEnd, to match m_end.

        Renamed allocationSize to commitSize because it's the chunk size for
        committing memory, not allocating memory.

        SunSpider reports no change.

        * interpreter/RegisterFile.h:
        * jit/ExecutableAllocator.h:

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

11 years agoWebCore:
dimich@chromium.org [Fri, 20 Mar 2009 22:52:13 +0000 (22:52 +0000)]

2009-03-20  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Remove ScriptExecutionContext::encoding() since Workers do not need it.
        WorkerContext::encoding() is simply removed, while Document::encoding()
        made non-virtual and private. Workers use UTF-8 now except when instructed
        otherwise by http header. Also updated test.

        * dom/Document.h: Made encoding() non-virtual and private.
        * dom/ScriptExecutionContext.h: removed encoding().

        * workers/Worker.cpp:
        * workers/WorkerContext.cpp: removed encoding() implementation.
        * workers/WorkerContext.h: removed encoding()
        * workers/WorkerContextProxy.h:
        * workers/WorkerImportScriptsClient.cpp:
        * workers/WorkerMessagingProxy.cpp:
        * workers/WorkerMessagingProxy.h:
        * workers/WorkerThread.cpp:
        * workers/WorkerThread.h:
        In all these, removed storing encoding and 'inheriting' it from the parent.
        Instead, they are all using UTF-8 now.


2009-03-20  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Remove ScriptExecutionContext::encoding() since Workers do not need it.
        WorkerContext::encoding() is simply removed, while Document::encoding()
        made non-virtual and private. Workers use UTF-8 now except when instructed
        otherwise by http header. Updated test.
        Also, added test for encoding used by importScripts().

        * http/tests/workers/resources/subworker-encoded.php: Added.
        * http/tests/workers/resources/worker-encoded.php:
        * http/tests/workers/text-encoding-expected.txt:
        * http/tests/workers/text-encoding.html:

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

11 years agoChange how threading exceptions are checked so they are reported by what round they...
timothy@apple.com [Fri, 20 Mar 2009 22:40:43 +0000 (22:40 +0000)]
Change how threading exceptions are checked so they are reported by what round they were added.


2009-03-20  Timothy Hatcher  <timothy@apple.com>

        Change how threading exceptions are checked so they are reported
        by what round they were added. That way WebKit can decided the
        behavior per-round based on linked-on-or-after checks.


        Reviewed by Darin Adler.

        * WebCore.base.exp: Export the new symbols.
        * bindings/objc/DOMAbstractView.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
        * platform/ThreadCheck.h:
        * platform/mac/ThreadCheck.mm:
        (WebCore::readThreadViolationBehaviorFromUserDefaults): Refactor how the default is read.
        (WebCore::setDefaultThreadViolationBehavior): Take a round argument.
        (WebCore::reportThreadViolation): Ditto.
        (WebCoreReportThreadViolation): Ditto.


2009-03-20  Timothy Hatcher  <timothy@apple.com>

        Change how threading exceptions are checked so they are reported
        by what round they were added. That way WebKit can decided the
        behavior per-round based on linked-on-or-after checks.


        Reviewed by Darin Adler.

        * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
        * History/WebHistoryItem.mm: Ditto.
        * Misc/WebIconDatabase.mm: Ditto.

        * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro.
        * WebView/WebResource.mm: Ditto.
        (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version
        to truly decide if it is an old Mail client.
        * WebView/WebView.mm: Ditto.

        * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define.
        * WebView/WebFrameView.mm:
        (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round
        based on difference version checks and the Mail workaround check.

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

11 years ago2009-03-20 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Fri, 20 Mar 2009 22:25:46 +0000 (22:25 +0000)]
2009-03-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Only release the result NPVariant if the call to NPN_Invoke was successful.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:

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

11 years ago2009-03-20 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 20 Mar 2009 20:31:10 +0000 (20:31 +0000)]
2009-03-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Fixed up an out-of-date comment.

        * bindings/js/JSDOMWindowCustom.h:

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

11 years ago2009-03-20 Darin Adler <darin@apple.com>
darin@apple.com [Fri, 20 Mar 2009 20:25:34 +0000 (20:25 +0000)]
2009-03-20  Darin Adler  <darin@apple.com>

        Reviewed by Timothy Hatcher.

        * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls
        of this SPI.

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

11 years ago2009-03-20 Jan Michael Alonzo <jmalonzo@gmail.com>
jmalonzo@webkit.org [Fri, 20 Mar 2009 20:23:12 +0000 (20:23 +0000)]
2009-03-20  Jan Michael Alonzo  <jmalonzo@gmail.com>

        Reviewed by Holger Freyther.

        [GTK] Misc patches for WebKitWebHistoryItem

        Added build support for build the WebKitWebHistoryItem unit test.

        * GNUmakefile.am:

2009-03-20  Jan Michael Alonzo  <jmalonzo@gmail.com>

        Reviewed by Holger Freyther.

        [GTK] Misc patches for WebKitWebHistoryItem

        Add unit test for WebKitWebHistoryItem

        * tests/testwebhistoryitem.c: Added.

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

11 years agoWebCore:
bdakin@apple.com [Fri, 20 Mar 2009 19:56:54 +0000 (19:56 +0000)]

2009-03-20  Beth Dakin  <bdakin@apple.com>

        Reviewed by Dave Hyatt.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION
        (r35318): A press release at pfizer.com does not display correctly
        - and corresponding -

        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:


2009-03-20  Beth Dakin  <bdakin@apple.com>

        Reviewed by Dave Hyatt.

        Test for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION
        (r35318): A press release at pfizer.com does not display correctly
        - and corresponding -

        * http/tests/misc/generated-content-inside-table.html: Added.
        * platform/mac/http/tests/misc/generated-content-inside-table-expected.checksum: Added.
        * platform/mac/http/tests/misc/generated-content-inside-table-expected.png: Added.
        * platform/mac/http/tests/misc/generated-content-inside-table-expected.txt: Added.

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

11 years ago2009-03-20 Jan Michael Alonzo <jmalonzo@gmail.com>
jmalonzo@webkit.org [Fri, 20 Mar 2009 19:45:05 +0000 (19:45 +0000)]
2009-03-20  Jan Michael Alonzo  <jmalonzo@gmail.com>

        Reviewed by Holger Freyther.

        Separate gtk unit tests

        Build the unit tests accordingly.

        * GNUmakefile.am:

2009-03-20  Jan Michael Alonzo  <jmalonzo@gmail.com>

        Reviewed by Holger Freyther.

        Separate gtk unit tests

        Split the current single-file unit test to make it more
        modularized and manageable in the future as more unit tests are

        * tests/main.c: Removed.
        * tests/testwebbackforwardlist.c: Copied from WebKit/gtk/tests/main.c.
        * tests/testwebframe.c: Copied from WebKit/gtk/tests/main.c.

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

11 years ago Reviewed by Justin Garcia.
eric@webkit.org [Fri, 20 Mar 2009 18:45:15 +0000 (18:45 +0000)]
    Reviewed by Justin Garcia.

        maxDeepOffset is confusing and should be removed

        Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
        Add first/lastDeepEditingPositionForNode Position creation functions
        and deploy them to places we used to call maxDeepOffset.

        Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
        Add a new Position::atFirst/atLastEditingPositionForNode() and use these
        to replace a few more callers for maxDeepOffset()

        Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)

        "Editing positions" are confusing because they have one
        of two behaviors, depending on if the container node is ignored
        by editing (if editingIgnoresContent(node) returns true) or not.
        Positions referring to nodes ignored by editing are
        neighbor-relative (they are before or after the node) where as
        positions reffering to other nodes are container-relative
        (they are between two child nodes of the container, identified
        by the offset() member).  I will be fixing this confusion in
        future patches.  These renames hopefully make the current behavior clearer.

        * dom/Position.cpp:
        * dom/Position.h:
        * dom/PositionIterator.cpp:
        (WebCore::PositionIterator::operator Position):
        * editing/CompositeEditCommand.cpp:
        * editing/DeleteSelectionCommand.cpp:
        * editing/Editor.cpp:
        * editing/InsertLineBreakCommand.cpp:
        * editing/InsertListCommand.cpp:
        * editing/ReplaceSelectionCommand.cpp:
        * editing/TypingCommand.cpp:
        * editing/VisiblePosition.cpp:
        * editing/VisibleSelection.cpp:
        * editing/htmlediting.cpp:
        * editing/htmlediting.h:
        * editing/visible_units.cpp:
        * page/AccessibilityObject.cpp:
        * page/AccessibilityRenderObject.cpp:
        * rendering/RenderBox.cpp:

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

11 years ago2009-03-20 Dmitry Titov <dimich@chromium.org>
dimich@chromium.org [Fri, 20 Mar 2009 17:32:05 +0000 (17:32 +0000)]
2009-03-20  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Dimitri Glazkov.

        Add (upstream) V8 bindings for Workers. Mostly style cleaning.

        * bindings/v8/WorkerContextExecutionProxy.cpp: Added.
        * bindings/v8/WorkerContextExecutionProxy.h: Added.
        * bindings/v8/WorkerScriptController.cpp: Added.
        * bindings/v8/WorkerScriptController.h: Added.
        * bindings/v8/V8Index.h: Added. This is just a wrapper for v8_index.h, like V8Proxy.h
        * bindings/v8/V8Proxy.h: Added domObjectMap() function that wraps GetDOMObjectMap().
        * bindings/v8/V8WorkerContextEventListener.cpp:
        (WebCore::V8WorkerContextEventListener::callListenerFunction): TrackEvent() renamed trackEvent()

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

11 years ago2009-03-20 Erik L. Bunce <elbunce@xendom.com>
ariya@webkit.org [Fri, 20 Mar 2009 17:27:39 +0000 (17:27 +0000)]
2009-03-20  Erik L. Bunce  <elbunce@xendom.com>

        Reviewed by Tor Arne Vestbø.

        Fix QWebPage::WebActions action states to more closely match when they are
        actually applicable and remove erroneous documentation.

        * Most WebActions implemented using editor commands now use the
          Editor::Command::isEnabled() to control their availability.
        * SelectAll is always enabled (since it's editor command is).
        * SetTextDirection{} family of WebActions are available when canEdit() is true
          and not just canEditRichly().

        Fix and clarify documentation about the availability of various web actions.

        * Api/qwebpage.cpp:
        * tests/qwebpage/tst_qwebpage.cpp:

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

11 years ago2009-03-20 Stephen White <senorblanco@chromium.org>
eric@webkit.org [Fri, 20 Mar 2009 16:39:20 +0000 (16:39 +0000)]
2009-03-20  Stephen White  <senorblanco@chromium.org>

        Reviewed by Eric Seidel.

        Fix for LayoutTests/fast/canvas/canvas-text-alignment.html
        on chromium/skia.  The problem was that the gradient matrix
        for text was being applied twice.  Fixed by reverting some of
        https://bugs.webkit.org/show_bug.cgi?id=23957, so that skiaDrawText
        is no longer responsible for measuring the text and scaling up
        the gradient matrix.  Instead, the text bounding box is passed
        in from SVGPaintServerGradient.  I didn't make this change for CG,
        since it uses a different method (the gradient is drawn using the
        text as a pre-rendered mask).

        * platform/graphics/skia/SkiaFontWin.cpp:
        * svg/graphics/SVGPaintServerGradient.cpp:

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

11 years ago2009-03-20 Darin Adler <darin@apple.com>
darin@apple.com [Fri, 20 Mar 2009 14:50:55 +0000 (14:50 +0000)]
2009-03-20  Darin Adler  <darin@apple.com>

        Reviewed by Adele Peterson.

        Use a better technique to handle finding out if something responds to a selector
        in WebHTMLView's doCommandBySelector method.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame;
        this is already handled by coreCommandBySelector: so doesn't need to be checked
        twice. Got rid of initial value for eventWasHandled boolean to make it more clear.
        Use WebResponderChainSink to find out if a command is handled rather than walking
        the responder chain explicitly.
        (-[WebResponderChainSink initWithResponderChain:]): Added.
        (-[WebResponderChainSink detach]): Added.
        (-[WebResponderChainSink receivedUnhandledCommand]): Added.
        (-[WebResponderChainSink noResponderFor:]): Added.
        (-[WebResponderChainSink doCommandBySelector:]): Added.

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

11 years agoFix the Tiger build, round two.
timothy@apple.com [Fri, 20 Mar 2009 11:09:59 +0000 (11:09 +0000)]
Fix the Tiger build, round two.

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

11 years agoFix the Tiger build.
timothy@apple.com [Fri, 20 Mar 2009 10:54:54 +0000 (10:54 +0000)]
Fix the Tiger build.

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

11 years ago2009-03-20 Xan Lopez <xlopez@igalia.com>
xan@webkit.org [Fri, 20 Mar 2009 10:07:14 +0000 (10:07 +0000)]
2009-03-20  Xan Lopez  <xlopez@igalia.com>

        Rubber-stamped by Holger Freyther.

        There seems to be some rounding error in cairo (or in how we use
        cairo) with some fonts, like DejaVu Sans Mono, which makes cairo
        report a height smaller than ascent + descent, which is wrong and
        confuses WebCore's layout system. Workaround this while we figure
        out what's going on.

        * platform/graphics/gtk/SimpleFontDataGtk.cpp:
        * platform/graphics/gtk/SimpleFontDataPango.cpp:

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

11 years ago Reviewed by Darin Adler.
ap@webkit.org [Fri, 20 Mar 2009 08:16:50 +0000 (08:16 +0000)]
    Reviewed by Darin Adler.

        REGRESSION: DOM Range extractContents/deleteContents failures seen on Moxiecode tests

        Test: fast/dom/Range/deleted-range-endpoints.html

        * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
        to the specification.

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

11 years ago2009-03-19 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 20 Mar 2009 05:57:01 +0000 (05:57 +0000)]
2009-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Fixed <rdar://problem/6033712> -- a little bit of hardening in the Collector.

        SunSpider reports no change. I also verified in the disassembly that
        we end up with a single compare to constant.

        * runtime/Collector.cpp:

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

11 years ago Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
timothy@apple.com [Fri, 20 Mar 2009 04:31:30 +0000 (04:31 +0000)]
    Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
        for Page, so the new RunLoopTimer in WebCore always gets a default mode.
        Fixes the layout test failures on the Tiger build bots.

        Reviewed by Mark Rowe.

        * WebView/WebView.mm:
        (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
        (-[WebView scheduleInRunLoop:forMode:]):
        (-[WebView unscheduleFromRunLoop:forMode:]):

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

11 years agoJavaScriptCore:
ggaren@apple.com [Fri, 20 Mar 2009 04:28:35 +0000 (04:28 +0000)]

2009-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich and Oliver Hunt.

        Fixed <rdar://problem/6406045> REGRESSION: Stack overflow on PowerPC on
        fast/workers/use-machine-stack.html (22531)

        Dialed down the re-entry allowance to 64 (from 128).

        On a 512K stack, this leaves about 64K for other code on the stack while
        JavaScript is running. Not perfect, but it solves our crash on PPC.

        Different platforms may want to dial this down even more.

        Also, substantially shrunk BytecodeGenerator. Since we allocate one on
        the stack in order to throw a stack overflow exception -- well, let's
        just say the old code had an appreciation for irony.

        SunSpider reports no change.

        * bytecompiler/BytecodeGenerator.h:
        * interpreter/Interpreter.h:


2009-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich and Oliver Hunt.

        Re-enabled this test, since it no longer crashes when JavaScriptCore is
        compiled in non-JIT mode.

        * fast/workers/use-machine-stack.html: Copied from fast/workers/use-machine-stack.html-disabled.
        * fast/workers/use-machine-stack.html-disabled: Removed.

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

11 years ago2009-03-19 Cameron Zwarich <cwzwarich@uwaterloo.ca>
cwzwarich@webkit.org [Fri, 20 Mar 2009 02:04:58 +0000 (02:04 +0000)]
2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver Hunt.

        Bug 24350: REGRESSION: Safari 4 breaks SPAW wysiwyg editor multiple instances

        The SPAW editor's JavaScript assumes that toString() on a function
        constructed with the Function constructor produces a function with
        a newline after the opening brace.


        * runtime/FunctionConstructor.cpp:
        (JSC::constructFunction): Add a newline after the opening brace of the
        function's source code.


        * fast/js/function-constructor-newline-after-brace-expected.txt: Added.
        * fast/js/function-constructor-newline-after-brace.html: Added.
        * fast/js/resources/function-constructor-newline-after-brace.js: Added.

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

11 years agoFix fast/text/Geeza-Pro-vertical-metrics-adjustment.html on Leopard by moving the...
mrowe@apple.com [Fri, 20 Mar 2009 01:50:04 +0000 (01:50 +0000)]
Fix fast/text/Geeza-Pro-vertical-metrics-adjustment.html on Leopard by moving the results in to the location
that run-webkit-tests currently looks for them.

Reviewed by Stephanie Lewis.

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

11 years agoJavaScriptCore:
ggaren@apple.com [Fri, 20 Mar 2009 00:52:04 +0000 (00:52 +0000)]

2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Geoff Garen.

        Bug 23771: REGRESSION (r36016): JSObjectHasProperty freezes on global class without kJSClassAttributeNoAutomaticPrototype

        * API/tests/testapi.c:
        (main): Add a test for this bug.
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::resetPrototype): Don't set the prototype of the
        last object in the prototype chain to the object prototype when the
        object prototype is already the last object in the prototype chain.


2009-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Fixed <rdar://problem/6279213> Regular expression run-time complexity
        limit too low for long inputs (21485)

        Added a test for a complex regexp match that should succeed, and one
        that should fail.

        * fast/js/regexp-overflow-expected.txt:
        * fast/js/resources/regexp-overflow.js:

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

11 years agoUpdate test results for changes in handling of CMYK.
mrowe@apple.com [Fri, 20 Mar 2009 00:44:24 +0000 (00:44 +0000)]
Update test results for changes in handling of CMYK.

Reviewed by Sam Weinig.

* fast/canvas/resources/set-colors.js:
* fast/canvas/set-colors-expected.txt:
* platform/mac-leopard/fast/canvas/set-colors-expected.txt: Copied from LayoutTests/fast/canvas/set-colors-expected.txt.

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

11 years ago2009-03-19 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Fri, 20 Mar 2009 00:16:02 +0000 (00:16 +0000)]
2009-03-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)

        If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
        that object would never be updated.

        * page/FrameView.cpp:
        Factor the widget updating code out into this method. Return true if the update set is empty.

        Loop over the update set multiple times until all widgets have been updated or until we reach the cap.

        * page/FrameView.h:

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

11 years ago2009-03-19 Cameron Zwarich <cwzwarich@uwaterloo.ca>
cwzwarich@webkit.org [Fri, 20 Mar 2009 00:03:57 +0000 (00:03 +0000)]
2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Geoff Garen.

        Bug 23771: REGRESSION (r36016): JSObjectHasProperty freezes on global class without kJSClassAttributeNoAutomaticPrototype

        * API/tests/testapi.c:
        (main): Add a test for this bug.
        * runtime/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::resetPrototype): Don't set the prototype of the
        last object in the prototype chain to the object prototype when the
        object prototype is already the last object in the prototype chain.

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

11 years ago Make the defered data loading timer honor the Page's scheduled runloop pairs.
timothy@apple.com [Thu, 19 Mar 2009 23:45:57 +0000 (23:45 +0000)]
    Make the defered data loading timer honor the Page's scheduled runloop pairs.
        Introduces a new RunLoopTimer class that has an API mimicking Timer but
        allows it to be scheduled with one or more SchedulePairs.

        <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers

        Reviewed by Darin Adler.

        * WebCore.xcodeproj/project.pbxproj: Adds the new RunLoopTimer.{cpp,h} files.
        * loader/MainResourceLoader.cpp:
        (WebCore::MainResourceLoader::handleDataLoadNow): Use the MainResourceLoaderTimer typedef.
        (WebCore::MainResourceLoader::startDataLoadTimer): Added. Start the timer and on
        Mac platforms also schedule with the Page's SchedulePairs.
        (WebCore::MainResourceLoader::handleDataLoadSoon): Call startDataLoadTimer().
        (WebCore::MainResourceLoader::setDefersLoading): Ditto.
        * loader/MainResourceLoader.h:
        * platform/cf/RunLoopTimerCF.cpp: Added.
        * platform/RunLoopTimer.h: Added.

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

11 years ago2009-03-19 Gustavo Noronha Silva <gns@gnome.org>
kov@webkit.org [Thu, 19 Mar 2009 21:08:57 +0000 (21:08 +0000)]
2009-03-19 Gustavo Noronha Silva <gns@gnome.org>

Reviewed by Mark Rowe.

        Make determinePassedArchitecture always consume the --32-bit
        option, also in non-AppleMacWebkit platforms. Solution pointed out
        by Mark Rowe.

        * Scripts/webkitdirs.pm:

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

11 years agoAdding scrollbar images for blog post.
hyatt@apple.com [Thu, 19 Mar 2009 20:47:14 +0000 (20:47 +0000)]
Adding scrollbar images for blog post.

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

11 years agoJavaScriptCore:
ggaren@apple.com [Thu, 19 Mar 2009 20:32:49 +0000 (20:32 +0000)]

2009-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Fixed <rdar://problem/6603562> REGRESSION (Safari 4): regular expression
        pattern size limit lower than Safari 3.2, other browsers, breaks SAP (14873)

        Bumped the pattern size limit to 1MB, and standardized it between PCRE
        and WREC. (Empirical testing says that we can easily compile a 1MB regular
        expression without risking a hang. Other browsers support bigger regular
        expressions, but also hang.)

        SunSpider reports no change.

        I started with a patch posted to Bugzilla by Erik Corry (erikcorry@google.com).

        * pcre/pcre_internal.h:
        (getLinkValueAllowZero): Made PCRE's "LINK_SIZE" (the number of bytes
        used to record jumps between bytecodes) 3, to accomodate larger potential
        jumps. Bumped PCRE's "MAX_PATTERN_SIZE" to 1MB. (Technically, at this
        LINK_SIZE, we can support even larger patterns, but we risk a hang during
        compilation, and it's not clear that such large patterns are important
        on the web.)

        * wrec/WREC.cpp:
        (JSC::WREC::Generator::compileRegExp): Match PCRE's maximum pattern size,
        to avoid quirks between platforms.


2009-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Made two layout tests less agressive, to accomodate a change I made
        for <rdar://problem/6603562> REGRESSION (Safari 4): regular expression
        pattern size limit lower than Safari 3.2, other browsers, breaks SAP (14873)

        * fast/js/regexp-charclass-crash-expected.txt:
        * fast/js/regexp-charclass-crash.html: Explicitly limit the number of iterations
        in the test loop. Otherwise, regular expression engines supporting very
        long patterns take a very very very long time to run this test.

        * fast/js/resources/regexp-overflow.js: Made the "too big" regexp in
        this test even bigger, to match our new limit.

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

11 years ago2009-03-19 Dimitri Glazkov <dglazkov@chromium.org>
dglazkov@chromium.org [Thu, 19 Mar 2009 19:56:39 +0000 (19:56 +0000)]
2009-03-19  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Fisher.

        Upstream miscellaneous bindings changes.

        * bindings/v8/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
        * bindings/v8/ScriptCallStack.h: Added an extra include.

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

11 years ago2009-03-19 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 19 Mar 2009 19:14:10 +0000 (19:14 +0000)]
2009-03-19  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dave Hyatt


        When hit testing a RenderLayer whose parent lives in a preserves-3D hierarchy,
        we need to compare the computed z-offset with the depth-test z-offset before
        deciding that such a RenderLayer was hit. This fixes an issue, tested by the
        3d-point-mapping-overlapping.html test, where the child of a transformed element
        is found by hit testing, even when some other element with greater Z overlaps
        them both.

        Improved the code by adding a utility method, isHitCandidate(), which computes and tests
        z-depth when necessary.

        Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html

        * rendering/RenderLayer.cpp:

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

11 years ago2009-03-19 Jeremy Moskovich <jeremy@chromium.org>
dglazkov@chromium.org [Thu, 19 Mar 2009 16:43:30 +0000 (16:43 +0000)]
2009-03-19  Jeremy Moskovich  <jeremy@chromium.org>

        Reviewed by Dimitri Glazkov.

        Split ColorChromium.cpp into Mac & Windows variants.
        Remove Chromium Dependency on platform/graphics/mac/ColorMac.mm since we
        ultimately need to take a different approach.  For now, createCGColor()
        is copied from ColorMac.mm.

        No observable change in behavior, so no test.

        * platform/graphics/chromium/ColorChromium.cpp:
        * platform/graphics/chromium/ColorChromiumMac.mm: Added.

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

11 years agoFix WebCore/ChangeLog entry, add missing reviewer line.
dglazkov@chromium.org [Thu, 19 Mar 2009 16:36:49 +0000 (16:36 +0000)]
Fix WebCore/ChangeLog entry, add missing reviewer line.

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

11 years ago2009-03-19 Scott Violet <sky@google.com>
dglazkov@chromium.org [Thu, 19 Mar 2009 16:35:04 +0000 (16:35 +0000)]
2009-03-19  Scott Violet  <sky@google.com>

        Reviewed by Simon Fraser.

        Transitions tests somewhat flakey on Chromium.

        Modifies transitions/transition-end-event-helpers.js to only process
        results once.

        * transitions/transition-end-event-helpers.js:

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

11 years ago2009-03-19 Pavel Feldman <pfeldman@chromium.org>
dglazkov@chromium.org [Thu, 19 Mar 2009 16:29:50 +0000 (16:29 +0000)]
2009-03-19  Pavel Feldman  <pfeldman@chromium.org>

        Reviewed by Dimitri Glazkov.

        Unforking frontend: add custom InspectorController methods

        * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.

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

11 years ago2009-03-19 Jay Campan <jcampan@google.com>
dglazkov@chromium.org [Thu, 19 Mar 2009 16:26:45 +0000 (16:26 +0000)]
2009-03-19  Jay Campan  <jcampan@google.com>

        Adding an accessor to the currently selected index in the PopupMenuChromium.
        This is required for implementing the deletion of an autocomplete entry in Chromium.

        * platform/chromium/PopupMenuChromium.cpp:
        * platform/chromium/PopupMenuChromium.h:

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

11 years ago2009-03-19 Evan Stade <estade@chromium.org>
darin@chromium.org [Thu, 19 Mar 2009 16:09:57 +0000 (16:09 +0000)]
2009-03-19  Evan Stade  <estade@chromium.org>

        Reviewed by Dimitri Glazkov.

        Improve windows skia text stroking.

        Test: LayoutTests/svg/custom/struct-use-09-b.svg

        * platform/graphics/skia/SkiaFontWin.cpp: Close the path representing
        each font glyph polygon, rather than only closing the path once per
        letter. This fixes stroking for letters with multiple polygons, such
        as 'A' or 'D'.

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

11 years agoOops, bail out last patch, that was incorrect.
hausmann@webkit.org [Thu, 19 Mar 2009 16:06:44 +0000 (16:06 +0000)]
Oops, bail out last patch, that was incorrect.

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

11 years ago2009-03-19 Laurent Montel <montel@kde.org>
hausmann@webkit.org [Thu, 19 Mar 2009 15:59:06 +0000 (15:59 +0000)]
2009-03-19  Laurent Montel  <montel@kde.org>

        Reviewed by Simon Hausmann.

        Another fix for pedantic compilation in QtWebKit

        (patch from qt-copy)

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

11 years ago2009-03-19 Ariya Hidayat <ariya.hidayat@trolltech.com>
hausmann@webkit.org [Thu, 19 Mar 2009 15:16:24 +0000 (15:16 +0000)]
2009-03-19  Ariya Hidayat <ariya.hidayat@trolltech.com>

        Reviewed by Simon Hausmann.

        Fixes pedantic compilation in QtWebKit.

        There are no semi-colons after namespace declarations.

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

11 years ago2009-03-19 David Boddie <dboddie@trolltech.com>
hausmann@webkit.org [Thu, 19 Mar 2009 15:16:16 +0000 (15:16 +0000)]
2009-03-19  David Boddie  <dboddie@trolltech.com>

        Reviewed by Simon Hausmann.

        Doc: Removed obsolete warning about Flash and other plugins.

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

11 years ago2009-03-19 Paul Olav Tvete <paul.tvete@nokia.com>
hausmann@webkit.org [Thu, 19 Mar 2009 15:16:07 +0000 (15:16 +0000)]
2009-03-19  Paul Olav Tvete  <paul.tvete@nokia.com>

        Reviewed by Simon Hausmann.

        Properly escape tooltip text

        ManualTest: http://xkcd.com/554/

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

11 years ago2009-03-19 Simon Hausmann <simon.hausmann@nokia.com>
hausmann@webkit.org [Thu, 19 Mar 2009 15:08:21 +0000 (15:08 +0000)]
2009-03-19  Simon Hausmann  <simon.hausmann@nokia.com>

        Reviewed by Tor Arne Vestbø.

        Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.

        Removed dead code for distinguishing between Widget and PluginView in the Qt port.

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

11 years agoWork around <rdar://problem/6698023> by activating fonts from disk.
mrowe@apple.com [Thu, 19 Mar 2009 08:06:31 +0000 (08:06 +0000)]
Work around <rdar://problem/6698023> by activating fonts from disk.

Reviewed by Oliver Hunt.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Copy fonts into DumpRenderTree.resources
in the built products directory.
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateFonts): Activate the fonts from disk.

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

11 years ago2009-03-19 Cameron Zwarich <cwzwarich@uwaterloo.ca>
cwzwarich@webkit.org [Thu, 19 Mar 2009 07:55:59 +0000 (07:55 +0000)]
2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver Hunt.

        Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage

        JSDOMWindow::customGetOwnPropertySlot() does an access check after calling
        JSGlobalObject::getOwnPropertySlot(). This causes the PropertySlot to be
        set twice, once to the value that is illegal to access, and then to undefined
        This causes an assertion failure in property access caching code.

        The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().


        * bindings/js/JSDOMWindowCustom.h:


        * http/tests/security/cross-frame-access-get-custom-property-cached-expected.txt: Added.
        * http/tests/security/cross-frame-access-get-custom-property-cached.html: Added.
        * http/tests/security/resources/cross-frame-access-get-custom-property-cached-iframe.html: Added.
        * http/tests/security/resources/cross-frame-access.js:

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

11 years ago Reviewed by Sam Weinig.
ap@webkit.org [Thu, 19 Mar 2009 07:32:40 +0000 (07:32 +0000)]
    Reviewed by Sam Weinig.

        Simple cross-origin requests shouldn't dispatch upload progress events

        Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html

        * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
        explaining the somewhat unexpected behavior of this function.

        * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
        * xml/XMLHttpRequestUpload.h:
        Report whether there are any event listeners registered.

        * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::createRequest): Set m_uploadEventsAllowed flag.
        (WebCore::XMLHttpRequest::makeSameOriginRequest): Ditto.
        (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest): Ditto.
        (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Set request body - it can be
        non-empty for POST requests.
        (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight): Set m_uploadEventsAllowed flag.
        (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): Ditto.
        (WebCore::XMLHttpRequest::abort): Only dispatch upload progress events if allowed.
        (WebCore::XMLHttpRequest::networkError): Ditto.
        (WebCore::XMLHttpRequest::abortError): Ditto.
        (WebCore::XMLHttpRequest::didSendData): Ditto.

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

11 years ago2009-03-18 Marc-Antoine Ruel <maruel@chromium.org>
darin@chromium.org [Thu, 19 Mar 2009 06:18:16 +0000 (06:18 +0000)]
2009-03-18  Marc-Antoine Ruel  <maruel@chromium.org>

        Reviewed by Darin Fisher.

        Fix a crash when loading a svg file in Chromium's test_shell and
        then reloading the page.

        * history/BackForwardListChromium.cpp:

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

11 years ago Rolling out r41818 since it broke the windows build.
adachan@apple.com [Thu, 19 Mar 2009 04:42:21 +0000 (04:42 +0000)]
    Rolling out r41818 since it broke the windows build.
        Error: ..\..\runtime\DatePrototype.cpp(30) : fatal error C1083: Cannot open include file: 'langinfo.h': No such file or directory

        * runtime/DatePrototype.cpp:

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

11 years agoSkip plugins/netscape-throw-exception.html due to <rdar://problem/6530010>.
mrowe@apple.com [Thu, 19 Mar 2009 01:54:34 +0000 (01:54 +0000)]
Skip plugins/netscape-throw-exception.html due to <rdar://problem/6530010>.

Reviewed by Sam Weinig.

* platform/mac-snowleopard/Skipped:

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

11 years agoDisable pluginDocumentView-deallocated-dataSource.html as it has not tested
mrowe@apple.com [Thu, 19 Mar 2009 01:29:01 +0000 (01:29 +0000)]
Disable pluginDocumentView-deallocated-dataSource.html as it has not tested
what it was designed to test for some time, and is failing on some machines.
Fixing the test is tracked by <https://bugs.webkit.org/show_bug.cgi?id=24690>.

Rubber-stamped by Dan Bernstein.

* platform/mac/plugins/pluginDocumentView-deallocated-dataSource.html-disabled: Renamed from LayoutTests/platform/mac/plugins/pluginDocumentView-deallocated-dataSource.html.

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

11 years ago2009-03-18 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 19 Mar 2009 00:57:41 +0000 (00:57 +0000)]
2009-03-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver Hunt.

        WebKit side of <rdar://problem/6688244>.

        Try reinitializing the vendor port if it's invalid.

        * Plugins/Hosted/NetscapePluginHostManager.mm:

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

11 years ago<rdar://problem/6693300> Don't rely on printf from TestNetscapePlugIn appearing in...
mrowe@apple.com [Thu, 19 Mar 2009 00:49:13 +0000 (00:49 +0000)]
<rdar://problem/6693300> Don't rely on printf from TestNetscapePlugIn appearing in test results

Reviewed by Dan Bernstein.

Switch from using printf to using the NPAPI to invoke console.log so that plug-in messages appear
in test results even when the plug-in's stdout differs from DumpRenderTree's stdout.

* DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
(log): Invoke console.log via the NPAPI.
(NPP_Destroy): Call log instead of printf.
(NPP_SetWindow): Ditto.
(handleEventCarbon): Ditto.
(handleEventCocoa): Ditto.
(NPP_HandleEvent): Pass the instance in to the event handler.

Update test results for change to address <rdar://problem/6693300>.

* plugins/mouse-events-expected.txt:
* plugins/netscape-destroy-plugin-script-objects-expected.txt:
* plugins/netscape-plugin-setwindow-size-2-expected.txt:
* plugins/netscape-plugin-setwindow-size-expected.txt:
* plugins/open-and-close-window-with-plugin-expected.txt:

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

11 years ago2009-03-18 Gustavo Noronha Silva <gns@gnome.org> and Thadeu Lima de Souza Cascardo...
kov@webkit.org [Wed, 18 Mar 2009 23:21:51 +0000 (23:21 +0000)]
2009-03-18  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>

        Reviewed by Darin Adler.

        Crashes in !PLATFORM(MAC)'s formatLocaleDate, in very specific situations

        Make sure strftime never returns 2-digits years to avoid ambiguity and
        a crash.

        * runtime/DatePrototype.cpp:

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

11 years ago Add webViewClosing to private UI delegate.
sfalken@apple.com [Wed, 18 Mar 2009 23:09:23 +0000 (23:09 +0000)]
    Add webViewClosing to private UI delegate.

        Reviewed by Adam Roben.

        * Interfaces/IWebUIDelegatePrivate.idl:
        * Interfaces/WebKit.idl:
        * WebView.cpp:

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

11 years ago2009-03-18 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Wed, 18 Mar 2009 20:41:39 +0000 (20:41 +0000)]
2009-03-18  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Simon Fraser.

        Fix for <rdar://problem/6685235>
        <video> element poster cannot be set dynamically if not originally set up in HTML

        Allocate the media engine immediately so the plug-in proxy is available for
        scripting right away.

        * platform/graphics/MediaPlayer.cpp:

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

11 years ago2009-03-18 Beth Dakin <bdakin@apple.com>
bdakin@apple.com [Wed, 18 Mar 2009 20:33:43 +0000 (20:33 +0000)]
2009-03-18  Beth Dakin  <bdakin@apple.com>

        Rubber-stamped by Dan Bernstein.

        Updating test to reflect our joy.

        * fast/dom/offset-parent-positioned-and-inline-expected.txt:
        * fast/dom/offset-parent-positioned-and-inline.html:

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

11 years agoWebCore:
bdakin@apple.com [Wed, 18 Mar 2009 20:30:06 +0000 (20:30 +0000)]

2009-03-18  Beth Dakin  <bdakin@apple.com>

        Reviewed by Dave Hyatt.

        Fix for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326):
        Popup menu appears at the wrong location on page at http://

        This was a regression from http://trac.webkit.org/changeset/40769,
        which changed the base class of RenderInline to
        RenderBoxModelObject rather than RenderBox.

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::offsetParent): offsetParent should return a
        RenderBoxModelObject rather than just a RenderBox, which is more


2009-03-18  Beth Dakin  <bdakin@apple.com>

        Reviewed by Dave Hyatt.

        Test for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326):
        Popup menu appears at the wrong location on page at http://

        * fast/dom/offset-parent-positioned-and-inline-expected.txt: Added.
        * fast/dom/offset-parent-positioned-and-inline.html: Added.

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

11 years agoWebCore:
andersca@apple.com [Wed, 18 Mar 2009 20:15:19 +0000 (20:15 +0000)]

2009-03-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore â\80¢ WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...

        Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.

        * loader/NetscapePlugInStreamLoader.cpp:


2009-03-18  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore â\80¢ WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...

        If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
        causing the plug-in never to be stopped. Simplify the code by using a RAII object.

        * Plugins/WebBaseNetscapePluginStream.mm:

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

11 years ago2009-03-18 David Levin <levin@chromium.org>
levin@chromium.org [Wed, 18 Mar 2009 20:08:37 +0000 (20:08 +0000)]
2009-03-18  David Levin  <levin@chromium.org>

        Reviewed by Dimitri Glazkov.

        Upstreaming v8 collection.h

        No change in behavior, so no test.

        * bindings/v8/V8Collection.h: Added.

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

11 years agoWebCore:
weinig@apple.com [Wed, 18 Mar 2009 20:02:18 +0000 (20:02 +0000)]

2009-03-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Simon Fraser.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=23966
        REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net

        Match the CSSOM spec for getClientRects and getBoundingClientRect by
        returning a 0x0 rect at the correct top/left position for empty inline

        * rendering/RenderInline.cpp:


2009-03-18  Sam Weinig  <sam@webkit.org>

        Reviewed by Simon Fraser.

        Update test results for https://bugs.webkit.org/show_bug.cgi?id=23966
        REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net

        * fast/dom/getBoundingClientRect-expected.txt:
        * fast/dom/getClientRects-expected.txt:

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