OLD | NEW |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 #include "core/fetch/UniqueIdentifier.h" | 52 #include "core/fetch/UniqueIdentifier.h" |
53 #include "core/frame/EventHandlerRegistry.h" | 53 #include "core/frame/EventHandlerRegistry.h" |
54 #include "core/frame/FrameHost.h" | 54 #include "core/frame/FrameHost.h" |
55 #include "core/frame/FrameView.h" | 55 #include "core/frame/FrameView.h" |
56 #include "core/frame/LocalFrame.h" | 56 #include "core/frame/LocalFrame.h" |
57 #include "core/frame/PinchViewport.h" | 57 #include "core/frame/PinchViewport.h" |
58 #include "core/frame/RemoteFrame.h" | 58 #include "core/frame/RemoteFrame.h" |
59 #include "core/frame/Settings.h" | 59 #include "core/frame/Settings.h" |
60 #include "core/frame/SmartClip.h" | 60 #include "core/frame/SmartClip.h" |
61 #include "core/frame/TopControls.h" | 61 #include "core/frame/TopControls.h" |
| 62 #include "core/html/HTMLImageElement.h" |
62 #include "core/html/HTMLInputElement.h" | 63 #include "core/html/HTMLInputElement.h" |
63 #include "core/html/HTMLMediaElement.h" | 64 #include "core/html/HTMLMediaElement.h" |
64 #include "core/html/HTMLPlugInElement.h" | 65 #include "core/html/HTMLPlugInElement.h" |
65 #include "core/html/HTMLTextAreaElement.h" | 66 #include "core/html/HTMLTextAreaElement.h" |
66 #include "core/html/canvas/WebGLRenderingContext.h" | 67 #include "core/html/canvas/WebGLRenderingContext.h" |
67 #include "core/html/forms/PopupMenuClient.h" | 68 #include "core/html/forms/PopupMenuClient.h" |
68 #include "core/html/ime/InputMethodContext.h" | 69 #include "core/html/ime/InputMethodContext.h" |
69 #include "core/layout/LayoutPart.h" | 70 #include "core/layout/LayoutPart.h" |
70 #include "core/layout/LayoutView.h" | 71 #include "core/layout/LayoutView.h" |
71 #include "core/layout/TextAutosizer.h" | 72 #include "core/layout/TextAutosizer.h" |
(...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3541 if (!node || !(isHTMLCanvasElement(*node) || isHTMLImageElement(*node))) | 3542 if (!node || !(isHTMLCanvasElement(*node) || isHTMLImageElement(*node))) |
3542 return; | 3543 return; |
3543 | 3544 |
3544 String url = toElement(*node).imageSourceURL(); | 3545 String url = toElement(*node).imageSourceURL(); |
3545 if (!KURL(KURL(), url).protocolIsData()) | 3546 if (!KURL(KURL(), url).protocolIsData()) |
3546 return; | 3547 return; |
3547 | 3548 |
3548 m_client->saveImageFromDataURL(url); | 3549 m_client->saveImageFromDataURL(url); |
3549 } | 3550 } |
3550 | 3551 |
| 3552 void WebViewImpl::reloadImageAt(const WebNode& webNode) |
| 3553 { |
| 3554 const Node* node = webNode.constUnwrap<Node>(); |
| 3555 if (isHTMLImageElement(*node)) { |
| 3556 const HTMLImageElement& imageElement = toHTMLImageElement(*node); |
| 3557 imageElement.forceReload(); |
| 3558 } |
| 3559 } |
| 3560 |
3551 void WebViewImpl::dragSourceEndedAt( | 3561 void WebViewImpl::dragSourceEndedAt( |
3552 const WebPoint& clientPoint, | 3562 const WebPoint& clientPoint, |
3553 const WebPoint& screenPoint, | 3563 const WebPoint& screenPoint, |
3554 WebDragOperation operation) | 3564 WebDragOperation operation) |
3555 { | 3565 { |
3556 PlatformMouseEvent pme(clientPoint, screenPoint, LeftButton, PlatformEvent::
MouseMoved, | 3566 PlatformMouseEvent pme(clientPoint, screenPoint, LeftButton, PlatformEvent::
MouseMoved, |
3557 0, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishab
le, 0); | 3567 0, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishab
le, 0); |
3558 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, | 3568 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, |
3559 static_cast<DragOperation>(operation)); | 3569 static_cast<DragOperation>(operation)); |
3560 } | 3570 } |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4467 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4477 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4468 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4478 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4469 } | 4479 } |
4470 | 4480 |
4471 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4481 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4472 { | 4482 { |
4473 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4483 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4474 } | 4484 } |
4475 | 4485 |
4476 } // namespace blink | 4486 } // namespace blink |
OLD | NEW |