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

Side by Side Diff: Source/core/editing/SelectionController.cpp

Issue 1301933002: Move a static member function nodeIsUserSelectNone() out from PositionAlgorithm template class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T17:33:44 Move out from class Created 5 years, 4 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
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 * Copyright (C) 2015 Google Inc. All rights reserved. 5 * Copyright (C) 2015 Google Inc. All rights reserved.
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 if (selection().granularity() != CharacterGranularity) 277 if (selection().granularity() != CharacterGranularity)
278 expandSelectionUsingGranularity(newSelection, selection().granularity()) ; 278 expandSelectionUsingGranularity(newSelection, selection().granularity()) ;
279 279
280 selection().setNonDirectionalSelectionIfNeeded(newSelection, selection().gra nularity(), 280 selection().setNonDirectionalSelectionIfNeeded(newSelection, selection().gra nularity(),
281 FrameSelection::AdjustEndpointsAtBidiBoundary); 281 FrameSelection::AdjustEndpointsAtBidiBoundary);
282 } 282 }
283 283
284 bool SelectionController::updateSelectionForMouseDownDispatchingSelectStart(Node * targetNode, const VisibleSelection& selection, TextGranularity granularity) 284 bool SelectionController::updateSelectionForMouseDownDispatchingSelectStart(Node * targetNode, const VisibleSelection& selection, TextGranularity granularity)
285 { 285 {
286 if (Position::nodeIsUserSelectNone(targetNode)) 286 if (nodeIsUserSelectNone(targetNode))
287 return false; 287 return false;
288 288
289 if (!dispatchSelectStart(targetNode)) 289 if (!dispatchSelectStart(targetNode))
290 return false; 290 return false;
291 291
292 if (!selection.isValidFor(*m_frame->document())) 292 if (!selection.isValidFor(*m_frame->document()))
293 return false; 293 return false;
294 294
295 if (selection.isRange()) { 295 if (selection.isRange()) {
296 m_selectionState = SelectionState::ExtendedSelection; 296 m_selectionState = SelectionState::ExtendedSelection;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 else 649 else
650 m_selectionState = SelectionState::HaveNotStartedSelection; 650 m_selectionState = SelectionState::HaveNotStartedSelection;
651 } 651 }
652 652
653 FrameSelection& SelectionController::selection() const 653 FrameSelection& SelectionController::selection() const
654 { 654 {
655 return m_frame->selection(); 655 return m_frame->selection();
656 } 656 }
657 657
658 } // namespace blink 658 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698