| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 PopupListBox::~PopupListBox() | 86 PopupListBox::~PopupListBox() |
| 87 { | 87 { |
| 88 clear(); | 88 clear(); |
| 89 | 89 |
| 90 setHasHorizontalScrollbar(false); | 90 setHasHorizontalScrollbar(false); |
| 91 setHasVerticalScrollbar(false); | 91 setHasVerticalScrollbar(false); |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool PopupListBox::handleMouseDownEvent(const PlatformMouseEvent& event) | 94 bool PopupListBox::handleMouseDownEvent(const PlatformMouseEvent& event) |
| 95 { | 95 { |
| 96 Scrollbar* scrollbar = scrollbarAtPoint(event.position()); | 96 Scrollbar* scrollbar = scrollbarAtWindowPoint(event.position()); |
| 97 if (scrollbar) { | 97 if (scrollbar) { |
| 98 m_capturingScrollbar = scrollbar; | 98 m_capturingScrollbar = scrollbar; |
| 99 m_capturingScrollbar->mouseDown(event); | 99 m_capturingScrollbar->mouseDown(event); |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 if (!isPointInBounds(event.position())) | 103 if (!isPointInBounds(event.position())) |
| 104 abandon(); | 104 abandon(); |
| 105 | 105 |
| 106 return true; | 106 return true; |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool PopupListBox::handleMouseMoveEvent(const PlatformMouseEvent& event) | 109 bool PopupListBox::handleMouseMoveEvent(const PlatformMouseEvent& event) |
| 110 { | 110 { |
| 111 if (m_capturingScrollbar) { | 111 if (m_capturingScrollbar) { |
| 112 m_capturingScrollbar->mouseMoved(event); | 112 m_capturingScrollbar->mouseMoved(event); |
| 113 return true; | 113 return true; |
| 114 } | 114 } |
| 115 | 115 |
| 116 Scrollbar* scrollbar = scrollbarAtPoint(event.position()); | 116 Scrollbar* scrollbar = scrollbarAtWindowPoint(event.position()); |
| 117 if (m_lastScrollbarUnderMouse != scrollbar) { | 117 if (m_lastScrollbarUnderMouse != scrollbar) { |
| 118 // Send mouse exited to the old scrollbar. | 118 // Send mouse exited to the old scrollbar. |
| 119 if (m_lastScrollbarUnderMouse) | 119 if (m_lastScrollbarUnderMouse) |
| 120 m_lastScrollbarUnderMouse->mouseExited(); | 120 m_lastScrollbarUnderMouse->mouseExited(); |
| 121 m_lastScrollbarUnderMouse = scrollbar; | 121 m_lastScrollbarUnderMouse = scrollbar; |
| 122 } | 122 } |
| 123 | 123 |
| 124 if (scrollbar) { | 124 if (scrollbar) { |
| 125 scrollbar->mouseMoved(event); | 125 scrollbar->mouseMoved(event); |
| 126 return true; | 126 return true; |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 { | 873 { |
| 874 return isActive(); | 874 return isActive(); |
| 875 } | 875 } |
| 876 | 876 |
| 877 IntRect PopupListBox::scrollableAreaBoundingBox() const | 877 IntRect PopupListBox::scrollableAreaBoundingBox() const |
| 878 { | 878 { |
| 879 return windowClipRect(IncludeScrollbars); | 879 return windowClipRect(IncludeScrollbars); |
| 880 } | 880 } |
| 881 | 881 |
| 882 } // namespace blink | 882 } // namespace blink |
| OLD | NEW |