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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 if (m_pagePopup) { | 982 if (m_pagePopup) { |
983 m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event)); | 983 m_pagePopup->handleKeyEvent(PlatformKeyboardEventBuilder(event)); |
984 // We need to ignore the next Char event after this otherwise pressing | 984 // We need to ignore the next Char event after this otherwise pressing |
985 // enter when selecting an item in the popup will go to the page. | 985 // enter when selecting an item in the popup will go to the page. |
986 if (WebInputEvent::RawKeyDown == event.type) | 986 if (WebInputEvent::RawKeyDown == event.type) |
987 m_suppressNextKeypressEvent = true; | 987 m_suppressNextKeypressEvent = true; |
988 return true; | 988 return true; |
989 } | 989 } |
990 | 990 |
991 RefPtrWillBeRawPtr<Frame> focusedFrame = focusedCoreFrame(); | 991 RefPtrWillBeRawPtr<Frame> focusedFrame = focusedCoreFrame(); |
992 if (focusedFrame && focusedFrame->isRemoteFrameTemporary()) { | 992 if (focusedFrame && focusedFrame->isRemoteFrame()) { |
993 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrameT
emporary(focusedFrame.get())); | 993 WebRemoteFrameImpl* webFrame = WebRemoteFrameImpl::fromFrame(*toRemoteFr
ame(focusedFrame.get())); |
994 webFrame->client()->forwardInputEvent(&event); | 994 webFrame->client()->forwardInputEvent(&event); |
995 return true; | 995 return true; |
996 } | 996 } |
997 | 997 |
998 if (!focusedFrame || !focusedFrame->isLocalFrame()) | 998 if (!focusedFrame || !focusedFrame->isLocalFrame()) |
999 return false; | 999 return false; |
1000 | 1000 |
1001 LocalFrame* frame = toLocalFrame(focusedFrame.get()); | 1001 LocalFrame* frame = toLocalFrame(focusedFrame.get()); |
1002 | 1002 |
1003 PlatformKeyboardEventBuilder evt(event); | 1003 PlatformKeyboardEventBuilder evt(event); |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2081 default: | 2081 default: |
2082 ASSERT_NOT_REACHED(); | 2082 ASSERT_NOT_REACHED(); |
2083 } | 2083 } |
2084 | 2084 |
2085 node->dispatchMouseEvent( | 2085 node->dispatchMouseEvent( |
2086 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), static_cast<
const WebMouseEvent&>(inputEvent)), | 2086 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), static_cast<
const WebMouseEvent&>(inputEvent)), |
2087 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount)
; | 2087 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount)
; |
2088 return true; | 2088 return true; |
2089 } | 2089 } |
2090 | 2090 |
2091 return PageWidgetDelegate::handleInputEvent(*this, inputEvent, m_page->depre
catedLocalMainFrame()); | 2091 // FIXME: This should take in the intended frame, not the local frame root. |
| 2092 return PageWidgetDelegate::handleInputEvent(*this, inputEvent, localFrameRoo
tTemporary()->frame()); |
2092 } | 2093 } |
2093 | 2094 |
2094 void WebViewImpl::setCursorVisibilityState(bool isVisible) | 2095 void WebViewImpl::setCursorVisibilityState(bool isVisible) |
2095 { | 2096 { |
2096 if (m_page) | 2097 if (m_page) |
2097 m_page->setIsCursorVisible(isVisible); | 2098 m_page->setIsCursorVisible(isVisible); |
2098 } | 2099 } |
2099 | 2100 |
2100 void WebViewImpl::mouseCaptureLost() | 2101 void WebViewImpl::mouseCaptureLost() |
2101 { | 2102 { |
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4444 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4444 | 4445 |
4445 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4446 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4446 return false; | 4447 return false; |
4447 | 4448 |
4448 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4449 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4449 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4450 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4450 } | 4451 } |
4451 | 4452 |
4452 } // namespace blink | 4453 } // namespace blink |
OLD | NEW |