Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Side by Side Diff: Source/WebCore/page/EventHandler.cpp

Issue 9600027: Merge 106476 - Source/WebCore: preventDefault() in a mousedown in a subframe should not (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/events/scroll-div-with-prevent-default-in-subframe-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/scroll-div-with-prevent-default-in-subframe-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698