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

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

Issue 2687243002: Rename the methods in EditingStyleUtilities class and make them used in editing (Closed)
Patch Set: Created 3 years, 10 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/commands/EditorCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
index 183403d5088dc50f8ddebc4ec3271022bcd066bf..f2279f9bc81815f26cfe45c8433bdb3be203c0a0 100644
--- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
@@ -37,6 +37,7 @@
#include "core/css/StylePropertySet.h"
#include "core/dom/DocumentFragment.h"
#include "core/dom/TagCollection.h"
+#include "core/editing/EditingStyleUtilities.h"
#include "core/editing/EditingUtilities.h"
#include "core/editing/FrameSelection.h"
#include "core/editing/SelectionModifier.h"
@@ -291,7 +292,8 @@ static bool executeToggleStyleInList(LocalFrame& frame,
CSSPropertyID propertyID,
CSSValue* value) {
EditingStyle* selectionStyle =
- EditingStyle::styleAtSelectionStart(frame.selection().selection());
+ EditingStyleUtilities::createStyleAtSelectionStart(
+ frame.selection().selection());
if (!selectionStyle || !selectionStyle->style())
return false;
@@ -455,9 +457,10 @@ static TriState stateTextWritingDirection(LocalFrame& frame,
frame.document()->updateStyleAndLayoutIgnorePendingStylesheets();
bool hasNestedOrMultipleEmbeddings;
- WritingDirection selectionDirection = EditingStyle::textDirectionForSelection(
- frame.selection().selection(), frame.editor().typingStyle(),
- hasNestedOrMultipleEmbeddings);
+ WritingDirection selectionDirection =
+ EditingStyleUtilities::textDirectionForSelection(
+ frame.selection().selection(), frame.editor().typingStyle(),
+ hasNestedOrMultipleEmbeddings);
// FXIME: We should be returning MixedTriState when selectionDirection ==
// direction && hasNestedOrMultipleEmbeddings
return (selectionDirection == direction && !hasNestedOrMultipleEmbeddings)

Powered by Google App Engine
This is Rietveld 408576698