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

Side by Side Diff: sky/engine/core/page/EventHandler.cpp

Issue 681553003: Remove a bunch of unused or never-set settings. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 | « sky/engine/core/frame/Settings.in ('k') | sky/engine/core/page/FocusController.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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // Clear the selection if the mouse didn't move after the last mouse 688 // Clear the selection if the mouse didn't move after the last mouse
689 // press and it's not a context menu click. We do this so when clicking 689 // press and it's not a context menu click. We do this so when clicking
690 // on the selection, the selection goes away. However, if we are 690 // on the selection, the selection goes away. However, if we are
691 // editing, place the caret. 691 // editing, place the caret.
692 if (m_mouseDownWasSingleClickInSelection && m_selectionInitiationState != Ex tendedSelection 692 if (m_mouseDownWasSingleClickInSelection && m_selectionInitiationState != Ex tendedSelection
693 && m_dragStartPos == event.event().position() 693 && m_dragStartPos == event.event().position()
694 && m_frame->selection().isRange() 694 && m_frame->selection().isRange()
695 && event.event().button() != RightButton) { 695 && event.event().button() != RightButton) {
696 VisibleSelection newSelection; 696 VisibleSelection newSelection;
697 Node* node = event.targetNode(); 697 Node* node = event.targetNode();
698 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBr owsingEnabled(); 698 if (node && node->renderer() && node->hasEditableStyle()) {
699 if (node && node->renderer() && (caretBrowsing || node->hasEditableStyle ())) {
700 VisiblePosition pos = VisiblePosition(node->renderer()->positionForP oint(event.localPoint())); 699 VisiblePosition pos = VisiblePosition(node->renderer()->positionForP oint(event.localPoint()));
701 newSelection = VisibleSelection(pos); 700 newSelection = VisibleSelection(pos);
702 } 701 }
703 702
704 setSelectionIfNeeded(m_frame->selection(), newSelection); 703 setSelectionIfNeeded(m_frame->selection(), newSelection);
705 704
706 handled = true; 705 handled = true;
707 } 706 }
708 707
709 m_frame->selection().notifyRendererOfSelectionChange(UserTriggered); 708 m_frame->selection().notifyRendererOfSelectionChange(UserTriggered);
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2853 unsigned EventHandler::accessKeyModifiers() 2852 unsigned EventHandler::accessKeyModifiers()
2854 { 2853 {
2855 #if OS(MACOSX) 2854 #if OS(MACOSX)
2856 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 2855 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
2857 #else 2856 #else
2858 return PlatformEvent::AltKey; 2857 return PlatformEvent::AltKey;
2859 #endif 2858 #endif
2860 } 2859 }
2861 2860
2862 } // namespace blink 2861 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/Settings.in ('k') | sky/engine/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698