| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 435 |
| 436 if (m_scrollableArea) { | 436 if (m_scrollableArea) { |
| 437 // m_hoveredPart won't be updated until the next mouseMoved or mouseDown
, so we have to hit test | 437 // m_hoveredPart won't be updated until the next mouseMoved or mouseDown
, so we have to hit test |
| 438 // to really know if the mouse has exited the scrollbar on a mouseUp. | 438 // to really know if the mouse has exited the scrollbar on a mouseUp. |
| 439 ScrollbarPart part = theme()->hitTest(this, mouseEvent.position()); | 439 ScrollbarPart part = theme()->hitTest(this, mouseEvent.position()); |
| 440 if (part == NoPart) | 440 if (part == NoPart) |
| 441 m_scrollableArea->mouseExitedScrollbar(this); | 441 m_scrollableArea->mouseExitedScrollbar(this); |
| 442 } | 442 } |
| 443 | 443 |
| 444 if (parent() && parent()->isFrameView()) | 444 if (parent() && parent()->isFrameView()) |
| 445 toFrameView(parent())->frame()->eventHandler()->setMousePressed(false); | 445 toFrameView(parent())->frame().eventHandler()->setMousePressed(false); |
| 446 } | 446 } |
| 447 | 447 |
| 448 void Scrollbar::mouseDown(const PlatformMouseEvent& evt) | 448 void Scrollbar::mouseDown(const PlatformMouseEvent& evt) |
| 449 { | 449 { |
| 450 // Early exit for right click | 450 // Early exit for right click |
| 451 if (evt.button() == RightButton) | 451 if (evt.button() == RightButton) |
| 452 return; | 452 return; |
| 453 | 453 |
| 454 setPressedPart(theme()->hitTest(this, evt.position())); | 454 setPressedPart(theme()->hitTest(this, evt.position())); |
| 455 int pressedPos = (orientation() == HorizontalScrollbar ? convertFromContaini
ngWindow(evt.position()).x() : convertFromContainingWindow(evt.position()).y()); | 455 int pressedPos = (orientation() == HorizontalScrollbar ? convertFromContaini
ngWindow(evt.position()).x() : convertFromContainingWindow(evt.position()).y()); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 if (!m_scrollableArea) | 595 if (!m_scrollableArea) |
| 596 return 0; | 596 return 0; |
| 597 | 597 |
| 598 if (m_orientation == HorizontalScrollbar) | 598 if (m_orientation == HorizontalScrollbar) |
| 599 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); | 599 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu
mScrollPosition().x(); |
| 600 | 600 |
| 601 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); | 601 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr
ollPosition().y(); |
| 602 } | 602 } |
| 603 | 603 |
| 604 } // namespace WebCore | 604 } // namespace WebCore |
| OLD | NEW |