| 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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 ->HorizontalScrollbar(); | 2095 ->HorizontalScrollbar(); |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 bool WebViewImpl::HasVerticalScrollbar() { | 2098 bool WebViewImpl::HasVerticalScrollbar() { |
| 2099 return MainFrameImpl() | 2099 return MainFrameImpl() |
| 2100 ->GetFrameView() | 2100 ->GetFrameView() |
| 2101 ->LayoutViewportScrollableArea() | 2101 ->LayoutViewportScrollableArea() |
| 2102 ->VerticalScrollbar(); | 2102 ->VerticalScrollbar(); |
| 2103 } | 2103 } |
| 2104 | 2104 |
| 2105 // WebFrame* WebViewImpl::HitTestFrameAt(const WebFloatPoint& point) { |
| 2106 // if (!MainFrameImpl()) |
| 2107 // return nullptr; |
| 2108 // |
| 2109 // HitTestResult hit_test_result = |
| 2110 // MainFrameImpl()->GetFrame()->GetEventHandler().HitTestResultAtPoint( |
| 2111 // LayoutPoint((FloatPoint)point)); |
| 2112 // Frame* target_frame = nullptr; |
| 2113 // Node* target_node = hit_test_result.InnerNode(); |
| 2114 // if (target_node->IsFrameOwnerElement()) |
| 2115 // target_frame = ToHTMLFrameOwnerElement(target_node)->ContentFrame(); |
| 2116 // else |
| 2117 // target_frame = target_node->GetDocument().GetFrame(); |
| 2118 // return WebFrame::FromFrame(target_frame); |
| 2119 //} |
| 2120 |
| 2105 WebInputEventResult WebViewImpl::HandleInputEvent( | 2121 WebInputEventResult WebViewImpl::HandleInputEvent( |
| 2106 const WebCoalescedInputEvent& coalesced_event) { | 2122 const WebCoalescedInputEvent& coalesced_event) { |
| 2107 const WebInputEvent& input_event = coalesced_event.Event(); | 2123 const WebInputEvent& input_event = coalesced_event.Event(); |
| 2108 // TODO(dcheng): The fact that this is getting called when there is no local | 2124 // TODO(dcheng): The fact that this is getting called when there is no local |
| 2109 // main frame is problematic and probably indicates a bug in the input event | 2125 // main frame is problematic and probably indicates a bug in the input event |
| 2110 // routing code. | 2126 // routing code. |
| 2111 if (!MainFrameImpl()) | 2127 if (!MainFrameImpl()) |
| 2112 return WebInputEventResult::kNotHandled; | 2128 return WebInputEventResult::kNotHandled; |
| 2113 | 2129 |
| 2114 GetPage()->GetVisualViewport().StartTrackingPinchStats(); | 2130 GetPage()->GetVisualViewport().StartTrackingPinchStats(); |
| (...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4092 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) | 4108 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) |
| 4093 return nullptr; | 4109 return nullptr; |
| 4094 return focused_frame; | 4110 return focused_frame; |
| 4095 } | 4111 } |
| 4096 | 4112 |
| 4097 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { | 4113 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { |
| 4098 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; | 4114 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; |
| 4099 } | 4115 } |
| 4100 | 4116 |
| 4101 } // namespace blink | 4117 } // namespace blink |
| OLD | NEW |