2010-09-09 Jer Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Sep 2010 23:56:16 +0000 (23:56 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Sep 2010 23:56:16 +0000 (23:56 +0000)
commita145f9b558753f48fabc86921adf393e273b7707
tree3ff5157418af64855c264faabe19d36b808cb6e0
parent72416876b2f725145ffe382e192708f22d126471
2010-09-09  Jer Noble  <jer.noble@apple.com>

        Reviewed by Eric Carlson.

        Adopt shared control drawing for <video> controls on Windows
        https://bugs.webkit.org/show_bug.cgi?id=45490

        * win/lib/WebKitSystemInterface.lib:
        * win/lib/WebKitSystemInterface_debug.lib:
2010-09-09  Jer Noble  <jer.noble@apple.com>

        Reviewed by Eric Carlson.

        Adopt shared control drawing for <video> controls on Windows
        https://bugs.webkit.org/show_bug.cgi?id=45490

        * DerivedSources.make: Remove the OS check around mediaControlsQuickTime.css.
        * rendering/RenderMediaControls.cpp:
        (WebCore::determineState): Use WKMediaControllerThemeState flags instead of SafariTheme ones.
        (WebCore::getUnzoomedRectAndAdjustCurrentContext): Added. Copied verbatim from RenderMediaMac.mm.
        (WebCore::RenderMediaControls::adjustMediaSliderThumbSize): Use wkMeasureMediaUIPart to adjust the thumb size.
        (WebCore::RenderMediaControls::paintMediaControlsPart): Use wkDrawMediaUIPart instead of paintThemePart.
        (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Added. Copied verbatim from RenderMediaMac.mm.
        * rendering/RenderMediaControls.h:
        * rendering/RenderThemeWin.cpp:
        (WebCore::RenderThemeWin::adjustSliderThumbSize): Adjust both sliders and volume sliders.
        (WebCore::RenderThemeWin::extraMediaControlsStyleSheet): Added. Returns the mediaControlsQuickTime sheet.
        (WebCore::RenderThemeWin::paintMediaRewindButton): Added. Pass through to RenderMediaControls.
        (WebCore::RenderThemeWin::paintMediaControlsBackground): Added. Pass through to RenderMediaControls.
        (WebCore::RenderThemeWin::paintMediaVolumeSliderContainer): Added. Pass through to RenderMediaControls.
        (WebCore::RenderThemeWin::paintMediaVolumeSliderTrack): Added. Pass through to RenderMediaControls.
        (WebCore::RenderThemeWin::paintMediaVolumeSliderThumb): Added.  Pass through to RenderMediaControls.
        (WebCore::RenderThemeWin::volumeSliderOffsetFromMuteButton): Added. Pass through to RenderMediaControls.
        * rendering/RenderThemeWin.h:

2010-09-109  Peter Kasting  <pkasting@google.com>

        Reviewed by Darin Adler.

        Cleanup and simplification in advance of making middle clicks not send a
        click event.
        https://bugs.webkit.org/show_bug.cgi?id=22382

        * editing/DeleteButton.cpp:
        (WebCore::DeleteButton::defaultEventHandler): Removed unneeded code to
        check if the event is a MouseEvent. Any click event will do.
        * html/HTMLAnchorElement.cpp:
        (WebCore::appendServerMapMousePosition): Added. Factors out the
        modifications to the URL to add the mouse position to make the default
        event handler function easier to read.
        (WebCore::HTMLAnchorElement::defaultEventHandler): Reorganized to make
        the enter key logic separate from the link clicking logic and simplify
        the function.  This makes minor functional changes like not calling
        FrameLoader::urlSelected() for fake "keydown" events constructed from
        JavaScript.
        (WebCore::HTMLAnchorElement::isLiveLink): Refactored to use new shared
        implementation in treatLinkAsLiveForEventType().
        (WebCore::eventType): Factors out event type calculation (for
        treatLinkAsLiveForEventType()) from the default event handler to make it
        easier to read.
        (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
        Implementation of the portions of isLiveLink() that are common with the
        checks defaultEventHandler() wants to do.
        (WebCore::isEnterKeyKeydownEvent): Added. Shared by the default
        event handlers for all three anchor elements.
        (WebCore::isMiddleMouseButtonEvent): Added. Shared by the isLinkClick
        function below and some code in SVG. Later we can make this private to
        this source file once we remove the unneeded SVG code.
        (WebCore::isLinkClick): Added. Shared by the default event handlers for
        all three anchor elements.
        (WebCore::handleLinkClick): Ditto.
        * html/HTMLAnchorElement.h: Added the new functions.
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler): Removed lots of unneeded
        logic and streamlined the code to more closely match the
        HTMLAnchorElement code and share functions with it.
        * wml/WMLAElement.cpp:
        (WebCore::WMLAElement::defaultEventHandler): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@67251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/platform/win/media/audio-controls-rendering-expected.txt
LayoutTests/platform/win/media/controls-after-reload-expected.txt
LayoutTests/platform/win/media/controls-strict-expected.txt
LayoutTests/platform/win/media/controls-styling-expected.txt
LayoutTests/platform/win/media/video-controls-rendering-expected.txt
LayoutTests/platform/win/media/video-display-toggle-expected.txt
LayoutTests/platform/win/media/video-no-audio-expected.txt
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/rendering/RenderMediaControls.cpp
WebCore/rendering/RenderMediaControls.h
WebCore/rendering/RenderThemeWin.cpp
WebCore/rendering/RenderThemeWin.h
WebKitLibraries/ChangeLog
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib
WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib