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

Unified Diff: cc/layers/painted_scrollbar_layer.cc

Issue 524373003: Scrollbar ThumbLength is not updated when window size is changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added variable has_thumb_pre_ (previously) Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer.cc
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc
index c0b2a728e3c9077c46a7f194dce94174d0780fd0..9a057fa77ece362a24a7939823a62dd5a2ae3528 100644
--- a/cc/layers/painted_scrollbar_layer.cc
+++ b/cc/layers/painted_scrollbar_layer.cc
@@ -41,7 +41,8 @@ PaintedScrollbarLayer::PaintedScrollbarLayer(scoped_ptr<Scrollbar> scrollbar,
thumb_thickness_(scrollbar_->ThumbThickness()),
thumb_length_(scrollbar_->ThumbLength()),
is_overlay_(scrollbar_->IsOverlay()),
- has_thumb_(scrollbar_->HasThumb()) {
+ has_thumb_(scrollbar_->HasThumb()),
+ has_thumb_pre_(false) {
Sikugu_ 2014/09/01 14:46:19 can we have some better name here like cache_thumb
if (!scrollbar_->IsOverlay())
SetShouldScrollOnMainThread(true);
}
@@ -189,9 +190,10 @@ void PaintedScrollbarLayer::UpdateThumbAndTrackGeometry() {
UpdateProperty(scrollbar_->Location(), &location_);
UpdateProperty(scrollbar_->IsOverlay(), &is_overlay_);
UpdateProperty(scrollbar_->HasThumb(), &has_thumb_);
- if (has_thumb_) {
+ if ((has_thumb_ != has_thumb_pre_) || has_thumb_) {
danakj 2014/09/02 16:23:06 I don't understand, when has_thumb_ became false,
MuVen 2014/09/02 16:42:04 When "Pin it" is clicked a pop-up of window height
danakj 2014/09/02 18:38:55 Ok, then how about when has_thumb is false, we alw
MuVen 2014/09/03 07:04:39 When has_thumb is false, UpdateProperty of ThumbLe
UpdateProperty(scrollbar_->ThumbThickness(), &thumb_thickness_);
UpdateProperty(scrollbar_->ThumbLength(), &thumb_length_);
+ has_thumb_pre_ = has_thumb_;
}
}
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698