| 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 WebCursorInfo cursorInfo; | 672 WebCursorInfo cursorInfo; |
| 673 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) | 673 if (m_webPlugin->handleInputEvent(webEvent, cursorInfo)) |
| 674 event->setDefaultHandled(); | 674 event->setDefaultHandled(); |
| 675 | 675 |
| 676 // A windowless plugin can change the cursor in response to a mouse move | 676 // A windowless plugin can change the cursor in response to a mouse move |
| 677 // event. We need to reflect the changed cursor in the frame view as the | 677 // event. We need to reflect the changed cursor in the frame view as the |
| 678 // mouse is moved in the boundaries of the windowless plugin. | 678 // mouse is moved in the boundaries of the windowless plugin. |
| 679 Page* page = parentView->frame()->page(); | 679 Page* page = parentView->frame()->page(); |
| 680 if (!page) | 680 if (!page) |
| 681 return; | 681 return; |
| 682 ChromeClientImpl* chromeClient = | 682 ChromeClientImpl* chromeClient = static_cast<ChromeClientImpl*>(page->chrome
().client()); |
| 683 static_cast<ChromeClientImpl*>(page->chrome()->client()); | |
| 684 chromeClient->setCursorForPlugin(cursorInfo); | 683 chromeClient->setCursorForPlugin(cursorInfo); |
| 685 } | 684 } |
| 686 | 685 |
| 687 void WebPluginContainerImpl::handleDragEvent(MouseEvent* event) | 686 void WebPluginContainerImpl::handleDragEvent(MouseEvent* event) |
| 688 { | 687 { |
| 689 ASSERT(event->isDragEvent()); | 688 ASSERT(event->isDragEvent()); |
| 690 | 689 |
| 691 WebDragStatus dragStatus = WebDragStatusUnknown; | 690 WebDragStatus dragStatus = WebDragStatusUnknown; |
| 692 if (event->type() == eventNames().dragenterEvent) | 691 if (event->type() == eventNames().dragenterEvent) |
| 693 dragStatus = WebDragStatusEnter; | 692 dragStatus = WebDragStatusEnter; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 // Take our element and get the clip rect from the enclosing layer and | 862 // Take our element and get the clip rect from the enclosing layer and |
| 864 // frame view. | 863 // frame view. |
| 865 clipRect.intersect( | 864 clipRect.intersect( |
| 866 m_element->document()->view()->windowClipRectForFrameOwner(m_element
, true)); | 865 m_element->document()->view()->windowClipRectForFrameOwner(m_element
, true)); |
| 867 } | 866 } |
| 868 | 867 |
| 869 return clipRect; | 868 return clipRect; |
| 870 } | 869 } |
| 871 | 870 |
| 872 } // namespace WebKit | 871 } // namespace WebKit |
| OLD | NEW |