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 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3475 void WebViewImpl::copyImageAt(const WebPoint& point) | 3475 void WebViewImpl::copyImageAt(const WebPoint& point) |
3476 { | 3476 { |
3477 if (!m_page) | 3477 if (!m_page) |
3478 return; | 3478 return; |
3479 | 3479 |
3480 HitTestResult result = hitTestResultForViewportPos(point); | 3480 HitTestResult result = hitTestResultForViewportPos(point); |
3481 if (!isHTMLCanvasElement(result.innerNodeOrImageMapImage()) && result.absolu
teImageURL().isEmpty()) { | 3481 if (!isHTMLCanvasElement(result.innerNodeOrImageMapImage()) && result.absolu
teImageURL().isEmpty()) { |
3482 // There isn't actually an image at these coordinates. Might be because | 3482 // There isn't actually an image at these coordinates. Might be because |
3483 // the window scrolled while the context menu was open or because the pa
ge | 3483 // the window scrolled while the context menu was open or because the pa
ge |
3484 // changed itself between when we thought there was an image here and wh
en | 3484 // changed itself between when we thought there was an image here and wh
en |
3485 // we actually tried to retreive the image. | 3485 // we actually tried to retrieve the image. |
3486 // | 3486 // |
3487 // FIXME: implement a cache of the most recent HitTestResult to avoid ha
ving | 3487 // FIXME: implement a cache of the most recent HitTestResult to avoid ha
ving |
3488 // to do two hit tests. | 3488 // to do two hit tests. |
3489 return; | 3489 return; |
3490 } | 3490 } |
3491 | 3491 |
3492 m_page->deprecatedLocalMainFrame()->editor().copyImage(result); | 3492 m_page->deprecatedLocalMainFrame()->editor().copyImage(result); |
3493 } | 3493 } |
3494 | 3494 |
3495 void WebViewImpl::saveImageAt(const WebPoint& point) | 3495 void WebViewImpl::saveImageAt(const WebPoint& point) |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4461 if (m_pageColorOverlay) | 4461 if (m_pageColorOverlay) |
4462 m_pageColorOverlay->update(); | 4462 m_pageColorOverlay->update(); |
4463 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4463 if (InspectorOverlay* overlay = inspectorOverlay()) { |
4464 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4464 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4465 if (inspectorPageOverlay) | 4465 if (inspectorPageOverlay) |
4466 inspectorPageOverlay->update(); | 4466 inspectorPageOverlay->update(); |
4467 } | 4467 } |
4468 } | 4468 } |
4469 | 4469 |
4470 } // namespace blink | 4470 } // namespace blink |
OLD | NEW |