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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // | 255 // |
256 // So, if a popup menu is left in an open/shown state when | 256 // So, if a popup menu is left in an open/shown state when |
257 // finalized, the PopupMenu implementation of this container's | 257 // finalized, the PopupMenu implementation of this container's |
258 // listbox will hide itself when destructed, delivering the | 258 // listbox will hide itself when destructed, delivering the |
259 // notifyPopupHidden() notification in the process & ending up here. | 259 // notifyPopupHidden() notification in the process & ending up here. |
260 // If the LocalFrame has been detached already -- done when its | 260 // If the LocalFrame has been detached already -- done when its |
261 // HTMLFrameOwnerElement frame owner is detached as part of being | 261 // HTMLFrameOwnerElement frame owner is detached as part of being |
262 // torn down -- the connection to the FrameHost has been snipped & | 262 // torn down -- the connection to the FrameHost has been snipped & |
263 // there's no page. Hence the null check. | 263 // there's no page. Hence the null check. |
264 // | 264 // |
265 // In a non-Oilpan setting, the RenderMenuList that controls/owns | 265 // In a non-Oilpan setting, the LayoutMenuList that controls/owns |
266 // the PopupMenuChromium object and this PopupContainer is torn | 266 // the PopupMenuChromium object and this PopupContainer is torn |
267 // down and destructed before the frame and frame owner, hence the | 267 // down and destructed before the frame and frame owner, hence the |
268 // page will always be available in that setting and this will | 268 // page will always be available in that setting and this will |
269 // not be an issue. | 269 // not be an issue. |
270 if (WebViewImpl* webView = WebViewImpl::fromPage(m_frameView->frame().page()
)) | 270 if (WebViewImpl* webView = WebViewImpl::fromPage(m_frameView->frame().page()
)) |
271 webView->popupClosed(this); | 271 webView->popupClosed(this); |
272 } | 272 } |
273 | 273 |
274 void PopupContainer::fitToListBox() | 274 void PopupContainer::fitToListBox() |
275 { | 275 { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 } | 493 } |
494 | 494 |
495 IntPoint PopupContainer::convertSelfToChild(const Widget* child, const IntPoint&
point) const | 495 IntPoint PopupContainer::convertSelfToChild(const Widget* child, const IntPoint&
point) const |
496 { | 496 { |
497 IntPoint newPoint = point; | 497 IntPoint newPoint = point; |
498 newPoint.moveBy(-child->location()); | 498 newPoint.moveBy(-child->location()); |
499 return newPoint; | 499 return newPoint; |
500 } | 500 } |
501 | 501 |
502 } // namespace blink | 502 } // namespace blink |
OLD | NEW |