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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.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/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 717611d8d5c58cdbcc74720eb9a8608349318525..1e9f98c766d924d34c6a3084b3716a6c9677b110 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -41,6 +41,7 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/ParserContentPolicy.h"
#include "core/dom/Text.h"
+#include "core/editing/EditingStyleUtilities.h"
#include "core/editing/EditingUtilities.h"
#include "core/editing/InputMethodController.h"
#include "core/editing/RenderedPosition.h"
@@ -795,9 +796,10 @@ void Editor::applyParagraphStyleToSelection(StylePropertySet* style,
bool Editor::selectionStartHasStyle(CSSPropertyID propertyID,
const String& value) const {
EditingStyle* styleToCheck = EditingStyle::create(propertyID, value);
- EditingStyle* styleAtStart = EditingStyle::styleAtSelectionStart(
- frame().selection().selection(), propertyID == CSSPropertyBackgroundColor,
- styleToCheck->style());
+ EditingStyle* styleAtStart =
+ EditingStyleUtilities::createStyleAtSelectionStart(
+ frame().selection().selection(),
+ propertyID == CSSPropertyBackgroundColor, styleToCheck->style());
return styleToCheck->triStateOfStyle(styleAtStart);
}
@@ -808,9 +810,10 @@ TriState Editor::selectionHasStyle(CSSPropertyID propertyID,
}
String Editor::selectionStartCSSPropertyValue(CSSPropertyID propertyID) {
- EditingStyle* selectionStyle = EditingStyle::styleAtSelectionStart(
- frame().selection().selection(),
- propertyID == CSSPropertyBackgroundColor);
+ EditingStyle* selectionStyle =
+ EditingStyleUtilities::createStyleAtSelectionStart(
+ frame().selection().selection(),
+ propertyID == CSSPropertyBackgroundColor);
if (!selectionStyle || !selectionStyle->style())
return String();

Powered by Google App Engine
This is Rietveld 408576698