OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 m_resizeLayer = layer; | 1454 m_resizeLayer = layer; |
1455 m_offsetFromResizeCorner = layer->offsetFromResizeCorner(p); | 1455 m_offsetFromResizeCorner = layer->offsetFromResizeCorner(p); |
1456 invalidateClick(); | 1456 invalidateClick(); |
1457 return true; | 1457 return true; |
1458 } | 1458 } |
1459 } | 1459 } |
1460 | 1460 |
1461 m_frame->selection()->setCaretBlinkingSuspended(true); | 1461 m_frame->selection()->setCaretBlinkingSuspended(true); |
1462 | 1462 |
1463 bool swallowEvent = dispatchMouseEvent(eventNames().mousedownEvent, targetNo
de(mev), true, m_clickCount, mouseEvent, true); | 1463 bool swallowEvent = dispatchMouseEvent(eventNames().mousedownEvent, targetNo
de(mev), true, m_clickCount, mouseEvent, true); |
1464 m_capturesDragging = !swallowEvent; | 1464 m_capturesDragging = !swallowEvent || mev.scrollbar(); |
1465 | 1465 |
1466 // If the hit testing originally determined the event was in a scrollbar, re
fetch the MouseEventWithHitTestResults | 1466 // If the hit testing originally determined the event was in a scrollbar, re
fetch the MouseEventWithHitTestResults |
1467 // in case the scrollbar widget was destroyed when the mouse event was handl
ed. | 1467 // in case the scrollbar widget was destroyed when the mouse event was handl
ed. |
1468 if (mev.scrollbar()) { | 1468 if (mev.scrollbar()) { |
1469 const bool wasLastScrollBar = mev.scrollbar() == m_lastScrollbarUnderMou
se.get(); | 1469 const bool wasLastScrollBar = mev.scrollbar() == m_lastScrollbarUnderMou
se.get(); |
1470 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active
); | 1470 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active
); |
1471 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mou
seEvent); | 1471 mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mou
seEvent); |
1472 if (wasLastScrollBar && mev.scrollbar() != m_lastScrollbarUnderMouse.get
()) | 1472 if (wasLastScrollBar && mev.scrollbar() != m_lastScrollbarUnderMouse.get
()) |
1473 m_lastScrollbarUnderMouse = 0; | 1473 m_lastScrollbarUnderMouse = 0; |
1474 } | 1474 } |
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3356 } | 3356 } |
3357 | 3357 |
3358 return defaultPrevented; | 3358 return defaultPrevented; |
3359 } | 3359 } |
3360 | 3360 |
3361 | 3361 |
3362 | 3362 |
3363 #endif | 3363 #endif |
3364 | 3364 |
3365 } | 3365 } |
OLD | NEW |