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