Chromium Code Reviews| 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 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3541 if (!node || !(isHTMLCanvasElement(*node) || isHTMLImageElement(*node))) | 3541 if (!node || !(isHTMLCanvasElement(*node) || isHTMLImageElement(*node))) |
| 3542 return; | 3542 return; |
| 3543 | 3543 |
| 3544 String url = toElement(*node).imageSourceURL(); | 3544 String url = toElement(*node).imageSourceURL(); |
| 3545 if (!KURL(KURL(), url).protocolIsData()) | 3545 if (!KURL(KURL(), url).protocolIsData()) |
| 3546 return; | 3546 return; |
| 3547 | 3547 |
| 3548 m_client->saveImageFromDataURL(url); | 3548 m_client->saveImageFromDataURL(url); |
| 3549 } | 3549 } |
| 3550 | 3550 |
| 3551 void WebViewImpl::reloadImageAt(const WebPoint& point, bool bypassCache) | |
| 3552 { | |
| 3553 if (!m_page) | |
| 3554 return; | |
| 3555 | |
| 3556 HitTestResult result = hitTestResultForViewportPos(point); | |
|
Nate Chapin
2015/04/30 20:59:41
The need to do a hit test to re-find the element i
megjablon
2015/04/30 22:00:55
You you point me to the code for this? This follow
| |
| 3557 if (!isHTMLImageElement(result.innerNodeOrImageMapImage()) || result.absolut eImageURL().isEmpty()) | |
| 3558 return; | |
| 3559 | |
| 3560 m_page->deprecatedLocalMainFrame()->editor().reloadImage(result, bypassCache ); | |
| 3561 } | |
| 3562 | |
| 3551 void WebViewImpl::dragSourceEndedAt( | 3563 void WebViewImpl::dragSourceEndedAt( |
| 3552 const WebPoint& clientPoint, | 3564 const WebPoint& clientPoint, |
| 3553 const WebPoint& screenPoint, | 3565 const WebPoint& screenPoint, |
| 3554 WebDragOperation operation) | 3566 WebDragOperation operation) |
| 3555 { | 3567 { |
| 3556 PlatformMouseEvent pme(clientPoint, screenPoint, LeftButton, PlatformEvent:: MouseMoved, | 3568 PlatformMouseEvent pme(clientPoint, screenPoint, LeftButton, PlatformEvent:: MouseMoved, |
| 3557 0, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishab le, 0); | 3569 0, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishab le, 0); |
| 3558 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, | 3570 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, |
| 3559 static_cast<DragOperation>(operation)); | 3571 static_cast<DragOperation>(operation)); |
| 3560 } | 3572 } |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4467 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4479 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4468 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4480 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
| 4469 } | 4481 } |
| 4470 | 4482 |
| 4471 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4483 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4472 { | 4484 { |
| 4473 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4485 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4474 } | 4486 } |
| 4475 | 4487 |
| 4476 } // namespace blink | 4488 } // namespace blink |
| OLD | NEW |