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

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: Modified Variable Name Created 6 years, 3 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') | cc/layers/scrollbar_layer_unittest.cc » ('j') | 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..84624d6a04801d4e06e4a83c6ec1e0871fbd6595 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()),
+ cache_has_thumb_(false) {
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 ((cache_has_thumb_ != has_thumb_) || has_thumb_) {
danakj 2014/09/03 15:38:27 I mean you don't need to add this cache_has_thumb_
UpdateProperty(scrollbar_->ThumbThickness(), &thumb_thickness_);
UpdateProperty(scrollbar_->ThumbLength(), &thumb_length_);
+ cache_has_thumb_ = has_thumb_;
}
}
« no previous file with comments | « cc/layers/painted_scrollbar_layer.h ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698