RESOLVED FIXED 66209
Chromium Mac: Show scrollbar when doing search
https://bugs.webkit.org/show_bug.cgi?id=66209
Summary Chromium Mac: Show scrollbar when doing search
Sailesh Agrawal
Reported 2011-08-14 16:55:25 PDT
Chromium Mac: Show scrollbar when doing search
Attachments
Patch (8.20 KB, patch)
2011-08-14 16:59 PDT, Sailesh Agrawal
no flags
Patch (8.23 KB, patch)
2011-08-15 12:36 PDT, Sailesh Agrawal
no flags
Patch (8.46 KB, patch)
2011-08-18 15:24 PDT, Sailesh Agrawal
no flags
Patch (8.47 KB, patch)
2011-08-18 15:30 PDT, Sailesh Agrawal
no flags
Patch (8.47 KB, patch)
2011-08-18 15:34 PDT, Sailesh Agrawal
no flags
Sailesh Agrawal
Comment 1 2011-08-14 16:59:04 PDT
Sailesh Agrawal
Comment 2 2011-08-14 17:00:43 PDT
Nico Weber
Comment 3 2011-08-15 09:56:51 PDT
Comment on attachment 103884 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103884&action=review > Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h:75 > + void paintTickmarks(GraphicsContext*, Scrollbar*, const IntRect&, const Vector<IntRect>&); I have a feeling this will trigger clang's -Woverloaded-virtual. Maybe give it a different name? > Source/WebKit/chromium/src/WebFrameImpl.cpp:2181 > + scrollbar->invalidate(); Should you invalidate just the visibleHeight() when no tickmarks are visible? It looks like we repaint the entire scroll area all the time now (and even if there are tickmarks, invalidating just a scrollbarThickness() vertical slice should be enough)
Sailesh Agrawal
Comment 4 2011-08-15 12:35:46 PDT
Comment on attachment 103884 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=103884&action=review >> Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h:75 >> + void paintTickmarks(GraphicsContext*, Scrollbar*, const IntRect&, const Vector<IntRect>&); > > I have a feeling this will trigger clang's -Woverloaded-virtual. Maybe give it a different name? Fixed. Renamed to paintGivenTickmarks() >> Source/WebKit/chromium/src/WebFrameImpl.cpp:2181 >> + scrollbar->invalidate(); > > Should you invalidate just the visibleHeight() when no tickmarks are visible? It looks like we repaint the entire scroll area all the time now (and even if there are tickmarks, invalidating just a scrollbarThickness() vertical slice should be enough) scrollbar->invalidate() only invalidates the widget. In this case the widget height is less than or equal to frame view's visible height. The widget's width is always equal to scrollbar thickness.
Sailesh Agrawal
Comment 5 2011-08-15 12:36:40 PDT
Nico Weber
Comment 7 2011-08-16 21:00:35 PDT
(In reply to comment #4) > scrollbar->invalidate() only invalidates the widget. In this case the widget height is less than or equal to frame view's visible height. The widget's width is always equal to scrollbar thickness. Is the scrollbar height equal to the web height or the knob height usually? In the former case, invalidating less when there are no tickmarks would still be useful, right?
James Robinson
Comment 8 2011-08-16 21:14:33 PDT
Why no test?
Sailesh Agrawal
Comment 9 2011-08-16 22:18:32 PDT
(In reply to comment #7) > (In reply to comment #4) > > scrollbar->invalidate() only invalidates the widget. In this case the widget height is less than or equal to frame view's visible height. The widget's width is always equal to scrollbar thickness. > > Is the scrollbar height equal to the web height or the knob height usually? In the former case, invalidating less when there are no tickmarks would still be useful, right? The scrollbar widget height is just the visible page height. It's the least we can invalidate without looking up the tickmarks.
Nico Weber
Comment 10 2011-08-16 22:20:50 PDT
Yes, but if there are no tickmarks, only the knob needs to be invalidated, right? Checking if the "are there tickmarks?" state matches the previous "are there tickmarks?" state and doing a smaller invalidation if it matches and if the state is "no tickmarks" should be easy, right?
Sailesh Agrawal
Comment 11 2011-08-16 22:26:39 PDT
(In reply to comment #10) > Yes, but if there are no tickmarks, only the knob needs to be invalidated, right? I don't think that's true. For example, if we're showing tickmarks, and then the user cancels the search the new state is "no tickmarks". At this point we still want to invalidate the whole scrollbar widget since we want to erase the old tickmarks.
Nico Weber
Comment 12 2011-08-16 22:37:21 PDT
That's why I said one would only do this if the old and new "are tickmarks shown?" state matches.
Sailesh Agrawal
Comment 13 2011-08-16 22:58:56 PDT
(In reply to comment #10) > Yes, but if there are no tickmarks, only the knob needs to be invalidated, right? Hm.. there are four calls to WebFrameImpl::invalidateArea(). As far as I can tell tell they all call invalidateArea because the number of matches has changed. Also, I can't see why invalidating just the knob would be useful. If the number of matches before and after is 0 then we shouldn't invalidate anything right? (Since the tickmarks are drawn on the track and possibly underneath the knob.) For reference, I'm assuming that knob means that part of the scrollbar that you click and drag around and track means that background that the knob is dragged over.
Nico Weber
Comment 14 2011-08-17 10:44:07 PDT
(In reply to comment #13) > Also, I can't see why invalidating just the knob would be useful. If the number of matches before and after is 0 then we shouldn't invalidate anything right? (Since the tickmarks are drawn on the track and possibly underneath the knob.) I'm thinking of the "scrolling without findmarks, with a normal, non-overlay scrollbar" case.
Sailesh Agrawal
Comment 15 2011-08-18 14:39:55 PDT
(In reply to comment #14) > (In reply to comment #13) > > Also, I can't see why invalidating just the knob would be useful. If the number of matches before and after is 0 then we shouldn't invalidate anything right? (Since the tickmarks are drawn on the track and possibly underneath the knob.) > > I'm thinking of the "scrolling without findmarks, with a normal, non-overlay scrollbar" case. Ahh, got it. The good news is that this function is internal to this class and it's only used for search. The invalidation due to scrolling happens elsewhere.
Nico Weber
Comment 16 2011-08-18 14:42:05 PDT
Ah, ok. Can you add "No tests because there are no chromium 10.7 bots yet" to the changelog entry? with that, lgtm
Sailesh Agrawal
Comment 17 2011-08-18 15:24:19 PDT
Sailesh Agrawal
Comment 18 2011-08-18 15:25:35 PDT
> Can you add "No tests because there are no chromium 10.7 bots yet" to the changelog entry? with that, lgtm Done. I also made one other change. The original patch would force both horizontal and vertical scrollbars to be visible when doing a search. With this change we only force the vertical scrollbar to be visible.
Nico Weber
Comment 19 2011-08-18 15:26:58 PDT
Comment on attachment 104408 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=104408&action=review lgtm > Source/WebCore/ChangeLog:10 > + No tests because there are no chromium 10.7 bots yet. nit: "Mac 10.7 chromium bots"
James Robinson
Comment 20 2011-08-18 15:29:59 PDT
Comment on attachment 104408 [details] Patch I am rubber stamp hear me roar
Sailesh Agrawal
Comment 21 2011-08-18 15:30:14 PDT
Sailesh Agrawal
Comment 22 2011-08-18 15:30:53 PDT
(In reply to comment #20) > (From update of attachment 104408 [details]) > I am rubber stamp hear me roar argh, and I just blew away the rubber stamp
Sailesh Agrawal
Comment 23 2011-08-18 15:34:16 PDT
Nico Weber
Comment 24 2011-08-18 15:34:47 PDT
Comment on attachment 104410 [details] Patch no need for r?, has been reviewed already
WebKit Review Bot
Comment 25 2011-08-18 15:46:55 PDT
Comment on attachment 104410 [details] Patch Clearing flags on attachment: 104410 Committed r93361: <http://trac.webkit.org/changeset/93361>
WebKit Review Bot
Comment 26 2011-08-18 15:47:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.