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

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

Issue 46353003: Switch AutoscrollController to use animation system instead of timer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@gclient
Patch Set: addresses review feedback 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
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/page/Page.h » ('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 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 259
260 void FocusController::setFocused(bool focused) 260 void FocusController::setFocused(bool focused)
261 { 261 {
262 if (isFocused() == focused) 262 if (isFocused() == focused)
263 return; 263 return;
264 264
265 m_isFocused = focused; 265 m_isFocused = focused;
266 266
267 if (!m_isFocused) 267 if (!m_isFocused)
268 focusedOrMainFrame()->eventHandler().stopAutoscrollTimer(); 268 focusedOrMainFrame()->eventHandler().stopAutoscroll();
269 269
270 if (!m_focusedFrame) 270 if (!m_focusedFrame)
271 setFocusedFrame(m_page->mainFrame()); 271 setFocusedFrame(m_page->mainFrame());
272 272
273 if (m_focusedFrame->view()) { 273 if (m_focusedFrame->view()) {
274 m_focusedFrame->selection().setFocused(focused); 274 m_focusedFrame->selection().setFocused(focused);
275 dispatchEventsOnWindowAndFocusedNode(m_focusedFrame->document(), focused ); 275 dispatchEventsOnWindowAndFocusedNode(m_focusedFrame->document(), focused );
276 } 276 }
277 } 277 }
278 278
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */); 899 startingRect = nodeRectInAbsoluteCoordinates(container, true /* ignore b order */);
900 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct ion, container); 900 container = scrollableEnclosingBoxOrParentFrameForNodeInDirection(direct ion, container);
901 if (container && container->isDocumentNode()) 901 if (container && container->isDocumentNode())
902 toDocument(container)->updateLayoutIgnorePendingStylesheets(); 902 toDocument(container)->updateLayoutIgnorePendingStylesheets();
903 } while (!consumed && container); 903 } while (!consumed && container);
904 904
905 return consumed; 905 return consumed;
906 } 906 }
907 907
908 } // namespace WebCore 908 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698