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

Side by Side Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2712603007: Select All present even all selectable text has been selected (Closed)
Patch Set: Created 3 years, 9 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, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 bool Editor::canPaste() const { 324 bool Editor::canPaste() const {
325 return canEdit(); 325 return canEdit();
326 } 326 }
327 327
328 bool Editor::canDelete() const { 328 bool Editor::canDelete() const {
329 FrameSelection& selection = frame().selection(); 329 FrameSelection& selection = frame().selection();
330 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && 330 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() &&
331 selection.computeVisibleSelectionInDOMTree().rootEditableElement(); 331 selection.computeVisibleSelectionInDOMTree().rootEditableElement();
332 } 332 }
333 333
334 bool Editor::canSelectAll() const {
335 return frame().selection().canSelectAll();
336 }
337
334 bool Editor::smartInsertDeleteEnabled() const { 338 bool Editor::smartInsertDeleteEnabled() const {
335 if (Settings* settings = frame().settings()) 339 if (Settings* settings = frame().settings())
336 return settings->getSmartInsertDeleteEnabled(); 340 return settings->getSmartInsertDeleteEnabled();
337 return false; 341 return false;
338 } 342 }
339 343
340 bool Editor::canSmartCopyOrDelete() const { 344 bool Editor::canSmartCopyOrDelete() const {
341 return smartInsertDeleteEnabled() && 345 return smartInsertDeleteEnabled() &&
342 frame().selection().granularity() == WordGranularity; 346 frame().selection().granularity() == WordGranularity;
343 } 347 }
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 1770
1767 DEFINE_TRACE(Editor) { 1771 DEFINE_TRACE(Editor) {
1768 visitor->trace(m_frame); 1772 visitor->trace(m_frame);
1769 visitor->trace(m_lastEditCommand); 1773 visitor->trace(m_lastEditCommand);
1770 visitor->trace(m_undoStack); 1774 visitor->trace(m_undoStack);
1771 visitor->trace(m_mark); 1775 visitor->trace(m_mark);
1772 visitor->trace(m_typingStyle); 1776 visitor->trace(m_typingStyle);
1773 } 1777 }
1774 1778
1775 } // namespace blink 1779 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698