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

Unified Diff: ui/views/controls/scroll_view.h

Issue 2813353002: Ensure that the focus ring in the bookmarks bar does not paint outside the parent view. (Closed)
Patch Set: Remove newline and global variable Created 3 years, 8 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 | « no previous file | ui/views/controls/scroll_view.cc » ('j') | ui/views/controls/scroll_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scroll_view.h
diff --git a/ui/views/controls/scroll_view.h b/ui/views/controls/scroll_view.h
index af9111a05cae1a2dd25daba64afe629560c7751e..5b7f1f7432f08b6e9878aa8b38fc36ae5bd2c569 100644
--- a/ui/views/controls/scroll_view.h
+++ b/ui/views/controls/scroll_view.h
@@ -56,6 +56,8 @@ class VIEWS_EXPORT ScrollView : public View, public ScrollBarController {
const View* contents() const { return contents_; }
View* contents() { return contents_; }
+ const View* contents_viewport() const { return contents_viewport_; }
sky 2017/04/18 15:35:48 I would prefer not to expose this. Can you friend
ananta 2017/04/18 22:22:39 Done.
+
// Sets the header, deleting the previous header.
void SetHeader(View* header);
@@ -105,6 +107,9 @@ class VIEWS_EXPORT ScrollView : public View, public ScrollBarController {
void OnGestureEvent(ui::GestureEvent* event) override;
const char* GetClassName() const override;
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
+ void ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) override;
+ void OnChildLayerChanged(View* child) override;
// ScrollBarController overrides:
void ScrollToPosition(ScrollBar* source, int position) override;
@@ -162,6 +167,11 @@ class VIEWS_EXPORT ScrollView : public View, public ScrollBarController {
void AddBorder();
void UpdateBorder();
+ // Enables view port layering if layering is enabled for the |child| or any
sky 2017/04/18 15:35:47 'layering is enabled' -> |child| has a layer
ananta 2017/04/18 22:22:39 Done.
+ // of its descendants. Returns true if yes. We short circuit the recursion
+ // if we enabled layering.
+ bool EnableLayeringRecursivelyForChild(View* child);
+
// The current contents and its viewport. |contents_| is contained in
// |contents_viewport_|.
View* contents_;
@@ -204,6 +214,12 @@ class VIEWS_EXPORT ScrollView : public View, public ScrollBarController {
// Focus ring, if one is installed.
View* focus_ring_ = nullptr;
+ // Set to true if we enabled layering for the viewport.
+ bool viewport_layer_enabled_ = false;
+
+ // Set to true if the scroll with layers feature is enabled.
+ bool scroll_with_layers_enabled_ = false;
sky 2017/04/18 15:35:47 Make const
ananta 2017/04/18 22:22:39 We cannot do that as this is set based on the expe
sky 2017/04/19 00:03:04 If you move scroll_with_layers_enabled_ = b
ananta 2017/04/19 00:53:17 Thanks. done
+
DISALLOW_COPY_AND_ASSIGN(ScrollView);
};
« no previous file with comments | « no previous file | ui/views/controls/scroll_view.cc » ('j') | ui/views/controls/scroll_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698