OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
6 * | 6 * |
7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
9 * are met: | 9 * are met: |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 314 } |
315 | 315 |
316 static LocalFrame* SubframeForTargetNode(Node* node) { | 316 static LocalFrame* SubframeForTargetNode(Node* node) { |
317 if (!node) | 317 if (!node) |
318 return nullptr; | 318 return nullptr; |
319 | 319 |
320 LayoutObject* layout_object = node->GetLayoutObject(); | 320 LayoutObject* layout_object = node->GetLayoutObject(); |
321 if (!layout_object || !layout_object->IsLayoutPart()) | 321 if (!layout_object || !layout_object->IsLayoutPart()) |
322 return nullptr; | 322 return nullptr; |
323 | 323 |
324 FrameViewBase* frame_view_base = | 324 FrameView* frame_view = ToLayoutPart(layout_object)->ChildFrameView(); |
325 ToLayoutPart(layout_object)->GetFrameViewBase(); | 325 if (!frame_view) |
326 if (!frame_view_base || !frame_view_base->IsFrameView()) | |
327 return nullptr; | 326 return nullptr; |
328 | 327 |
329 return &ToFrameView(frame_view_base)->GetFrame(); | 328 return &frame_view->GetFrame(); |
330 } | 329 } |
331 | 330 |
332 static LocalFrame* SubframeForHitTestResult( | 331 static LocalFrame* SubframeForHitTestResult( |
333 const MouseEventWithHitTestResults& hit_test_result) { | 332 const MouseEventWithHitTestResults& hit_test_result) { |
334 if (!hit_test_result.IsOverFrameViewBase()) | 333 if (!hit_test_result.IsOverFrameViewBase()) |
335 return nullptr; | 334 return nullptr; |
336 return SubframeForTargetNode(hit_test_result.InnerNode()); | 335 return SubframeForTargetNode(hit_test_result.InnerNode()); |
337 } | 336 } |
338 | 337 |
339 static bool IsSubmitImage(Node* node) { | 338 static bool IsSubmitImage(Node* node) { |
(...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 MouseEventWithHitTestResults& mev, | 2112 MouseEventWithHitTestResults& mev, |
2114 LocalFrame* subframe) { | 2113 LocalFrame* subframe) { |
2115 WebInputEventResult result = | 2114 WebInputEventResult result = |
2116 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2115 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
2117 if (result != WebInputEventResult::kNotHandled) | 2116 if (result != WebInputEventResult::kNotHandled) |
2118 return result; | 2117 return result; |
2119 return WebInputEventResult::kHandledSystem; | 2118 return WebInputEventResult::kHandledSystem; |
2120 } | 2119 } |
2121 | 2120 |
2122 } // namespace blink | 2121 } // namespace blink |
OLD | NEW |