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

Unified Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2229703004: Keep formatting tags included when it is cut or copied. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove editor variable in test case 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index 05f2fd05176e0a57cb3f34e098282a250d1f0965..0b872ea695c070058c0f0ec7f83d36fc39d4159a 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -1136,6 +1136,16 @@ bool isListItem(const Node* n)
return n && n->layoutObject() && n->layoutObject()->isListItem();
}
+bool isPresentationalHTMLElement(const Node* node)
+{
+ if (!node->isHTMLElement())
+ return false;
+
+ const HTMLElement& element = toHTMLElement(*node);
+ return element.hasTagName(uTag) || element.hasTagName(sTag) || element.hasTagName(strikeTag)
+ || element.hasTagName(iTag) || element.hasTagName(emTag) || element.hasTagName(bTag) || element.hasTagName(strongTag);
+}
+
Element* associatedElementOf(const Position& position)
{
Node* node = position.anchorNode();

Powered by Google App Engine
This is Rietveld 408576698