Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Issue 2744443003: Correct overlay scrollbar check FrameView::scrollbarExistenceDidChange (Closed)

Created:
3 years, 9 months ago by chaopeng
Modified:
3 years, 8 months ago
Reviewers:
bokan
CC:
chromium-reviews, blink-reviews, blink-reviews-frames_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Correct overlay scrollbar check FrameView::scrollbarExistenceDidChange This issue is caused by FrameView::scrollbarExistenceDidChange calculate usesOverlayScrollbars via check ScrollbarTheme::theme() only but ignore custom scrollbar then pass layout. In this patch, we add the custom scrollbar check to correct usesOverlayScrollbars. BUG=668387

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 8 (6 generated)
chaopeng
PTAL. Thank you. Because we have a lot protected layout call, I can't build a ...
3 years, 9 months ago (2017-03-09 17:12:21 UTC) #2
bokan
3 years, 9 months ago (2017-03-09 18:57:58 UTC) #7
On 2017/03/09 17:12:21, chaopeng wrote:
> PTAL. Thank you.
> 
> Because we have a lot protected layout call, I can't build a simple case to
test
> this issue. Can you give me some advice? bokan@
> 
> Also I checked all calls of ScrollbarTheme::theme().usesOverlayScrollbars(),
it
> seems here is the only one place I need to fix.

Code change looks good.

Re: test, one thing you could do is with a debugger or using StackTrace, find
out where the last couple of calls to this function are coming from. You want to
know how they change the scrollbar state but don't cause a layout otherwise.
This might give you a clue as to how to do that yourself.

You could also try loading a page with custom scrollbars but no overflow,
performing layout and all lifecycle updates, then adding some overflow that
doesn't cause layout. I believe transforming an element shouldn't cause a
layout. You could attach a debugger and step through to see why it is or isn't
hitting the code you expect. See the test I added in
https://codereview.chromium.org/2713773003/ which does something very similar.

Powered by Google App Engine
This is Rietveld 408576698