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 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3563 if (!page()) | 3563 if (!page()) |
3564 return; | 3564 return; |
3565 | 3565 |
3566 page()->contextMenuController().clearContextMenu(); | 3566 page()->contextMenuController().clearContextMenu(); |
3567 m_contextMenuAllowed = true; | 3567 m_contextMenuAllowed = true; |
3568 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) | 3568 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) |
3569 focusedFrame->eventHandler().sendContextMenuEventForKey(); | 3569 focusedFrame->eventHandler().sendContextMenuEventForKey(); |
3570 m_contextMenuAllowed = false; | 3570 m_contextMenuAllowed = false; |
3571 } | 3571 } |
3572 | 3572 |
3573 void WebViewImpl::getSmartClipData(WebRect rect, WebString& clipText, WebRect& c
lipRect) | |
3574 { | |
3575 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); | |
3576 if (!frame) | |
3577 return; | |
3578 SmartClipData clipData = blink::SmartClip(frame).dataForRect(rect); | |
3579 clipText = clipData.clipData(); | |
3580 clipRect = clipData.rect(); | |
3581 } | |
3582 | |
3583 void WebViewImpl::extractSmartClipData(WebRect rect, WebString& clipText, WebStr
ing& clipHtml, WebRect& clipRect) | 3573 void WebViewImpl::extractSmartClipData(WebRect rect, WebString& clipText, WebStr
ing& clipHtml, WebRect& clipRect) |
3584 { | 3574 { |
3585 LocalFrame* localFrame = toLocalFrame(focusedWebCoreFrame()); | 3575 LocalFrame* localFrame = toLocalFrame(focusedWebCoreFrame()); |
3586 if (!localFrame) | 3576 if (!localFrame) |
3587 return; | 3577 return; |
3588 SmartClipData clipData = blink::SmartClip(localFrame).dataForRect(rect); | 3578 SmartClipData clipData = blink::SmartClip(localFrame).dataForRect(rect); |
3589 clipText = clipData.clipData(); | 3579 clipText = clipData.clipData(); |
3590 clipRect = clipData.rect(); | 3580 clipRect = clipData.rect(); |
3591 | 3581 |
3592 WebLocalFrameImpl* frame = mainFrameImpl(); | 3582 WebLocalFrameImpl* frame = mainFrameImpl(); |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4269 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4259 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4270 | 4260 |
4271 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4261 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4272 return false; | 4262 return false; |
4273 | 4263 |
4274 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4264 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4275 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4265 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4276 } | 4266 } |
4277 | 4267 |
4278 } // namespace blink | 4268 } // namespace blink |
OLD | NEW |