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

Unified Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 1986563002: Apply vertical-align style of <sub> and <sup> to child elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify the test case Created 4 years, 7 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 9bbb8311b82095c0192d6efbb1c1d54d32524245..59802d657dad7cea50df6a131b182917d53a621d 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -641,8 +641,10 @@ void Editor::applyParagraphStyleToSelection(StylePropertySet* style, EditAction
bool Editor::selectionStartHasStyle(CSSPropertyID propertyID, const String& value) const
{
- return EditingStyle::create(propertyID, value)->triStateOfStyle(
- EditingStyle::styleAtSelectionStart(frame().selection().selection(), propertyID == CSSPropertyBackgroundColor));
+ EditingStyle* styleToCheck = EditingStyle::create(propertyID, value);
+ EditingStyle* styleAtStart = EditingStyle::styleAtSelectionStart(frame().selection().selection(),
+ propertyID == CSSPropertyBackgroundColor, styleToCheck->style());
+ return styleToCheck->triStateOfStyle(styleAtStart);
}
TriState Editor::selectionHasStyle(CSSPropertyID propertyID, const String& value) const

Powered by Google App Engine
This is Rietveld 408576698