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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 296003011: Fix event passing to overlay scrollbars when over a plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (event.button == WebMouseEvent::ButtonLeft) { 484 if (event.button == WebMouseEvent::ButtonLeft) {
485 selectPopup = m_selectPopup; 485 selectPopup = m_selectPopup;
486 pagePopup = m_pagePopup; 486 pagePopup = m_pagePopup;
487 hidePopups(); 487 hidePopups();
488 ASSERT(!m_selectPopup); 488 ASSERT(!m_selectPopup);
489 ASSERT(!m_pagePopup); 489 ASSERT(!m_pagePopup);
490 } 490 }
491 491
492 m_lastMouseDownPoint = WebPoint(event.x, event.y); 492 m_lastMouseDownPoint = WebPoint(event.x, event.y);
493 493
494 if (event.button == WebMouseEvent::ButtonLeft) { 494 IntPoint point(event.x, event.y);
495 IntPoint point(event.x, event.y); 495 if (event.button == WebMouseEvent::ButtonLeft && !m_page->mainFrame()->view( )->scrollbarAtPoint(point)) {
Rick Byers 2014/05/22 13:53:36 Again, why isn't the problem here really that the
496 point = m_page->mainFrame()->view()->windowToContents(point); 496 point = m_page->mainFrame()->view()->windowToContents(point);
497 HitTestResult result(m_page->mainFrame()->eventHandler().hitTestResultAt Point(point)); 497 HitTestResult result(m_page->mainFrame()->eventHandler().hitTestResultAt Point(point));
498 Node* hitNode = result.innerNonSharedNode(); 498 Node* hitNode = result.innerNonSharedNode();
499 499
500 // Take capture on a mouse down on a plugin so we can send it mouse even ts. 500 // Take capture on a mouse down on a plugin so we can send it mouse even ts.
501 if (hitNode && hitNode->renderer() && hitNode->renderer()->isEmbeddedObj ect()) { 501 if (hitNode && hitNode->renderer() && hitNode->renderer()->isEmbeddedObj ect()) {
502 m_mouseCaptureNode = hitNode; 502 m_mouseCaptureNode = hitNode;
503 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this); 503 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this);
504 } 504 }
505 } 505 }
(...skipping 3569 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4075 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4076 4076
4077 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4077 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4078 return false; 4078 return false;
4079 4079
4080 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4080 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4081 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4081 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4082 } 4082 }
4083 4083
4084 } // namespace blink 4084 } // namespace blink
OLDNEW
« Source/core/page/EventHandler.cpp ('K') | « Source/core/page/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698