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

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

Issue 1313883002: Introduce firstRangeOf() as replacement of VisibleSelection::firstRange() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-25T17:47:14 Created 5 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
« no previous file with comments | « Source/core/editing/VisibleSelectionTest.cpp ('k') | Source/core/editing/commands/InsertListCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/commands/EditorCommand.cpp
diff --git a/Source/core/editing/commands/EditorCommand.cpp b/Source/core/editing/commands/EditorCommand.cpp
index 546c0dabfb9d5008efae0e4428648de28f9ba2ae..b60230ee77a528557312c21863d11d98b9f84cec 100644
--- a/Source/core/editing/commands/EditorCommand.cpp
+++ b/Source/core/editing/commands/EditorCommand.cpp
@@ -1436,7 +1436,7 @@ static String valueFormatBlock(LocalFrame& frame, Event*)
const VisibleSelection& selection = frame.selection().selection();
if (!selection.isNonOrphanedCaretOrRange() || !selection.isContentEditable())
return "";
- Element* formatBlockElement = FormatBlockCommand::elementForFormatBlockCommand(selection.firstRange().get());
+ Element* formatBlockElement = FormatBlockCommand::elementForFormatBlockCommand(firstRangeOf(selection).get());
if (!formatBlockElement)
return "";
return formatBlockElement->localName();
« no previous file with comments | « Source/core/editing/VisibleSelectionTest.cpp ('k') | Source/core/editing/commands/InsertListCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698