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

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

Issue 59573002: Add Frame::isMainFrame and deploy it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/HistoryController.cpp ('k') | Source/core/page/EventHandler.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 startAutoscroll(); 164 startAutoscroll();
165 } else if (m_autoscrollRenderer != scrollable) { 165 } else if (m_autoscrollRenderer != scrollable) {
166 m_dragAndDropAutoscrollStartTime = eventTime; 166 m_dragAndDropAutoscrollStartTime = eventTime;
167 m_autoscrollRenderer = scrollable; 167 m_autoscrollRenderer = scrollable;
168 } 168 }
169 } 169 }
170 170
171 #if OS(WIN) 171 #if OS(WIN)
172 void AutoscrollController::handleMouseReleaseForPanScrolling(Frame* frame, const PlatformMouseEvent& mouseEvent) 172 void AutoscrollController::handleMouseReleaseForPanScrolling(Frame* frame, const PlatformMouseEvent& mouseEvent)
173 { 173 {
174 Page* page = frame->page(); 174 if (!frame->isMainFrame())
175 if (!page || page->mainFrame() != frame)
176 return; 175 return;
177 switch (m_autoscrollType) { 176 switch (m_autoscrollType) {
178 case AutoscrollForPan: 177 case AutoscrollForPan:
179 if (mouseEvent.button() == MiddleButton) 178 if (mouseEvent.button() == MiddleButton)
180 m_autoscrollType = AutoscrollForPanCanStop; 179 m_autoscrollType = AutoscrollForPanCanStop;
181 break; 180 break;
182 case AutoscrollForPanCanStop: 181 case AutoscrollForPanCanStop:
183 stopAutoscroll(); 182 stopAutoscroll();
184 break; 183 break;
185 } 184 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } else if (east) 287 } else if (east)
289 view->setCursor(eastPanningCursor()); 288 view->setCursor(eastPanningCursor());
290 else if (west) 289 else if (west)
291 view->setCursor(westPanningCursor()); 290 view->setCursor(westPanningCursor());
292 else 291 else
293 view->setCursor(middlePanningCursor()); 292 view->setCursor(middlePanningCursor());
294 } 293 }
295 #endif 294 #endif
296 295
297 } // namespace WebCore 296 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/HistoryController.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698