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

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

Issue 420603002: Use tighter typing in editing/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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 | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/editing/InsertListCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditorCommand.cpp
diff --git a/Source/core/editing/EditorCommand.cpp b/Source/core/editing/EditorCommand.cpp
index a0df2ffe640f945ed45a390e18551c7622edbe3b..1277b35a1d828513e4b81b7c55f73baaabfd141f 100644
--- a/Source/core/editing/EditorCommand.cpp
+++ b/Source/core/editing/EditorCommand.cpp
@@ -228,12 +228,12 @@ static bool expandSelectionToGranularity(LocalFrame& frame, TextGranularity gran
static TriState selectionListState(const FrameSelection& selection, const QualifiedName& tagName)
{
if (selection.isCaret()) {
- if (enclosingNodeWithTag(selection.selection().start(), tagName))
+ if (enclosingElementWithTag(selection.selection().start(), tagName))
return TrueTriState;
} else if (selection.isRange()) {
- Node* startNode = enclosingNodeWithTag(selection.selection().start(), tagName);
- Node* endNode = enclosingNodeWithTag(selection.selection().end(), tagName);
- if (startNode && endNode && startNode == endNode)
+ Element* startElement = enclosingElementWithTag(selection.selection().start(), tagName);
+ Element* endElement = enclosingElementWithTag(selection.selection().end(), tagName);
+ if (startElement && endElement && startElement == endElement)
return TrueTriState;
}
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/editing/InsertListCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698