Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 20 matching lines...) Expand all
31 #include "web/WebFrameWidgetImpl.h" 31 #include "web/WebFrameWidgetImpl.h"
32 32
33 #include "core/editing/EditingUtilities.h" 33 #include "core/editing/EditingUtilities.h"
34 #include "core/editing/Editor.h" 34 #include "core/editing/Editor.h"
35 #include "core/editing/FrameSelection.h" 35 #include "core/editing/FrameSelection.h"
36 #include "core/editing/InputMethodController.h" 36 #include "core/editing/InputMethodController.h"
37 #include "core/editing/PlainTextRange.h" 37 #include "core/editing/PlainTextRange.h"
38 #include "core/frame/FrameHost.h" 38 #include "core/frame/FrameHost.h"
39 #include "core/frame/FrameView.h" 39 #include "core/frame/FrameView.h"
40 #include "core/frame/RemoteFrame.h" 40 #include "core/frame/RemoteFrame.h"
41 #include "core/frame/RemoteFrameView.h"
41 #include "core/frame/Settings.h" 42 #include "core/frame/Settings.h"
42 #include "core/frame/VisualViewport.h" 43 #include "core/frame/VisualViewport.h"
43 #include "core/html/HTMLTextAreaElement.h" 44 #include "core/html/HTMLTextAreaElement.h"
44 #include "core/input/EventHandler.h" 45 #include "core/input/EventHandler.h"
45 #include "core/layout/LayoutView.h" 46 #include "core/layout/LayoutView.h"
46 #include "core/layout/api/LayoutViewItem.h" 47 #include "core/layout/api/LayoutViewItem.h"
47 #include "core/layout/compositing/PaintLayerCompositor.h" 48 #include "core/layout/compositing/PaintLayerCompositor.h"
48 #include "core/page/ContextMenuController.h" 49 #include "core/page/ContextMenuController.h"
49 #include "core/page/FocusController.h" 50 #include "core/page/FocusController.h"
50 #include "core/page/Page.h" 51 #include "core/page/Page.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This 798 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This
798 // code needs to be refactored (http://crbug.com/629721). 799 // code needs to be refactored (http://crbug.com/629721).
799 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) { 800 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) {
800 if (LocalFrame* frame = focusedLocalFrameInWidget()) { 801 if (LocalFrame* frame = focusedLocalFrameInWidget()) {
801 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems 802 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems
802 // silly. What is going on here? 803 // silly. What is going on here?
803 WebLocalFrameImpl::fromFrame(frame)->selectRange(range); 804 WebLocalFrameImpl::fromFrame(frame)->selectRange(range);
804 } 805 }
805 } 806 }
806 807
808 void WebFrameWidgetImpl::setRemoteViewportIntersection(
809 const WebRect& viewportIntersection,
810 const WebPoint& rootOffset) {
811 // Remote viewports are only applicable to local frames with remote ancestors.
812 if (!m_localRoot->parent() || !m_localRoot->parent()->isWebRemoteFrame())
813 return;
814 if (m_localRoot->frameView()) {
815 m_localRoot->frameView()->setViewportIntersectionFromParent(
816 viewportIntersection, rootOffset);
817 }
818 }
819
807 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, 820 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame,
808 const WebMouseEvent& event) { 821 const WebMouseEvent& event) {
809 // FIXME: WebWidget doesn't have the method below. 822 // FIXME: WebWidget doesn't have the method below.
810 // m_client->setMouseOverURL(WebURL()); 823 // m_client->setMouseOverURL(WebURL());
811 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); 824 PageWidgetEventHandler::handleMouseLeave(mainFrame, event);
812 } 825 }
813 826
814 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, 827 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame,
815 const WebMouseEvent& event) { 828 const WebMouseEvent& event) {
816 // Take capture on a mouse down on a plugin so we can send it mouse events. 829 // Take capture on a mouse down on a plugin so we can send it mouse events.
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 return nullptr; 1338 return nullptr;
1326 } 1339 }
1327 1340
1328 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1341 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1329 if (!m_imeAcceptEvents) 1342 if (!m_imeAcceptEvents)
1330 return nullptr; 1343 return nullptr;
1331 return focusedLocalFrameInWidget(); 1344 return focusedLocalFrameInWidget();
1332 } 1345 }
1333 1346
1334 } // namespace blink 1347 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698