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

Side by Side Diff: Source/core/platform/chromium/PopupContainer.cpp

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 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/core/page/Settings.cpp ('k') | Source/core/rendering/RenderLayerBacking.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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/page/Settings.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698