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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.cpp

Issue 19028005: Introduce isHTMLTitleElement and toHTMLTitleElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index 0185e5e36c3ac67c5ed764f2fed1adfca53c59a4..57b3718faa9b5faf22e1a0f729b12530b12c310c 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -51,6 +51,7 @@
#include "core/editing/markup.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLInputElement.h"
+#include "core/html/HTMLTitleElement.h"
#include "core/page/Frame.h"
#include "core/rendering/RenderObject.h"
#include "core/rendering/RenderText.h"
@@ -703,7 +704,7 @@ static void removeHeadContents(ReplacementFragment& fragment)
|| node->hasTagName(linkTag)
|| node->hasTagName(metaTag)
|| node->hasTagName(styleTag)
- || node->hasTagName(titleTag)) {
+ || isHTMLTitleElement(node)) {
next = NodeTraversal::nextSkippingChildren(node);
fragment.removeNode(node);
} else

Powered by Google App Engine
This is Rietveld 408576698