Commit 8f745287 authored by pkasting@chromium.org's avatar pkasting@chromium.org

2009-04-16 Peter Kasting <pkasting@google.com>

        Reviewed by Adele Peterson.

        https://bugs.webkit.org/show_bug.cgi?id=25238
        Invalidate the hovered scrollbar part when resetting the pressed part,
        since once there is no pressed part we can draw a hovered state.

        * platform/Scrollbar.cpp:
        (WebCore::Scrollbar::setHoveredPart):
        (WebCore::Scrollbar::setPressedPart):



git-svn-id: svn://svn.chromium.org/blink/trunk@42624 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 98c011ee
2009-04-16 Peter Kasting <pkasting@google.com>
Reviewed by Adele Peterson.
https://bugs.webkit.org/show_bug.cgi?id=25238
Invalidate the hovered scrollbar part when resetting the pressed part,
since once there is no pressed part we can draw a hovered state.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::setHoveredPart):
(WebCore::Scrollbar::setPressedPart):
2009-04-16 Darin Fisher <darin@chromium.org>
Reviewed by Darin Adler.
......@@ -287,7 +287,7 @@ void Scrollbar::setHoveredPart(ScrollbarPart part)
if ((m_hoveredPart == NoPart || part == NoPart) && theme()->invalidateOnMouseEnterExit())
invalidate(); // Just invalidate the whole scrollbar, since the buttons at either end change anyway.
else if (m_pressedPart == NoPart) {
else if (m_pressedPart == NoPart) { // When there's a pressed part, we don't draw a hovered state, so there's no reason to invalidate.
theme()->invalidatePart(this, part);
theme()->invalidatePart(this, m_hoveredPart);
}
......@@ -301,6 +301,8 @@ void Scrollbar::setPressedPart(ScrollbarPart part)
m_pressedPart = part;
if (m_pressedPart != NoPart)
theme()->invalidatePart(this, m_pressedPart);
else if (m_hoveredPart != NoPart) // When we no longer have a pressed part, we can start drawing a hovered state on the hovered part.
theme()->invalidatePart(this, m_hoveredPart);
}
bool Scrollbar::mouseMoved(const PlatformMouseEvent& evt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment