| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 verticalScrollbar()->paint(gc, paintRect); | 389 verticalScrollbar()->paint(gc, paintRect); |
| 390 } | 390 } |
| 391 | 391 |
| 392 static const int separatorPadding = 4; | 392 static const int separatorPadding = 4; |
| 393 static const int separatorHeight = 1; | 393 static const int separatorHeight = 1; |
| 394 static const int minRowHeight = 0; | 394 static const int minRowHeight = 0; |
| 395 static const int optionRowHeightForTouch = 28; | 395 static const int optionRowHeightForTouch = 28; |
| 396 | 396 |
| 397 void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd
ex) | 397 void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd
ex) |
| 398 { | 398 { |
| 399 // This code is based largely on RenderListBox::paint* methods. | 399 // This code is based largely on LayoutListBox::paint* methods. |
| 400 | 400 |
| 401 IntRect rowRect = getRowBounds(rowIndex); | 401 IntRect rowRect = getRowBounds(rowIndex); |
| 402 if (!rowRect.intersects(rect)) | 402 if (!rowRect.intersects(rect)) |
| 403 return; | 403 return; |
| 404 | 404 |
| 405 DrawingRecorder drawingRecorder(gc, m_items[rowIndex]->displayItemClient(),
DisplayItem::PopupListBoxRow, rowRect); | 405 DrawingRecorder drawingRecorder(gc, m_items[rowIndex]->displayItemClient(),
DisplayItem::PopupListBoxRow, rowRect); |
| 406 if (drawingRecorder.canUseCachedDrawing()) | 406 if (drawingRecorder.canUseCachedDrawing()) |
| 407 return; | 407 return; |
| 408 | 408 |
| 409 PopupMenuStyle style = m_popupClient->itemStyle(rowIndex); | 409 PopupMenuStyle style = m_popupClient->itemStyle(rowIndex); |
| (...skipping 641 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 |