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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
index 5c7a65aed5d3a3b007166f24dbe36c3523af31a3..caf280f2c96ea7e9d972759e8ba27e45452739b3 100644
--- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
@@ -172,12 +172,12 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
if (!editableRoot->getAttributeEventListener(EventTypeNames::webkitBeforeTextInserted)
// FIXME: Remove these checks once textareas and textfields actually register an event handler.
&& !(shadowAncestorElement && shadowAncestorElement->layoutObject() && shadowAncestorElement->layoutObject()->isTextControl())
- && layoutObjectIsRichlyEditable(*editableRoot)) {
+ && hasRichlyEditableStyle(*editableRoot)) {
removeInterchangeNodes(m_fragment.get());
return;
}
- if (!layoutObjectIsRichlyEditable(*editableRoot)) {
+ if (!hasRichlyEditableStyle(*editableRoot)) {
bool isPlainText = true;
for (Node& node : NodeTraversal::childrenOf(*m_fragment)) {
if (isInterchangeHTMLBRElement(&node) && &node == m_fragment->lastChild())
@@ -217,7 +217,7 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f
// Give the root a chance to change the text.
BeforeTextInsertedEvent* evt = BeforeTextInsertedEvent::create(text);
editableRoot->dispatchEvent(evt);
- if (text != evt->text() || !layoutObjectIsRichlyEditable(*editableRoot)) {
+ if (text != evt->text() || !hasRichlyEditableStyle(*editableRoot)) {
restoreAndRemoveTestRenderingNodesToFragment(holder);
m_fragment = createFragmentFromText(selection.toNormalizedEphemeralRange(), evt->text());
@@ -581,7 +581,7 @@ void ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline(Insert
continue;
}
- if (element->parentNode() && layoutObjectIsRichlyEditable(*element->parentNode()))
+ if (element->parentNode() && hasRichlyEditableStyle(*element->parentNode()))
removeElementAttribute(element, contenteditableAttr);
// WebKit used to not add display: inline and float: none on copy.
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698