| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 paintBorder(gc, rect); | 344 paintBorder(gc, rect); |
| 345 } | 345 } |
| 346 | 346 |
| 347 void PopupContainer::paintBorder(GraphicsContext* gc, const IntRect& rect) | 347 void PopupContainer::paintBorder(GraphicsContext* gc, const IntRect& rect) |
| 348 { | 348 { |
| 349 // FIXME: Where do we get the border color from? | 349 // FIXME: Where do we get the border color from? |
| 350 Color borderColor(127, 157, 185); | 350 Color borderColor(127, 157, 185); |
| 351 | 351 |
| 352 gc->setStrokeStyle(NoStroke); | 352 gc->setStrokeStyle(NoStroke); |
| 353 gc->setFillColor(borderColor, ColorSpaceDeviceRGB); | 353 gc->setFillColor(borderColor); |
| 354 | 354 |
| 355 int tx = x(); | 355 int tx = x(); |
| 356 int ty = y(); | 356 int ty = y(); |
| 357 | 357 |
| 358 // top, left, bottom, right | 358 // top, left, bottom, right |
| 359 gc->drawRect(IntRect(tx, ty, width(), borderSize)); | 359 gc->drawRect(IntRect(tx, ty, width(), borderSize)); |
| 360 gc->drawRect(IntRect(tx, ty, borderSize, height())); | 360 gc->drawRect(IntRect(tx, ty, borderSize, height())); |
| 361 gc->drawRect(IntRect(tx, ty + height() - borderSize, width(), borderSize)); | 361 gc->drawRect(IntRect(tx, ty + height() - borderSize, width(), borderSize)); |
| 362 gc->drawRect(IntRect(tx + width() - borderSize, ty, borderSize, height())); | 362 gc->drawRect(IntRect(tx + width() - borderSize, ty, borderSize, height())); |
| 363 } | 363 } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 452 |
| 453 String PopupContainer::getSelectedItemToolTip() | 453 String PopupContainer::getSelectedItemToolTip() |
| 454 { | 454 { |
| 455 // We cannot use m_popupClient->selectedIndex() to choose tooltip message, | 455 // We cannot use m_popupClient->selectedIndex() to choose tooltip message, |
| 456 // because the selectedIndex() might return final selected index, not | 456 // because the selectedIndex() might return final selected index, not |
| 457 // hovering selection. | 457 // hovering selection. |
| 458 return listBox()->m_popupClient->itemToolTip(listBox()->m_selectedIndex); | 458 return listBox()->m_popupClient->itemToolTip(listBox()->m_selectedIndex); |
| 459 } | 459 } |
| 460 | 460 |
| 461 } // namespace WebCore | 461 } // namespace WebCore |
| OLD | NEW |