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 3480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3491 if (!page()) | 3491 if (!page()) |
3492 return; | 3492 return; |
3493 | 3493 |
3494 page()->contextMenuController().clearContextMenu(); | 3494 page()->contextMenuController().clearContextMenu(); |
3495 m_contextMenuAllowed = true; | 3495 m_contextMenuAllowed = true; |
3496 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) | 3496 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) |
3497 focusedFrame->eventHandler().sendContextMenuEventForKey(); | 3497 focusedFrame->eventHandler().sendContextMenuEventForKey(); |
3498 m_contextMenuAllowed = false; | 3498 m_contextMenuAllowed = false; |
3499 } | 3499 } |
3500 | 3500 |
3501 // FIXME: This should be removed when the chromium side patch lands | |
3502 // http://codereview.chromium.org/260623004 | |
3503 WebString WebViewImpl::getSmartClipData(WebRect rect) | |
3504 { | |
3505 return WebString(); | |
3506 } | |
3507 | |
3508 void WebViewImpl::getSmartClipData(WebRect rect, WebString& clipText, WebRect& c
lipRect) | 3501 void WebViewImpl::getSmartClipData(WebRect rect, WebString& clipText, WebRect& c
lipRect) |
3509 { | 3502 { |
3510 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); | 3503 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); |
3511 if (!frame) | 3504 if (!frame) |
3512 return; | 3505 return; |
3513 SmartClipData clipData = WebCore::SmartClip(frame).dataForRect(rect); | 3506 SmartClipData clipData = WebCore::SmartClip(frame).dataForRect(rect); |
3514 clipText = clipData.clipData(); | 3507 clipText = clipData.clipData(); |
3515 clipRect = clipData.rect(); | 3508 clipRect = clipData.rect(); |
3516 } | 3509 } |
3517 | 3510 |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4160 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4153 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4161 | 4154 |
4162 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4155 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4163 return false; | 4156 return false; |
4164 | 4157 |
4165 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4158 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4166 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4159 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4167 } | 4160 } |
4168 | 4161 |
4169 } // namespace blink | 4162 } // namespace blink |
OLD | NEW |