Bug 21527 - Make CSS scrollbars support :hover and :active
: Make CSS scrollbars support :hover and :active
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: CSS
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To: Dave Hyatt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-10 12:00 PDT by Dave Hyatt
Modified: 2008-10-10 12:33 PDT (History)
0 users

See Also:


Attachments
Patch (15.38 KB, patch)
2008-10-10 12:01 PDT, Dave Hyatt
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2008-10-10 12:00:54 PDT
Make scrollbars support :hover and :active
Comment 1 Dave Hyatt 2008-10-10 12:01:16 PDT
Created attachment 24269 [details]
Patch
Comment 2 Adam Roben (:aroben) 2008-10-10 12:17:13 PDT
Comment on attachment 24269 [details]
Patch

Can you comment on the changes to :not handling in the ChangeLog?

 2394         case CSSSelector::PseudoHover: {
 2395             ScrollbarPart hoveredPart = scrollbar->hoveredPart();
 2396             if (part == ScrollbarBGPart)
 2397                 return hoveredPart != NoPart;
 2398             if (part == TrackBGPart)
 2399                 return hoveredPart == BackTrackPart || hoveredPart == ForwardTrackPart || hoveredPart == ThumbPart;
 2400             return part == hoveredPart;
 2401         }
 2402         case CSSSelector::PseudoActive: {
 2403             ScrollbarPart pressedPart = scrollbar->pressedPart();
 2404             if (part == ScrollbarBGPart)
 2405                 return pressedPart != NoPart;
 2406             if (part == TrackBGPart)
 2407                 return pressedPart == BackTrackPart || pressedPart == ForwardTrackPart || pressedPart == ThumbPart;
 2408             return part == pressedPart;
 2409         }

Maybe it's worth putting this code into a function so we don't have to duplicate it?

 99 void RenderScrollbar::setPressedPart(ScrollbarPart part)
 100 {
 101     ScrollbarPart oldPart = m_pressedPart;

Should we check part != m_pressedPart before continuing?

r=me if you land a manual test with it.
Comment 3 Dave Hyatt 2008-10-10 12:33:09 PDT
Fixed in r37486.