OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 const HitTestResult::NodeSet& nodes = result.rectBasedTestResult(); | 518 const HitTestResult::NodeSet& nodes = result.rectBasedTestResult(); |
519 if (nodes.size() != 1) | 519 if (nodes.size() != 1) |
520 return false; | 520 return false; |
521 return (nodes.first().get() == m_element); | 521 return (nodes.first().get() == m_element); |
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) | 526 if (m_touchEventRequestType == requestType) |
527 return; | 527 return; |
| 528 |
| 529 if (requestType != TouchEventRequestTypeNone && m_touchEventRequestType == T
ouchEventRequestTypeNone) |
| 530 m_element->document()->didAddTouchEventHandler(m_element); |
| 531 else if (requestType == TouchEventRequestTypeNone && m_touchEventRequestType
!= TouchEventRequestTypeNone) |
| 532 m_element->document()->didRemoveTouchEventHandler(m_element); |
528 m_touchEventRequestType = requestType; | 533 m_touchEventRequestType = requestType; |
529 if (m_touchEventRequestType != TouchEventRequestTypeNone) | |
530 m_element->document()->didAddTouchEventHandler(m_element); | |
531 else | |
532 m_element->document()->didRemoveTouchEventHandler(m_element); | |
533 } | 534 } |
534 | 535 |
535 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) | 536 void WebPluginContainerImpl::setWantsWheelEvents(bool wantsWheelEvents) |
536 { | 537 { |
537 if (m_wantsWheelEvents == wantsWheelEvents) | 538 if (m_wantsWheelEvents == wantsWheelEvents) |
538 return; | 539 return; |
539 m_wantsWheelEvents = wantsWheelEvents; | 540 m_wantsWheelEvents = wantsWheelEvents; |
540 if (Page* page = m_element->document()->page()) { | 541 if (Page* page = m_element->document()->page()) { |
541 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) { | 542 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) { |
542 if (parent() && parent()->isFrameView()) | 543 if (parent() && parent()->isFrameView()) |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 // Take our element and get the clip rect from the enclosing layer and | 884 // Take our element and get the clip rect from the enclosing layer and |
884 // frame view. | 885 // frame view. |
885 clipRect.intersect( | 886 clipRect.intersect( |
886 m_element->document()->view()->windowClipRectForFrameOwner(m_element
, true)); | 887 m_element->document()->view()->windowClipRectForFrameOwner(m_element
, true)); |
887 } | 888 } |
888 | 889 |
889 return clipRect; | 890 return clipRect; |
890 } | 891 } |
891 | 892 |
892 } // namespace WebKit | 893 } // namespace WebKit |
OLD | NEW |