| 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 3427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3438 if (!page()) | 3438 if (!page()) |
| 3439 return; | 3439 return; |
| 3440 | 3440 |
| 3441 page()->contextMenuController().clearContextMenu(); | 3441 page()->contextMenuController().clearContextMenu(); |
| 3442 m_contextMenuAllowed = true; | 3442 m_contextMenuAllowed = true; |
| 3443 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) | 3443 if (LocalFrame* focusedFrame = toLocalFrame(page()->focusController().focuse
dOrMainFrame())) |
| 3444 focusedFrame->eventHandler().sendContextMenuEventForKey(); | 3444 focusedFrame->eventHandler().sendContextMenuEventForKey(); |
| 3445 m_contextMenuAllowed = false; | 3445 m_contextMenuAllowed = false; |
| 3446 } | 3446 } |
| 3447 | 3447 |
| 3448 WebString WebViewImpl::getSmartClipData(WebRect rect) | 3448 void WebViewImpl::getSmartClipData(WebRect rect) |
| 3449 { | 3449 { |
| 3450 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); | 3450 LocalFrame* frame = toLocalFrame(focusedWebCoreFrame()); |
| 3451 if (!frame) | 3451 if (!frame) |
| 3452 return WebString(); | 3452 return; |
| 3453 return WebCore::SmartClip(frame).dataForRect(rect).toString(); | 3453 SmartClipData clipData = WebCore::SmartClip(frame).dataForRect(rect); |
| 3454 m_client->updateSmartClipDataResult(clipData.getClipData(), clipData.getRect
()); |
| 3454 } | 3455 } |
| 3455 | 3456 |
| 3456 void WebViewImpl::hidePopups() | 3457 void WebViewImpl::hidePopups() |
| 3457 { | 3458 { |
| 3458 hideSelectPopup(); | 3459 hideSelectPopup(); |
| 3459 if (m_pagePopup) | 3460 if (m_pagePopup) |
| 3460 closePagePopup(m_pagePopup.get()); | 3461 closePagePopup(m_pagePopup.get()); |
| 3461 } | 3462 } |
| 3462 | 3463 |
| 3463 void WebViewImpl::setIsTransparent(bool isTransparent) | 3464 void WebViewImpl::setIsTransparent(bool isTransparent) |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4083 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4084 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4084 | 4085 |
| 4085 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4086 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4086 return false; | 4087 return false; |
| 4087 | 4088 |
| 4088 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4089 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4089 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4090 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4090 } | 4091 } |
| 4091 | 4092 |
| 4092 } // namespace blink | 4093 } // namespace blink |
| OLD | NEW |