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

Side by Side Diff: Source/web/PopupListBox.h

Issue 662733002: Clamp scroll offset to min/max in PopupListBox::updateScrollbars. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/PopupListBox.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 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // Returns the font to use for the given row 236 // Returns the font to use for the given row
237 Font getRowFont(int index) const; 237 Font getRowFont(int index) const;
238 238
239 // Moves the selection down/up one item, taking care of looping back to the 239 // Moves the selection down/up one item, taking care of looping back to the
240 // first/last element if m_loopSelectionNavigation is true. 240 // first/last element if m_loopSelectionNavigation is true.
241 void selectPreviousRow(); 241 void selectPreviousRow();
242 void selectNextRow(); 242 void selectNextRow();
243 243
244 int scrollX() const { return scrollPosition().x(); } 244 int scrollX() const { return scrollPosition().x(); }
245 int scrollY() const { return scrollPosition().y(); } 245 int scrollY() const { return scrollPosition().y(); }
246 void updateScrollbars(const IntPoint& desiredOffset); 246 void updateScrollbars(IntPoint desiredOffset);
247 void setHasVerticalScrollbar(bool); 247 void setHasVerticalScrollbar(bool);
248 Scrollbar* scrollbarAtWindowPoint(const IntPoint& windowPoint); 248 Scrollbar* scrollbarAtWindowPoint(const IntPoint& windowPoint);
249 IntRect contentsToWindow(const IntRect&) const; 249 IntRect contentsToWindow(const IntRect&) const;
250 void setContentsSize(const IntSize&); 250 void setContentsSize(const IntSize&);
251 void adjustScrollbarExistence(); 251 void adjustScrollbarExistence();
252 void updateScrollbarGeometry(); 252 void updateScrollbarGeometry();
253 IntRect windowClipRect() const; 253 IntRect windowClipRect() const;
254 254
255 // If the device is a touch screen we increase the height of menu items 255 // If the device is a touch screen we increase the height of menu items
256 // to make it easier to unambiguously touch them. 256 // to make it easier to unambiguously touch them.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 RawPtrWillBeMember<PopupContainer> m_container; 316 RawPtrWillBeMember<PopupContainer> m_container;
317 317
318 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar; 318 RefPtrWillBeMember<Scrollbar> m_verticalScrollbar;
319 IntSize m_contentsSize; 319 IntSize m_contentsSize;
320 IntPoint m_scrollOffset; 320 IntPoint m_scrollOffset;
321 }; 321 };
322 322
323 } // namespace blink 323 } // namespace blink
324 324
325 #endif 325 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/web/PopupListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698