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 3430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3441 if (!page()) | 3441 if (!page()) |
3442 return; | 3442 return; |
3443 | 3443 |
3444 page()->contextMenuController().clearContextMenu(); | 3444 page()->contextMenuController().clearContextMenu(); |
3445 m_contextMenuAllowed = true; | 3445 m_contextMenuAllowed = true; |
3446 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) | 3446 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) |
3447 focusedFrame->eventHandler().sendContextMenuEventForKey(); | 3447 focusedFrame->eventHandler().sendContextMenuEventForKey(); |
3448 m_contextMenuAllowed = false; | 3448 m_contextMenuAllowed = false; |
3449 } | 3449 } |
3450 | 3450 |
3451 void WebViewImpl::getSmartClipData(WebRect rect, WebString* clipText, WebRect* c
lipRect) | 3451 WebString WebViewImpl::getSmartClipData(WebRect rect) |
3452 { | 3452 { |
3453 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); | 3453 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); |
3454 if (!frame) | 3454 if (!frame) |
3455 return; | 3455 return WebString(); |
3456 SmartClipData clipData = WebCore::SmartClip(frame).dataForRect(rect); | 3456 return WebCore::SmartClip(frame).dataForRect(rect).toString(); |
3457 *clipText = clipData.getClipData(); | |
3458 *clipRect = clipData.getRect(); | |
3459 } | 3457 } |
3460 | 3458 |
3461 void WebViewImpl::hidePopups() | 3459 void WebViewImpl::hidePopups() |
3462 { | 3460 { |
3463 hideSelectPopup(); | 3461 hideSelectPopup(); |
3464 if (m_pagePopup) | 3462 if (m_pagePopup) |
3465 closePagePopup(m_pagePopup.get()); | 3463 closePagePopup(m_pagePopup.get()); |
3466 } | 3464 } |
3467 | 3465 |
3468 void WebViewImpl::setIsTransparent(bool isTransparent) | 3466 void WebViewImpl::setIsTransparent(bool isTransparent) |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4091 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4089 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4092 | 4090 |
4093 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4091 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4094 return false; | 4092 return false; |
4095 | 4093 |
4096 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4094 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4097 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4095 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4098 } | 4096 } |
4099 | 4097 |
4100 } // namespace blink | 4098 } // namespace blink |
OLD | NEW |