OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |