| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 gc->drawRect(IntRect(tx + width() - borderSize, ty, borderSize, height())); | 362 gc->drawRect(IntRect(tx + width() - borderSize, ty, borderSize, height())); |
| 363 } | 363 } |
| 364 | 364 |
| 365 bool PopupContainer::isInterestedInEventForKey(int keyCode) | 365 bool PopupContainer::isInterestedInEventForKey(int keyCode) |
| 366 { | 366 { |
| 367 return m_listBox->isInterestedInEventForKey(keyCode); | 367 return m_listBox->isInterestedInEventForKey(keyCode); |
| 368 } | 368 } |
| 369 | 369 |
| 370 ChromeClient* PopupContainer::chromeClient() | 370 ChromeClient* PopupContainer::chromeClient() |
| 371 { | 371 { |
| 372 return m_frameView->frame()->page()->chrome()->client(); | 372 return m_frameView->frame()->page()->chrome().client(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 void PopupContainer::showInRect(const FloatQuad& controlPosition, const IntSize&
controlSize, FrameView* v, int index) | 375 void PopupContainer::showInRect(const FloatQuad& controlPosition, const IntSize&
controlSize, FrameView* v, int index) |
| 376 { | 376 { |
| 377 // The controlSize is the size of the select box. It's usually larger than | 377 // The controlSize is the size of the select box. It's usually larger than |
| 378 // we need. Subtract border size so that usually the container will be | 378 // we need. Subtract border size so that usually the container will be |
| 379 // displayed exactly the same width as the select box. | 379 // displayed exactly the same width as the select box. |
| 380 listBox()->setBaseWidth(max(controlSize.width() - borderSize * 2, 0)); | 380 listBox()->setBaseWidth(max(controlSize.width() - borderSize * 2, 0)); |
| 381 | 381 |
| 382 listBox()->updateFromElement(); | 382 listBox()->updateFromElement(); |
| (...skipping 69 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 |