| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the select element layoutObject in WebCore. | 2 * This file is part of the select element layoutObject in WebCore. |
| 3 * | 3 * |
| 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 void LayoutMenuList::showPopup() | 341 void LayoutMenuList::showPopup() |
| 342 { | 342 { |
| 343 if (m_popupIsVisible) | 343 if (m_popupIsVisible) |
| 344 return; | 344 return; |
| 345 | 345 |
| 346 if (document().frameHost()->chromeClient().hasOpenedPopup()) | 346 if (document().frameHost()->chromeClient().hasOpenedPopup()) |
| 347 return; | 347 return; |
| 348 | 348 |
| 349 if (!m_popup) | 349 if (!m_popup) |
| 350 m_popup = document().frameHost()->chromeClient().createPopupMenu(*docume
nt().frame(), this); | 350 m_popup = document().frameHost()->chromeClient().openPopupMenu(*document
().frame(), this); |
| 351 m_popupIsVisible = true; | 351 m_popupIsVisible = true; |
| 352 | 352 |
| 353 FloatQuad quad(localToAbsoluteQuad(FloatQuad(borderBoundingBox()))); | 353 FloatQuad quad(localToAbsoluteQuad(FloatQuad(borderBoundingBox()))); |
| 354 IntSize size = pixelSnappedIntRect(frameRect()).size(); | 354 IntSize size = pixelSnappedIntRect(frameRect()).size(); |
| 355 HTMLSelectElement* select = selectElement(); | 355 HTMLSelectElement* select = selectElement(); |
| 356 m_popup->show(quad, size, select->optionToListIndex(select->selectedIndex())
); | 356 m_popup->show(quad, size, select->optionToListIndex(select->selectedIndex())
); |
| 357 if (AXObjectCache* cache = document().existingAXObjectCache()) | 357 if (AXObjectCache* cache = document().existingAXObjectCache()) |
| 358 cache->didShowMenuListPopup(this); | 358 cache->didShowMenuListPopup(this); |
| 359 } | 359 } |
| 360 | 360 |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 HTMLElement* element = listItems[listIndex]; | 619 HTMLElement* element = listItems[listIndex]; |
| 620 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); | 620 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); |
| 621 } | 621 } |
| 622 | 622 |
| 623 void LayoutMenuList::provisionalSelectionChanged(unsigned listIndex) | 623 void LayoutMenuList::provisionalSelectionChanged(unsigned listIndex) |
| 624 { | 624 { |
| 625 setIndexToSelectOnCancel(listIndex); | 625 setIndexToSelectOnCancel(listIndex); |
| 626 } | 626 } |
| 627 | 627 |
| 628 } // namespace blink | 628 } // namespace blink |
| OLD | NEW |