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

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

Issue 952273006: Make the constructor of a LayoutRect from an IntRect explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « Source/web/PageWidgetDelegate.cpp ('k') | Source/web/TextFinder.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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 if (stripLeadingWhiteSpace(m_items[index]->label).foldCase().startsWith( prefixWithCaseFolded)) { 351 if (stripLeadingWhiteSpace(m_items[index]->label).foldCase().startsWith( prefixWithCaseFolded)) {
352 selectIndex(index); 352 selectIndex(index);
353 return; 353 return;
354 } 354 }
355 } 355 }
356 } 356 }
357 357
358 void PopupListBox::paint(GraphicsContext* gc, const IntRect& rect) 358 void PopupListBox::paint(GraphicsContext* gc, const IntRect& rect)
359 { 359 {
360 ClipRecorder frameClip(displayItemClient(), gc, DisplayItem::ClipPopupListBo xFrame, frameRect()); 360 ClipRecorder frameClip(displayItemClient(), gc, DisplayItem::ClipPopupListBo xFrame, LayoutRect(frameRect()));
361 TransformRecorder transformRecorder(*gc, displayItemClient(), AffineTransfor m::translation(x(), y())); 361 TransformRecorder transformRecorder(*gc, displayItemClient(), AffineTransfor m::translation(x(), y()));
362 IntRect paintRect = intersection(rect, frameRect()); 362 IntRect paintRect = intersection(rect, frameRect());
363 paintRect.moveBy(-location()); 363 paintRect.moveBy(-location());
364 364
365 if (numItems()) { 365 if (numItems()) {
366 IntSize scrollOffset = flooredIntSize(m_scrollOffset); 366 IntSize scrollOffset = flooredIntSize(m_scrollOffset);
367 // FIXME: Calling this part of the scroll might cause issues later on 367 // FIXME: Calling this part of the scroll might cause issues later on
368 // depending on how the compositor winds up using this information. 368 // depending on how the compositor winds up using this information.
369 // We may need to use an additional TransformRecorder instead, if that 369 // We may need to use an additional TransformRecorder instead, if that
370 // happens. 370 // happens.
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 maximumOffset.clampNegativeToZero(); 1051 maximumOffset.clampNegativeToZero();
1052 return maximumOffset; 1052 return maximumOffset;
1053 } 1053 }
1054 1054
1055 IntPoint PopupListBox::minimumScrollPosition() const 1055 IntPoint PopupListBox::minimumScrollPosition() const
1056 { 1056 {
1057 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y()); 1057 return IntPoint(-scrollOrigin().x(), -scrollOrigin().y());
1058 } 1058 }
1059 1059
1060 } // namespace blink 1060 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/PageWidgetDelegate.cpp ('k') | Source/web/TextFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698