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 3291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3302 request.setRequestContext(WebURLRequest::RequestContextDownload); | 3302 request.setRequestContext(WebURLRequest::RequestContextDownload); |
3303 m_page->deprecatedLocalMainFrame()->loader().client()->loadURLExternally( | 3303 m_page->deprecatedLocalMainFrame()->loader().client()->loadURLExternally( |
3304 request, NavigationPolicyDownloadTo, WebString()); | 3304 request, NavigationPolicyDownloadTo, WebString()); |
3305 } | 3305 } |
3306 | 3306 |
3307 void WebViewImpl::dragSourceEndedAt( | 3307 void WebViewImpl::dragSourceEndedAt( |
3308 const WebPoint& clientPoint, | 3308 const WebPoint& clientPoint, |
3309 const WebPoint& screenPoint, | 3309 const WebPoint& screenPoint, |
3310 WebDragOperation operation) | 3310 WebDragOperation operation) |
3311 { | 3311 { |
3312 PlatformMouseEvent pme(clientPoint, | 3312 PlatformMouseEvent pme(clientPoint, screenPoint, LeftButton, PlatformEvent::
MouseMoved, |
3313 screenPoint, | 3313 0, false, false, false, false, PlatformMouseEvent::RealOrIndistinguishab
le, 0); |
3314 LeftButton, PlatformEvent::MouseMoved, 0, false, fals
e, false, | |
3315 false, 0); | |
3316 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, | 3314 m_page->deprecatedLocalMainFrame()->eventHandler().dragSourceEndedAt(pme, |
3317 static_cast<DragOperation>(operation)); | 3315 static_cast<DragOperation>(operation)); |
3318 } | 3316 } |
3319 | 3317 |
3320 void WebViewImpl::dragSourceSystemDragEnded() | 3318 void WebViewImpl::dragSourceSystemDragEnded() |
3321 { | 3319 { |
3322 // It's possible for us to get this callback while not doing a drag if | 3320 // It's possible for us to get this callback while not doing a drag if |
3323 // it's from a previous page that got unloaded. | 3321 // it's from a previous page that got unloaded. |
3324 if (m_doingDragAndDrop) { | 3322 if (m_doingDragAndDrop) { |
3325 m_page->dragController().dragEnded(); | 3323 m_page->dragController().dragEnded(); |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4268 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4266 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4269 | 4267 |
4270 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4268 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4271 return false; | 4269 return false; |
4272 | 4270 |
4273 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4271 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4274 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4272 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4275 } | 4273 } |
4276 | 4274 |
4277 } // namespace blink | 4275 } // namespace blink |
OLD | NEW |