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

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

Issue 2706033011: Expand FrameSeleciton::rootEditableElement() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-22T12:50:05 Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.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, 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 !selection.isInPasswordField(); 320 !selection.isInPasswordField();
321 } 321 }
322 322
323 bool Editor::canPaste() const { 323 bool Editor::canPaste() const {
324 return canEdit(); 324 return canEdit();
325 } 325 }
326 326
327 bool Editor::canDelete() const { 327 bool Editor::canDelete() const {
328 FrameSelection& selection = frame().selection(); 328 FrameSelection& selection = frame().selection();
329 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && 329 return selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() &&
330 selection.rootEditableElement(); 330 selection.computeVisibleSelectionInDOMTree().rootEditableElement();
331 } 331 }
332 332
333 bool Editor::smartInsertDeleteEnabled() const { 333 bool Editor::smartInsertDeleteEnabled() const {
334 if (Settings* settings = frame().settings()) 334 if (Settings* settings = frame().settings())
335 return settings->getSmartInsertDeleteEnabled(); 335 return settings->getSmartInsertDeleteEnabled();
336 return false; 336 return false;
337 } 337 }
338 338
339 bool Editor::canSmartCopyOrDelete() const { 339 bool Editor::canSmartCopyOrDelete() const {
340 return smartInsertDeleteEnabled() && 340 return smartInsertDeleteEnabled() &&
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 1740
1741 DEFINE_TRACE(Editor) { 1741 DEFINE_TRACE(Editor) {
1742 visitor->trace(m_frame); 1742 visitor->trace(m_frame);
1743 visitor->trace(m_lastEditCommand); 1743 visitor->trace(m_lastEditCommand);
1744 visitor->trace(m_undoStack); 1744 visitor->trace(m_undoStack);
1745 visitor->trace(m_mark); 1745 visitor->trace(m_mark);
1746 visitor->trace(m_typingStyle); 1746 visitor->trace(m_typingStyle);
1747 } 1747 }
1748 1748
1749 } // namespace blink 1749 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698