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

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

Issue 2184823004: [Editing][CodeHealth] Remove redundant Editabletype arguments in layoutObjectIsRichlyEditable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 667 }
668 668
669 bool CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor(const String& tex t) const 669 bool CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor(const String& tex t) const
670 { 670 {
671 return containsOnlyWhitespace(text); 671 return containsOnlyWhitespace(text);
672 } 672 }
673 673
674 bool CompositeEditCommand::canRebalance(const Position& position) const 674 bool CompositeEditCommand::canRebalance(const Position& position) const
675 { 675 {
676 Node* node = position.computeContainerNode(); 676 Node* node = position.computeContainerNode();
677 if (!position.isOffsetInAnchor() || !node || !node->isTextNode() || !layoutO bjectIsRichlyEditable(*node)) 677 if (!position.isOffsetInAnchor() || !node || !node->isTextNode() || !hasRich lyEditableStyle(*node))
678 return false; 678 return false;
679 679
680 Text* textNode = toText(node); 680 Text* textNode = toText(node);
681 if (textNode->length() == 0) 681 if (textNode->length() == 0)
682 return false; 682 return false;
683 683
684 LayoutText* layoutText = textNode->layoutObject(); 684 LayoutText* layoutText = textNode->layoutObject();
685 if (layoutText && !layoutText->style()->collapseWhiteSpace()) 685 if (layoutText && !layoutText->style()->collapseWhiteSpace())
686 return false; 686 return false;
687 687
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 } 1643 }
1644 1644
1645 DEFINE_TRACE(CompositeEditCommand) 1645 DEFINE_TRACE(CompositeEditCommand)
1646 { 1646 {
1647 visitor->trace(m_commands); 1647 visitor->trace(m_commands);
1648 visitor->trace(m_composition); 1648 visitor->trace(m_composition);
1649 EditCommand::trace(visitor); 1649 EditCommand::trace(visitor);
1650 } 1650 }
1651 1651
1652 } // namespace blink 1652 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698