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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 302213002: Convert page-level classes to handle RemoteFrames from FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 years, 6 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
« no previous file with comments | « Source/core/page/CreateWindow.cpp ('k') | Source/core/page/InjectedStyleSheets.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 { 915 {
916 // The layout needs to be up to date to determine if we can scroll. We may b e 916 // The layout needs to be up to date to determine if we can scroll. We may b e
917 // here because of an onLoad event, in which case the final layout hasn't be en performed yet. 917 // here because of an onLoad event, in which case the final layout hasn't be en performed yet.
918 m_frame->document()->updateLayoutIgnorePendingStylesheets(); 918 m_frame->document()->updateLayoutIgnorePendingStylesheets();
919 if (scroll(direction, granularity, startingNode)) 919 if (scroll(direction, granularity, startingNode))
920 return true; 920 return true;
921 LocalFrame* frame = m_frame; 921 LocalFrame* frame = m_frame;
922 FrameView* view = frame->view(); 922 FrameView* view = frame->view();
923 if (view && view->scroll(direction, granularity)) 923 if (view && view->scroll(direction, granularity))
924 return true; 924 return true;
925 frame = frame->tree().parent(); 925 Frame* parentFrame = frame->tree().parent();
926 if (!frame) 926 if (!parentFrame || !parentFrame->isLocalFrame())
927 return false; 927 return false;
928 return frame->eventHandler().bubblingScroll(direction, granularity, m_frame- >ownerElement()); 928 return toLocalFrame(parentFrame)->eventHandler().bubblingScroll(direction, g ranularity, m_frame->ownerElement());
929 } 929 }
930 930
931 IntPoint EventHandler::lastKnownMousePosition() const 931 IntPoint EventHandler::lastKnownMousePosition() const
932 { 932 {
933 return m_lastKnownMousePosition; 933 return m_lastKnownMousePosition;
934 } 934 }
935 935
936 static LocalFrame* subframeForTargetNode(Node* node) 936 static LocalFrame* subframeForTargetNode(Node* node)
937 { 937 {
938 if (!node) 938 if (!node)
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 { 1502 {
1503 TRACE_EVENT0("webkit", "EventHandler::handleMouseReleaseEvent"); 1503 TRACE_EVENT0("webkit", "EventHandler::handleMouseReleaseEvent");
1504 1504
1505 RefPtr<FrameView> protector(m_frame->view()); 1505 RefPtr<FrameView> protector(m_frame->view());
1506 1506
1507 m_frame->selection().setCaretBlinkingSuspended(false); 1507 m_frame->selection().setCaretBlinkingSuspended(false);
1508 1508
1509 OwnPtr<UserGestureIndicator> gestureIndicator; 1509 OwnPtr<UserGestureIndicator> gestureIndicator;
1510 1510
1511 if (m_frame->localFrameRoot()->eventHandler().m_lastMouseDownUserGestureToke n) 1511 if (m_frame->localFrameRoot()->eventHandler().m_lastMouseDownUserGestureToke n)
1512 gestureIndicator = adoptPtr(new UserGestureIndicator(m_frame->tree().top ()->eventHandler().m_lastMouseDownUserGestureToken.release())); 1512 gestureIndicator = adoptPtr(new UserGestureIndicator(m_frame->localFrame Root()->eventHandler().m_lastMouseDownUserGestureToken.release()));
1513 else 1513 else
1514 gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessin gUserGesture)); 1514 gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessin gUserGesture));
1515 1515
1516 #if OS(WIN) 1516 #if OS(WIN)
1517 if (Page* page = m_frame->page()) 1517 if (Page* page = m_frame->page())
1518 page->autoscrollController().handleMouseReleaseForPanScrolling(m_frame, mouseEvent); 1518 page->autoscrollController().handleMouseReleaseForPanScrolling(m_frame, mouseEvent);
1519 #endif 1519 #endif
1520 1520
1521 m_mousePressed = false; 1521 m_mousePressed = false;
1522 setLastKnownMousePosition(mouseEvent); 1522 setLastKnownMousePosition(mouseEvent);
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3731 unsigned EventHandler::accessKeyModifiers() 3731 unsigned EventHandler::accessKeyModifiers()
3732 { 3732 {
3733 #if OS(MACOSX) 3733 #if OS(MACOSX)
3734 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3734 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3735 #else 3735 #else
3736 return PlatformEvent::AltKey; 3736 return PlatformEvent::AltKey;
3737 #endif 3737 #endif
3738 } 3738 }
3739 3739
3740 } // namespace WebCore 3740 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/CreateWindow.cpp ('k') | Source/core/page/InjectedStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698