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

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

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/page/Page.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 3399 matching lines...) Expand 10 before | Expand all | Expand 10 after
3410 3410
3411 if (event->ctrlKey() || event->metaKey() || event->altKey() || event->altGra phKey()) 3411 if (event->ctrlKey() || event->metaKey() || event->altKey() || event->altGra phKey())
3412 return; 3412 return;
3413 3413
3414 if (!m_frame->editor().behavior().shouldNavigateBackOnBackspace()) 3414 if (!m_frame->editor().behavior().shouldNavigateBackOnBackspace())
3415 return; 3415 return;
3416 3416
3417 Page* page = m_frame->page(); 3417 Page* page = m_frame->page();
3418 if (!page) 3418 if (!page)
3419 return; 3419 return;
3420 bool handledEvent = page->mainFrame()->loader()->client()->navigateBackForwa rd(event->shiftKey() ? 1 : -1); 3420 bool handledEvent = page->mainFrame()->loader().client()->navigateBackForwar d(event->shiftKey() ? 1 : -1);
3421 if (handledEvent) 3421 if (handledEvent)
3422 event->setDefaultHandled(); 3422 event->setDefaultHandled();
3423 } 3423 }
3424 3424
3425 void EventHandler::defaultArrowEventHandler(FocusDirection focusDirection, Keybo ardEvent* event) 3425 void EventHandler::defaultArrowEventHandler(FocusDirection focusDirection, Keybo ardEvent* event)
3426 { 3426 {
3427 ASSERT(event->type() == EventTypeNames::keydown); 3427 ASSERT(event->type() == EventTypeNames::keydown);
3428 3428
3429 if (event->ctrlKey() || event->metaKey() || event->altGraphKey() || event->s hiftKey()) 3429 if (event->ctrlKey() || event->metaKey() || event->altGraphKey() || event->s hiftKey())
3430 return; 3430 return;
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3869 unsigned EventHandler::accessKeyModifiers() 3869 unsigned EventHandler::accessKeyModifiers()
3870 { 3870 {
3871 #if OS(MACOSX) 3871 #if OS(MACOSX)
3872 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3872 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3873 #else 3873 #else
3874 return PlatformEvent::AltKey; 3874 return PlatformEvent::AltKey;
3875 #endif 3875 #endif
3876 } 3876 }
3877 3877
3878 } // namespace WebCore 3878 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/DragController.cpp ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698