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

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1884863003: Non passive touch end or touch cancel listeners should not block scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove API from ChromeClient Created 4 years, 8 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 } 527 }
528 528
529 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request Type) 529 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request Type)
530 { 530 {
531 if (m_touchEventRequestType == requestType || !m_element) 531 if (m_touchEventRequestType == requestType || !m_element)
532 return; 532 return;
533 533
534 if (FrameHost* frameHost = m_element->document().frameHost()) { 534 if (FrameHost* frameHost = m_element->document().frameHost()) {
535 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry(); 535 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry();
536 if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType == TouchEventRequestTypeNone) 536 if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType == TouchEventRequestTypeNone)
537 registry.didAddEventHandler(*m_element, EventHandlerRegistry::TouchE ventBlocking); 537 registry.didAddEventHandler(*m_element, EventHandlerRegistry::TouchS tartOrMoveEventBlocking);
538 else if (requestType == TouchEventRequestTypeNone && m_touchEventRequest Type != TouchEventRequestTypeNone) 538 else if (requestType == TouchEventRequestTypeNone && m_touchEventRequest Type != TouchEventRequestTypeNone)
539 registry.didRemoveEventHandler(*m_element, EventHandlerRegistry::Tou chEventBlocking); 539 registry.didRemoveEventHandler(*m_element, EventHandlerRegistry::Tou chStartOrMoveEventBlocking);
540 } 540 }
541 m_touchEventRequestType = requestType; 541 m_touchEventRequestType = requestType;
542 } 542 }
543 543
544 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) 544 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents)
545 { 545 {
546 if (m_wantsWheelEvents == wantsWheelEvents) 546 if (m_wantsWheelEvents == wantsWheelEvents)
547 return; 547 return;
548 if (FrameHost* frameHost = m_element->document().frameHost()) { 548 if (FrameHost* frameHost = m_element->document().frameHost()) {
549 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry(); 549 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry();
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 // frame view. 932 // frame view.
933 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); 933 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t);
934 } 934 }
935 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 935 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
936 // Convert to the plugin position. 936 // Convert to the plugin position.
937 for (size_t i = 0; i < cutOutRects.size(); i++) 937 for (size_t i = 0; i < cutOutRects.size(); i++)
938 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 938 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
939 } 939 }
940 940
941 } // namespace blink 941 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPagePopupImpl.cpp ('k') | third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698