OLD | NEW |
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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 } | 522 } |
523 | 523 |
524 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request
Type) | 524 void WebPluginContainerImpl::requestTouchEventType(TouchEventRequestType request
Type) |
525 { | 525 { |
526 if (m_touchEventRequestType == requestType || !m_element) | 526 if (m_touchEventRequestType == requestType || !m_element) |
527 return; | 527 return; |
528 | 528 |
529 if (FrameHost* frameHost = m_element->document().frameHost()) { | 529 if (FrameHost* frameHost = m_element->document().frameHost()) { |
530 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry(); | 530 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry(); |
531 if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType
== TouchEventRequestTypeNone) | 531 if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType
== TouchEventRequestTypeNone) |
532 registry.didAddEventHandler(*m_element, EventHandlerRegistry::TouchE
ventBlocking); | 532 registry.didAddEventHandler(*m_element, EventHandlerRegistry::TouchS
tartOrMoveEventBlocking); |
533 else if (requestType == TouchEventRequestTypeNone && m_touchEventRequest
Type != TouchEventRequestTypeNone) | 533 else if (requestType == TouchEventRequestTypeNone && m_touchEventRequest
Type != TouchEventRequestTypeNone) |
534 registry.didRemoveEventHandler(*m_element, EventHandlerRegistry::Tou
chEventBlocking); | 534 registry.didRemoveEventHandler(*m_element, EventHandlerRegistry::Tou
chStartOrMoveEventBlocking); |
535 } | 535 } |
536 m_touchEventRequestType = requestType; | 536 m_touchEventRequestType = requestType; |
537 } | 537 } |
538 | 538 |
539 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) | 539 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) |
540 { | 540 { |
541 if (m_wantsWheelEvents == wantsWheelEvents) | 541 if (m_wantsWheelEvents == wantsWheelEvents) |
542 return; | 542 return; |
543 if (FrameHost* frameHost = m_element->document().frameHost()) { | 543 if (FrameHost* frameHost = m_element->document().frameHost()) { |
544 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry(); | 544 EventHandlerRegistry& registry = frameHost->eventHandlerRegistry(); |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 // frame view. | 939 // frame view. |
940 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); | 940 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec
t); |
941 } | 941 } |
942 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 942 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
943 // Convert to the plugin position. | 943 // Convert to the plugin position. |
944 for (size_t i = 0; i < cutOutRects.size(); i++) | 944 for (size_t i = 0; i < cutOutRects.size(); i++) |
945 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 945 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
946 } | 946 } |
947 | 947 |
948 } // namespace blink | 948 } // namespace blink |
OLD | NEW |