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

Side by Side Diff: Source/core/rendering/RenderListBox.h

Issue 204333002: Minor Refactor in RenderListBox (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the select element renderer in WebCore. 2 * This file is part of the select element renderer in WebCore.
3 * 3 *
4 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE; 131 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
132 132
133 // NOTE: This should only be called by the overriden setScrollOffset from Sc rollableArea. 133 // NOTE: This should only be called by the overriden setScrollOffset from Sc rollableArea.
134 void scrollTo(int newOffset); 134 void scrollTo(int newOffset);
135 135
136 void setHasVerticalScrollbar(bool hasScrollbar); 136 void setHasVerticalScrollbar(bool hasScrollbar);
137 PassRefPtr<Scrollbar> createScrollbar(); 137 PassRefPtr<Scrollbar> createScrollbar();
138 void destroyScrollbar(); 138 void destroyScrollbar();
139 139
140 LayoutUnit itemHeight() const; 140 LayoutUnit itemHeight() const;
141 void valueChanged(unsigned listIndex);
142 int numVisibleItems() const; 141 int numVisibleItems() const;
143 int numItems() const; 142 int numItems() const;
144 LayoutUnit listHeight() const; 143 LayoutUnit listHeight() const;
145 int scrollbarLeft() const; 144 int scrollbarLeft() const;
146 void paintScrollbar(PaintInfo&, const LayoutPoint&); 145 void paintScrollbar(PaintInfo&, const LayoutPoint&);
147 void paintItemForeground(PaintInfo&, const LayoutPoint&, int listIndex); 146 void paintItemForeground(PaintInfo&, const LayoutPoint&, int listIndex);
148 void paintItemBackground(PaintInfo&, const LayoutPoint&, int listIndex); 147 void paintItemBackground(PaintInfo&, const LayoutPoint&, int listIndex);
149 void scrollToRevealSelection(); 148 void scrollToRevealSelection();
150 149
151 bool m_optionsChanged; 150 bool m_optionsChanged;
152 bool m_scrollToRevealSelectionAfterLayout; 151 bool m_scrollToRevealSelectionAfterLayout;
153 bool m_inAutoscroll; 152 bool m_inAutoscroll;
154 int m_optionsWidth; 153 int m_optionsWidth;
155 int m_indexOffset; 154 int m_indexOffset;
156 155
157 RefPtr<Scrollbar> m_vBar; 156 RefPtr<Scrollbar> m_vBar;
158 }; 157 };
159 158
160 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderListBox, isListBox()); 159 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderListBox, isListBox());
161 160
162 } // namepace WebCore 161 } // namepace WebCore
163 162
164 #endif // RenderListBox_h 163 #endif // RenderListBox_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698