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

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: fix test fails 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 f3f043b3d8b617389766cc076cbab5882b1091b5..03f26043df8c37e63090ab05dca7006359d81ab9 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)
yosin_UTC9 2016/08/12 01:37:35 Could you make |isPresentationalHTMLElement() to t
joone 2016/08/12 22:12:21 Maybe no, because we need to change other methods
+{
+ 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